Jac*_*phy 9 keycloak keycloak-services
我正在查看新的 Keycloak Beta 4 API。当我获取用户帐户信息时,Web ui 中称为“id”的内容在帐户对象中返回为“sub”。
{ sub: '25a37fd0-d10e-40ca-af6c-821f20e01be8',
name: 'Barrack Obama',
preferred_username: 'obama@whitehouse.gov',
given_name: 'Barrack',
family_name: 'Obama',
email: 'obama@whitehouse.gov' }
Run Code Online (Sandbox Code Playgroud)
什么是“sub”,这是将数据库对象映射到的安全 uuid 吗?
根据keycloak文档
Action Token 剖析
操作令牌是使用活动领域密钥签名的标准 Json Web 令牌,其中有效负载包含多个字段:
typ - Identification of the action (e.g. verify-email)
iat and exp - Times of token validity
sub - ID of the user
azp - Client name
iss - Issuer - URL of the issuing realm
aud - Audience - list containing URL of the issuing realm
asid - ID of the authentication session (optional)
nonce - Random nonce to guarantee uniqueness of use if the operation can only be executed once (optional)
Run Code Online (Sandbox Code Playgroud)
请参考以下链接https://www.keycloak.org/docs/latest/server_development/index.html#_action_token_anatomy
原因可能是他们希望保留名称的唯一性。
| 归档时间: |
|
| 查看次数: |
2499 次 |
| 最近记录: |