-
-
Save yamabicodev/49fcbc33d4313319b4984ab6506b3d47 to your computer and use it in GitHub Desktop.
Spring Security OAuth2 Client Sample
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
spring: | |
security: | |
oauth2: | |
client: | |
# registrationセクションには、 | |
# プロバイダ側でアプリケーション登録した際に発行されるClientID・Secret情報や、 | |
# 認証タイプ・アクセススコープタイプ・プロバイダからのコールバック先等を指定する。 | |
registration: | |
github: # registration Idと呼ばれる。 | |
clientId: {your-github-client-id} | |
clientSecret: {your-github-client-secret} | |
# プロバイダ側でのログイン・認可後にプロバイダ→クライアントへのコールバック先のURL | |
# この項目を指定しない場合、 | |
# プロバイダは「/login/oauth2/code/{registrationId}」形式でリダイレクト処理を行う。 | |
redirectUri: http://localhost:8080/login/oauth2/code/github | |
scope: | |
- read:user | |
# providerセクションには、 | |
# プロバイダ側で「認可エンドポイント」・「トークンエンドポイント」・「リソースのエンドポイント」等を指定する。 | |
provider: | |
github: | |
# 認可エンドポイントURL | |
authorizationUri: https://github.com/login/oauth/authorize | |
# トークンエンドポイントURL | |
tokenUri: https://github.com/login/oauth/access_token | |
# リソースのエンドポイントURL | |
userInfoUri: https://api.github.com/user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment