sdiaz / FOSRestBundleByExample

FOSRestBundle example project with Symfony 2.6 standard distribution
MIT License
106 stars 31 forks source link

First access failed because authentication #19

Open aungyin opened 9 years ago

aungyin commented 9 years ago

Error Message is as below,

{"code":401,"message":"Unauthorized"}

What is the problem here. Can you suggest any solution? Please.

KhanMaytok commented 9 years ago

I have the problem too. I go to the token section, generate the token and I get this;

{
  "X-WSSE": "UsernameToken Username=\"admin\", PasswordDigest=\"Wxn1WmPFn2b7zkKwr3K7YKHvqNw=\", Nonce=\"MDdmYTY5ZjFiM2UzYzg1ZA==\", Created=\"2015-05-21T00:15:55-05:00\""
}

Then, I go to /api/v1/users.json and set the headers:

X-wsse: UsernameToken Username="admin", PasswordDigest="Wxn1WmPFn2b7zkKwr3K7YKHvqNw=", Nonce="MDdmYTY5ZjFiM2UzYzg1ZA==", Created="2015-05-21T00:15:55-05:00"
Authorization: WSSE profile="UsernameToken"
Accept: application/json

Then I send a get request. But I have an 401 error. What is the correct flow?

KhanMaytok commented 9 years ago

I create a pull request to solve it (ad44506)

sdiaz commented 9 years ago

I have merged (ad44506)

wujku commented 9 years ago

31de04c3ef5a93e2f76eefcd84869f3e2d61c37b the problem occurs again.

{"code":401,"message":"You are not authenticated"}
robbanl commented 8 years ago

Ping @sdiaz

robbanl commented 8 years ago

@wujku Did you ever solve this?

KhanMaytok commented 8 years ago

It can be solved modifing the firewall route

robbanl commented 8 years ago

@SakyaStelios Tried modifying like in your previous pull request, but still same error.

jokari4242 commented 8 years ago

I have same error. How can it be solved ? Thanks

skyjooy commented 7 years ago

I have the same error. Any help or solution ? Thx

skyjooy commented 7 years ago

@robbanl Do you have find a issue ? I have the same problem. Thx

robbanl commented 7 years ago

@skyjooy Nope, unfortunately not :( I remember I changed bundle to some other bundle, but can't remember what bundle :(