Strongloop authorization and authentication

I am using Strongloop. Strongloop provides a built-in User model. I want to extend User model to persist in Mongodb. Also I want to make authenticated requests after the user is logged in. By authenticated requests I mean when a user logs into an access token and that access token is required to handle additional APIs for different models.

The tutorials aren't very helpful.

+3


source to share


2 answers


I was able to create an access token for an extended user model and create a user in mongodb. Also I inherited the role object the same as the user. I create a "creator" role and save it to mongo. I also inherited the rolemapping model to extend it to mongo. Now when I try to assign a user to this "creator" role, the user gets the assigned role, but the extended role mapping does not have any object. I want to assign a user this "creator" role and then grant permissions to other models based on that role? How to do it?



0


source


User.settings.acls.push({
    'accessType': 'EXECUTE',
    'principalType': 'ROLE',
    'principalId': '$everyone',
    'permission': 'ALLOW',
    'property': 'replacePassword'
})

      



directly add acl to acls

-1


source







All Articles