Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- security:
- encoders:
- AppSecurityUserWebserviceUser: bcrypt
- role_hierarchy:
- ROLE_ADMIN: ROLE_USER
- ROLE_SUPER_ADMIN: ROLE_ADMIN
- providers:
- webservice:
- id: AppSecurityUserWebserviceUserProvider
- jwt:
- lexik_jwt:
- class: AppSecurityUserWebserviceUser
- firewalls:
- dev:
- pattern: ^/(_(profiler|wdt)|css|images|js)/
- security: false
- login:
- pattern: ^/login
- stateless: true
- anonymous: true
- provider: webservice
- json_login:
- check_path: /login_check
- success_handler: lexik_jwt_authentication.handler.authentication_success
- failure_handler: lexik_jwt_authentication.handler.authentication_failure
- client_list:
- pattern: ^/api/client/active
- stateless: true
- anonymous: true
- secured_area:
- pattern: ^/api/
- provider: webservice
- stateless: true
- guard:
- authenticators:
- - lexik_jwt_authentication.jwt_token_authenticator
- access_control:
- - { path: ^/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- - { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
- - { path: ^/api/client/active, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- $ openssl genrsa -out config/jwt/private.pem -aes256 4096
- Enter pass phrase for config/jwt/private.pem:
- Verifying - Enter pass phrase for config/jwt/private.pem:
- $ openssl rsa -pubout -in config/jwt/private.pem -out config/jwt/public.pem
- Enter pass phrase for config/jwt/private.pem:
- writing RSA key
- $ curl -X POST -H "Content-Type: application/json" http://localhost:8000/login_check -d '{"username":"Pete","password":"password"}'
- {"code":401,"message":"Bad credentials"}
- openssl genpkey -algorithm RSA -out config/jwt/private.pem -pkeyopt rsa_keygen_bits:4096
- openssl rsa -pubout -in config/jwt/private.pem -out /config/jwt/public.pem
Add Comment
Please, Sign In to add comment