问题
I'm trying to receive a JWT access_token from WSO2 Identity Server when logging in with password grant_type. But I can't find any way to configure this. When I sign in I get a guid as access_token.
I found this, but this is the way to get the access_token guid when you have a JWT: https://docs.wso2.com/display/ISCONNECTORS/Configuring+JWT+Grant+Type
Also I enable JWT Token generation using this tutorial, but I'm still receiving the guid: https://docs.wso2.com/display/IS510/JWT+Token+Generation
When I set true in identity.xml I get a base64 hashed access_token, but this is not in JWT format.
Has anyone figured this out?
回答1:
You can use OpenID connect to get a JWT. [1] shows how to configure OIDC in Identity Server. I think you already have done that. So try sending scope=openid along with the token request.
Also, check [2] for a known bug and workaround related to OIDC in Identity Server 5.2.0
[1] https://docs.wso2.com/pages/viewpage.action?pageId=50514076
[2] WSO2 IS: OpenID Connect custom claims in 5.2.0?
回答2:
you may want to follow this blog to generate JWT access token with WSO2 IS
also, you might want to follow this link to push the database schema changes into effect
来源:https://stackoverflow.com/questions/40255523/wso2-identity-server-jwt-access-token