我遇到问题" login_check"我使用Symfony 3和LexikJWTAuthenticationBundle。
问题:
security.yml:
firewalls:
login:
pattern: ^/api/login
stateless: true
anonymous: true
form_login:
username_parameter: username
password_parameter: password
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
stateless: true
guard:
authenticators:
- lexik_jwt_authentication.jwt_token_authenticator
main:
anonymous: true
access_control:
- {path: ^/api/login, roles: IS_AUTHENTICATED_ANONYMOUSLY }
- {path: ^/api, roles: IS_AUTHENTICATED_FULLY }
routing.yml:
app:
resource: '@AppBundle/Controller/'
type: rest
prefix: /api
login_check: 路径:api / login_check
请帮帮我吗?
美好的一天:)
答案 0 :(得分:0)
使用以下命令更改路由文件:
app:
resource: '@AppBundle/Controller/'
type: rest
prefix: /api
api_login_check:
path: /api/login_check