Created
April 14, 2020 10:28
-
-
Save fjugaldev/d573d756fd59832aabb70a0ba609a58e to your computer and use it in GitHub Desktop.
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
security: | |
encoders: | |
App\Entity\User: | |
algorithm: sha512 | |
providers: | |
api_user_provider: | |
entity: | |
class: App\Entity\User | |
property: username | |
firewalls: | |
login: | |
pattern: ^/api/login | |
stateless: true | |
anonymous: true | |
form_login: | |
check_path: /api/login_check | |
success_handler: lexik_jwt_authentication.handler.authentication_success | |
failure_handler: lexik_jwt_authentication.handler.authentication_failure | |
require_previous_session: false | |
api: | |
pattern: ^/api/v1 | |
stateless: true | |
anonymous: false | |
provider: api_user_provider | |
guard: | |
authenticators: | |
- lexik_jwt_authentication.jwt_token_authenticator | |
access_control: | |
- { path: ^/api/login_check, roles: IS_AUTHENTICATED_ANONYMOUSLY } | |
- { path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY } | |
- { path: ^/api/register, roles: IS_AUTHENTICATED_ANONYMOUSLY } | |
- { path: ^/api/v1, roles: IS_AUTHENTICATED_FULLY } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment