Created
December 11, 2015 17:14
-
-
Save chalasr/8758170b31608e20e107 to your computer and use it in GitHub Desktop.
Lexik\JWTAuthenticationBundle configuration
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: | |
providers: | |
in_memory: | |
memory: ~ | |
fos_userbundle: | |
id: fos_user.user_manager | |
encoders: | |
FOS\UserBundle\Model\UserInterface: sha512 | |
acl: | |
connection: default | |
firewalls: | |
dev: | |
pattern: ^/(_(profiler|wdt)|css|images|js)/ | |
security: false | |
login: | |
pattern: ^/login | |
stateless: true | |
anonymous: true | |
form_login: | |
provider: fos_userbundle | |
check_path: /login_check | |
require_previous_session: false | |
username_parameter: username | |
password_parameter: password | |
success_handler: lexik_jwt_authentication.handler.authentication_success | |
failure_handler: lexik_jwt_authentication.handler.authentication_failure | |
api: | |
pattern: ^/api | |
stateless: true | |
lexik_jwt: | |
authorization_header: | |
enabled: true | |
prefix: Bearer # Header to be added in Angular requests (@max see Sandbox example) | |
query_parameter: | |
enabled: true | |
name: bearer | |
access_control: | |
# URL of FOSUserBundle which need to be available to anonymous users | |
- { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY } | |
- { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY } | |
- { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY } | |
# ... | |
# Your API |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment