php - Symfony2 + Rest login + FOSUserBundle -
i don't understand how connect users using rest api.
for example can add new firewall
firewalls: api: pattern: ^/api anonymous: ~ form_login: false provider: fos_user_bundle http_basic: realm: "rest service realm" but don't understand how connect user.
and once connection successful, have send datas on each request prove user connected because there no cookies.
thanks
when use http based authentication (as http_basic param) authentication/authorization managed http headers.
the server send client header this:
www-authenticate: basic realm="rest service realm" that browsers alert user window thats ask user/password.
the client should send server header with:
authorization: basic {string} with string encoded base64("username:password")
every request must have header.
all described in rfc 2617
Comments
Post a Comment