Skip to content

Instantly share code, notes, and snippets.

@mohnish82
Created April 13, 2020 17:41
Show Gist options
  • Save mohnish82/38bd99a6b9cd3460e0ef6c9fa469bd7e to your computer and use it in GitHub Desktop.
Save mohnish82/38bd99a6b9cd3460e0ef6c9fa469bd7e to your computer and use it in GitHub Desktop.
Spring Boot Keycloak OpenID Connect config
spring:
security:
oauth2:
client:
registration:
keycloak:
client-id: xyz-app
client-secret: <insert-secret-here>
clientName: XYZ
authorization-grant-type: authorization_code
redirectUriTemplate: '{baseUrl}/login/oauth2/code/{registrationId}'
scope:
- openid
- profile
- email
provider:
keycloak:
#issuer-uri: http://localhost:8080/auth/realms/xyz
authorization-uri: http://localhost:8080/auth/realms/xyz/protocol/openid-connect/auth
token-uri: http://localhost:8080/auth/realms/xyz/protocol/openid-connect/token
user-info-uri: http://localhost:8080/auth/realms/xyz/protocol/openid-connect/userinfo
jwk-set-uri: http://localhost:8080/auth/realms/xyz/protocol/openid-connect/certs
user-name-attribute: preferred_username
logging:
file: spring-oidc.log
level:
root: INFO
server:
port: 8080
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment