Skip to content

Instantly share code, notes, and snippets.

@vincentchalamon
Last active June 1, 2023 14:25
Show Gist options
  • Save vincentchalamon/2b3004874d372a4624941fb585042567 to your computer and use it in GitHub Desktop.
Save vincentchalamon/2b3004874d372a4624941fb585042567 to your computer and use it in GitHub Desktop.
API Platform Keycloak Swagger
OIDC_SERVER_URL=https://localhost/oidc/realms/demo
OIDC_SWAGGER_CLIENT_ID=api-platform-swagger
# config/packages/api_platform.yaml
api_platform:
# …
oauth:
enabled: true
clientId: '%env(OIDC_SWAGGER_CLIENT_ID)%'
pkce: true
type: oauth2
flow: authorizationCode
tokenUrl: '%env(OIDC_SERVER_URL)%protocol/openid-connect/token'
authorizationUrl: '%env(OIDC_SERVER_URL)%protocol/openid-connect/auth'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment