Add scope validator

4.x.x
Janak Amarasena 8 years ago
parent a9a246c2c4
commit 848c219efe

@ -21,6 +21,7 @@ package org.wso2.carbon.device.mgt.oauth.extensions.handlers.grant;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.wso2.carbon.apimgt.keymgt.ScopesIssuer;
import org.wso2.carbon.identity.application.authentication.framework.model.AuthenticatedUser;
import org.wso2.carbon.identity.application.common.IdentityApplicationManagementException;
import org.wso2.carbon.identity.application.common.model.ServiceProvider;
@ -57,6 +58,11 @@ public class AccessTokenGrantHandler extends AbstractAuthorizationGrantHandler {
}
}
@Override
public boolean validateScope(OAuthTokenReqMessageContext tokReqMsgCtx) {
return ScopesIssuer.getInstance().setScopes(tokReqMsgCtx);
}
@Override
public boolean validateGrant(OAuthTokenReqMessageContext tokReqMsgCtx) throws IdentityOAuth2Exception {
if (!super.validateGrant(tokReqMsgCtx)) {

Loading…
Cancel
Save