Authorization token: simple oauth

2018-04-10 18:33:25

I am in Drupal 8.

This is what I did:

Enable simple oauth and rest ui for get a json with the information of the node node/1?_format=json

Status: 200 OK

Everything perfect.

Now, I set the permissions: View published content just for Authenticated User. This is what i got:

Status 403 Forbidden

Perfect!

Now, try to get the authorization from the oauth/token and it gives me this:

{

"token_type": "Bearer",

"expires_in": 3000,

"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsImp0aSI6IjZmMzI1ZDM5ZTlmMjhiYjZmMGI1ODQzZDZhNGEzYjU0NTU5YThkZjE3OGUwZDM0MGYwMjM3MWI4YmZmNWZlOGM0YmVmMzU0YWFlNmNlNzJlIn0.eyJhdWQiOiJmMDExY2M1OC00MGNlLTQzYTktOGY3MS04NDI0OTRlM2E5OTciLCJqdGkiOiI2ZjMyNWQzOWU5ZjI4YmI2ZjBiNTg0M2Q2YTRhM2I1NDU1OWE4ZGYxNzhlMGQzNDBmMDIzNzFiOGJmZjVmZThjNGJlZjM1NGFhZTZjZTcyZSIsImlhdCI6MTUyMzM4MjI4NSwibmJmIjoxNTIzMzgyMjg1LCJleHAiOjE1MjMzODUyODUsInN1YiI6IjIiLCJzY29wZXMiOlsiYXV0aGVudGljYXRlZCIsImFuZ3VkcnUiXX0.e8iwmHrpOF6f8yhvy2RTlpJuhSQtJkxvNB9IvRccwluv3OS5hjXU4