My access token after login is not well formed.
This is a fragmet of my payload.
“scope”: “openid , profile , read:posts,create:posts,delete:posts,update:posts”,
“permissions”:
as you can see openid and profile are divided by " , " but the others “,”. Now my spring boot backend can read only openid and profile scope. Can i format this in any way? Im using authorization extension.
this is my rule
function (user, context, callback) {
var permissions = user.permissions || [];
var requestedScopes = context.request.body.scope || context.request.query.scope;
requestedScopes.split(',').join(' ');
var filteredScopes = requestedScopes.split(' ').filter( function(x) {
return x.indexOf(':') < 0;
});
filteredScopes.push(permissions);
context.accessToken.scope = filteredScopes.join(' ');
callback(null, user, context);
}