Hi

Target WSO2 product is the WSO2 IS 5.3 and/or API manager 2.1

I am currently implementing a set of custom grant types and one grant type is based on the the existing PasswordGrantHandler. The goal is to check in addition to the username, password and scope an additional, optional request parameter. If this parameter exists, a special response header should be added. So far, so good.

But it does not work. I have extended the PasswordGrantHandler and check the 
requestParamers in the DTO like here:

public class MyPasswordGrantHandler extends PasswordGrantHandler {

    @Override
    public boolean validateGrant(OAuthTokenReqMessageContext 
oAuthTokenReqMessageContext)
                throws IdentityOAuth2Exception {
        // this returns null
        
oAuthTokenReqMessageContext.getOauth2AccessTokenReqDTO().getRequestParameters()

        final boolean authStatus = 
super.validateGrant(oAuthTokenReqMessageContext);

        if (authStatus) {
                // ....
        }

        return authStatus;
    }
}

This works perfectly for other, self-implemented grant handlers, but not for this one as long as it is registered it in the identity.xml under the GrantTypeName = password. If I choose a different name, the same implementation works as expected.

Any ideas, whats going on under the hood? In the sources I havent found any 
hints.

Br & Thanks
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to