FOSRestBundleByExample icon indicating copy to clipboard operation
FOSRestBundleByExample copied to clipboard

First access failed because authentication

Open aungyin opened this issue 10 years ago • 12 comments

Error Message is as below,

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

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

aungyin avatar Apr 08 '15 08:04 aungyin

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 avatar May 21 '15 05:05 KhanMaytok

I create a pull request to solve it (ad44506)

KhanMaytok avatar May 21 '15 08:05 KhanMaytok

I have merged (ad44506)

sdiaz avatar May 24 '15 10:05 sdiaz

31de04c3ef5a93e2f76eefcd84869f3e2d61c37b the problem occurs again.

{"code":401,"message":"You are not authenticated"}

wujku avatar Aug 28 '15 21:08 wujku

Ping @sdiaz

robbanl avatar Sep 25 '15 18:09 robbanl

@wujku Did you ever solve this?

robbanl avatar Sep 25 '15 18:09 robbanl

It can be solved modifing the firewall route

KhanMaytok avatar Sep 26 '15 04:09 KhanMaytok

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

robbanl avatar Sep 26 '15 20:09 robbanl

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

jokari4242 avatar Nov 25 '15 02:11 jokari4242

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

skyjooy avatar Oct 13 '16 18:10 skyjooy

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

skyjooy avatar Oct 13 '16 18:10 skyjooy

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

robbanl avatar Oct 13 '16 18:10 robbanl