Web: BearerToken取得対象の拡張#2088
Merged
Merged
Conversation
- BearerToken を取得できる処理を BearerTokenSupplier を実装している RequestContext に拡張 - TokenCredential を追加し、トークン認証クラスに実装
Contributor
There was a problem hiding this comment.
Pull request overview
本PRは、BearerToken を取得できる対象を REST リクエスト(RestRequestContext)固定から、BearerTokenSupplier を実装する RequestContext へ拡張し、あわせてトークン認証系 Credential の共通インターフェース(TokenCredential)を導入することで、トークン種別(SAT/OAT等)に依存しない処理へ寄せる変更です(closes #2087)。
Changes:
BearerTokenSupplierを新設し、BearerToken 取得のための情報(Authorizationヘッダー/Method/Content-Type)をRequestContext側から供給可能に変更RestRequestContextをBearerTokenSupplier実装に拡張し、BearerToken 取得情報を提供TokenCredentialを新設し、既存のトークン系 Credential(SimpleAuthToken/OAuth AccessToken)を実装へ変更、成功時処理のキャスト先を置き換え
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| iplass-web/src/main/java/org/iplass/mtp/impl/webapi/rest/RestRequestContext.java | BearerTokenSupplier 実装を追加し、ヘッダー/Content-Type 取得を提供 |
| iplass-web/src/main/java/org/iplass/mtp/impl/auth/oauth/AccessTokenCredential.java | TokenCredential を実装し、トークン取得の共通化に対応 |
| iplass-web/src/main/java/org/iplass/mtp/impl/auth/authenticate/token/web/BearerTokenSupplier.java | BearerToken 取得元を抽象化する供給インターフェースを新設 |
| iplass-web/src/main/java/org/iplass/mtp/impl/auth/authenticate/token/web/BearerTokenAutoLoginHandler.java | BearerToken 取得対象を BearerTokenSupplier に一般化、成功時のキャスト先を TokenCredential 化 |
| iplass-core/src/main/java/org/iplass/mtp/auth/login/TokenCredential.java | トークンベース Credential の共通インターフェースを新設 |
| iplass-core/src/main/java/org/iplass/mtp/auth/login/token/SimpleAuthTokenCredential.java | TokenCredential を実装し、トークン取得の共通化に対応 |
HiguchiKiyoshi
approved these changes
Jun 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #2087
対応内容
動作確認・スクリーンショット(任意)
レビュー観点・補足情報(任意)