【问题标题】:Getting the field issuedFor from SecurityIdentity using OIDC and KeyCloak使用 OIDC 和 KeyCloak 从 SecurityIdentity 获取字段 issueFor
【发布时间】:2021-06-09 11:27:40
【问题描述】:

我正在使用 OIDC 和 KeyCloak Quarkus 扩展。

目前,我像这样访问令牌信息:

@Inject org.eclipse.microprofile.jwt.JsonWebToken tokenMicroProfile;
@Inject SecurityIdentity securityIdentity;

我在这些抽象中找不到issuedFor 字段。这似乎有我需要的。

@Inject org.keycloak.representations.JsonWebToken tokenKeyCloak;

但是注入失败。那么,如何使用 quarkus-oidc 获取信息呢?

【问题讨论】:

    标签: keycloak quarkus oid quarkus-oidc


    【解决方案1】:

    您可以使用tokenMicroProfile.getClaim("azp")tokenMicroProfile.getClaim(Claims.azp)

    【讨论】:

      猜你喜欢
      • 2023-02-02
      • 2020-12-24
      • 2020-05-11
      • 2021-12-08
      • 1970-01-01
      • 2022-07-07
      • 2020-08-14
      • 2020-06-24
      • 2022-11-17
      相关资源
      最近更新 更多