I am using Laravel with the Auth0 PHP SDK and the Laravel plugin. With below rule to attach roles, permissions and groups to users:
function (user, context, callback) {
context.idToken['https://NAME.auth0.com/claims/authorization/roles'] = user.roles;
context.idToken['https://NAME.auth0.com/claims/authorization/permissions'] = user.permissions;
context.idToken['https://NAME.auth0.com/claims/authorization/groups'] = user.groups;
callback(null, user, context);
}
When reading the value of the idToken to get a users permissions in Laravel like so:
$permissions = \App::make('auth0')
->getUser()['profile']['https://NAME:auth0:com/claims/authorization/permissions'];
the index in the array 'https://NAME:auth0:com/claims/authorization/permissions'
does not have dots (.) anymore but they are replaced by colons (:). Any idea what is going on here?