WSO2IS 5.10 custom JWT token issuer not listed in Service Provider configuration

Viewed 140

in WSO2IS 5.7 I used to utilize a custom JWT token issuer by deploying its jar file into wso2is_home/repository/components/lib, then changing the OAuth section in identity.xml file at the IdentityOAuthTokenGenerator element with my custom token issuer's class:

<OAuth>
  ...
  <!--<IdentityOAuthTokenGenerator>org.wso2.carbon.identity.oauth2.token.JWTTokenIssuer</IdentityOAuthTokenGenerator>-->
  <IdentityOAuthTokenGenerator>it.smartcity.wso2.jwt_generator.CustomTokenIssuer</IdentityOAuthTokenGenerator>
  ...
</OAuth>

restarting the server. Then I was able to see it in the Service Provider configuration:

enter image description here

With WSO2IS 5.10, besides putting the jar in the components/lib folder, I edited only the deployment.toml file, adding the following:

[oauth.extensions]
token_generator = "it.smartcity.wso2.jwt_generator.CustomTokenIssuer"

as described here https://is.docs.wso2.com/en/latest/learn/extension-points-for-oauth/#oauth-token-generator but it just doesn't work.

I can't see my token issuer in the Service Provider screen.

Is there anything else I should do?

1 Answers

You can add custom token issuers in the following way in 5.10.0 instead of token_generator.

[[oauth.extensions.token_types]]
name = "CustomTokenIssuer"
issuer = "it.smartcity.wso2.jwt_generator.CustomTokenIssuer"
persist_access_token_alias = true

Ref: https://github.com/wso2/docs-is/issues/1140

Related