Search code examples
wso2-api-managerwso2-identity-server

WSO2 APIM: Can we disable Refresh Token generation with authorizaton_code grant


In API manager, when client request for access token using authorization code grant, the refresh token is generated by default. Can we change this so that API Manager does not generate refresh token with authorization code grant.

Thank you very much


Solution

  • Thanks @Gayan for link to the document. After looking at the source code referred, I found that Refresh Token generation can be disabled globally by commenting out this section in repository\conf\identity\identity.xml

            <!--
            <SupportedGrantType>
                <GrantTypeName>refresh_token</GrantTypeName>
                <GrantTypeHandlerImplClass>org.wso2.carbon.identity.oauth2.token.handlers.grant.RefreshGrantHandler</GrantTypeHandlerImplClass>
            </SupportedGrantType>
            -->