Reputation: 4412
In WSO2 Identity Server , I tried to associate scope with roles/users so that I can authorize them the access to API's if the scopes match. But no place i can see that. I am using node js in my back end.
I want to achieve something like below app.get('/deleteUser', authenticate({scope:'admin'}), function(req,res){
So that only those users[tokens] having the scopes 'admin' should be able to access deleteUser .How to achieve this user/role mapping to scope in WSO2 Identity server?
Upvotes: 1
Views: 932
Reputation: 8233
WSO2 Identity Server doesn't have a scope validation logic by default. You will have to customize using OAuthScopeValidator
As @Jenananthan has already pointed out, WSO2 API Manager could be used for your use case.
Upvotes: 1
Reputation: 1401
I am not sure whether wso2 identity server support user/role mapping to scope. But for your use case I think you can use wso2 apimanager which handle role mapping with scope http://nuwanzone.blogspot.com/2014/06/oauth-20-scopes-with-wso2-api-manager.html
Upvotes: 2