Created
March 4, 2022 15:46
-
-
Save vincentchalamon/f29db1a9f7fbfd8a32e8f22c8c0a22f7 to your computer and use it in GitHub Desktop.
API Platform Keycloak Security
This file contains hidden or 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
# config/packages/security.yaml | |
security: | |
enable_authenticator_manager: true | |
providers: | |
app_user_provider: | |
entity: | |
class: App\Entity\User | |
property: email | |
firewalls: | |
main: | |
pattern: ^/ | |
oauth: | |
resource_owners: | |
keycloak: "/login/check" | |
login_path: /login | |
use_forward: false | |
failure_path: /login | |
oauth_user_provider: | |
service: hwi_oauth.user.provider | |
provider: hwi_oauth.user.provider | |
access_control: | |
- { path: ^/login, roles: PUBLIC_ACCESS } | |
- { path: ^/, roles: ROLE_USER } // force login |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment