0

I am using an OAuth plugin for cakephp (thomseddon/cakephp-oauth-server) which am having some issues with at them moment.

I want to be able to allow access to my cakephp Rest with two calls

provision - This just adds in a Client id into my table auth - using grant_type password I send over grant_type, username, password and client_id and return a access token.

Both these actions seem to be in working order and I am getting an access token back the problem is after I gain access I am still being kicked out by cakephp and redirected to the login page when I try an access one of the rest actions.

For example once I have an access key I send up a request to http://customer-server-2.dev/api/documents.json?access_token=xxxxxxxxxxxxxxxx

At this point I should have access because the access token is correct and works fine - but I don't I get redirected to the login in page.

If anyone can help me with this I would be eternally grateful.

1 Answer 1

1

There might be two problems

  1. Your access token may be expired.Get a new access token and check

  2. Check your scope when you are getting access token

Sign up to request clarification or add additional context in comments.

2 Comments

The access token is fine and still in date - however the scope comes back as null
Just looked into scope and yes that was the problem so thank you very much for that! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.