-
-
Save seit/8090463a376d4a11973e3a7c5011e74c to your computer and use it in GitHub Desktop.
This file contains 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
// エンドポイントを直接指定する場合 | |
// val serviceConfig = AuthorizationServiceConfiguration( | |
// Uri.parse("https://www.example.com/app/v1/authorization"), // authorization endpoint | |
// Uri.parse("https://www.example.com/app/v1/token") // token endpoint | |
// ) | |
// ディスカバリエンドポイントを利用する場合 | |
AuthorizationServiceConfiguration.fetchFromIssuer( | |
Uri.parse("https://www.example.com/app/v1/"), | |
AuthorizationServiceConfiguration.RetrieveConfigurationCallback() { | |
authorizationServiceConfiguration: AuthorizationServiceConfiguration?, authorizationException: AuthorizationException? -> | |
_authState = authorizationServiceConfiguration?.let { AuthState(it) } | |
} | |
) | |
// ディスカバリエンドポイントを利用する場合(エンドポイントをフルパスで指定する) | |
AuthorizationServiceConfiguration.fetchFromUrl( | |
Uri.parse("https://www.example.com/app/v1/.well-known/openid-configuration"), | |
AuthorizationServiceConfiguration.RetrieveConfigurationCallback() { authorizationServiceConfiguration: AuthorizationServiceConfiguration?, authorizationException: AuthorizationException? -> | |
_authState = authorizationServiceConfiguration?.let { AuthState(it) } | |
} | |
) | |
_authService = AuthorizationService(requireContext()) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment