Support authorization_code grant for OAuth2 client
This commit also refactors OAuth2 client properties. With the added support for authorization_code clients, client registrations are now divided into `login` and `authorization_code`. An environment post processor is used for backward compatibility with old Open ID Connect login clients. Closes gh-13812
This commit is contained in:
@@ -3,23 +3,24 @@ spring:
|
||||
oauth2:
|
||||
client:
|
||||
registration:
|
||||
github-client-1:
|
||||
client-id: ${APP-CLIENT-ID}
|
||||
client-secret: ${APP-CLIENT-SECRET}
|
||||
client-name: Github user
|
||||
provider: github
|
||||
scope: user
|
||||
redirect-uri-template: http://localhost:8080/login/oauth2/code/github
|
||||
github-client-2:
|
||||
client-id: ${APP-CLIENT-ID}
|
||||
client-secret: ${APP-CLIENT-SECRET}
|
||||
client-name: Github email
|
||||
provider: github
|
||||
scope: user:email
|
||||
redirect-uri-template: http://localhost:8080/login/oauth2/code/github
|
||||
yahoo-oidc:
|
||||
client-id: ${YAHOO-CLIENT-ID}
|
||||
client-secret: ${YAHOO-CLIENT-SECRET}
|
||||
login:
|
||||
github-client-1:
|
||||
client-id: ${APP-CLIENT-ID}
|
||||
client-secret: ${APP-CLIENT-SECRET}
|
||||
client-name: Github user
|
||||
provider: github
|
||||
scope: user
|
||||
redirect-uri-template: http://localhost:8080/login/oauth2/code/github
|
||||
github-client-2:
|
||||
client-id: ${APP-CLIENT-ID}
|
||||
client-secret: ${APP-CLIENT-SECRET}
|
||||
client-name: Github email
|
||||
provider: github
|
||||
scope: user:email
|
||||
redirect-uri-template: http://localhost:8080/login/oauth2/code/github
|
||||
yahoo-oidc:
|
||||
client-id: ${YAHOO-CLIENT-ID}
|
||||
client-secret: ${YAHOO-CLIENT-SECRET}
|
||||
provider:
|
||||
yahoo-oidc:
|
||||
issuer-uri: https://api.login.yahoo.com/
|
||||
Reference in New Issue
Block a user