在AWS Cognito中,将用户添加到组中。我用弹簧靴和角靴。 使用Cognito AWS进行身份验证后,如何获得JWT令牌? 我需要对令牌进行解码才能获得用户组。
我想获得这个值:
{
"sub": "a18626f5-a011-454a-b4c2-6969b3155c24",
"cognito:groups": [
"uw-app-administrator",
"uw-app-user"
],
"email_verified": true,
"iss": "https://cognito-idp.<region>.amazonaws.com/<user-pool-id>",
"cognito:username": "<my-user-name>",
"given_name": "<my-first-name>",
"aud": "<audience-code>",
"token_use": "id",
"auth_time": 1493918449,
"nickname": "Bubbles",
"exp": 1493922049,
"iat": 1493918449,
"email": "<my-email>"
}