Interface AdvancedClaimsSource

  • All Superinterfaces:
    ClaimsSupport, CommonClaimsSource, Lifecycle

    @ThreadSafe
    public interface AdvancedClaimsSource
    extends CommonClaimsSource
    Advanced Service Provider Interface (SPI) for sourcing OpenID Connect UserInfo and other claims about a subject (end-user). This interface is intended for claims sources that require access to additional parameters, such as the client identifier (client_id); if that's not needed stick to the basic interface. Implementations must be thread-safe.

    Claims sources can be:

    • LDAP directories
    • SQL or NoSQL databases
    • Web services
    • Files
    • Method Detail

      • getClaims

        com.nimbusds.openid.connect.sdk.claims.UserInfo getClaims​(com.nimbusds.oauth2.sdk.id.Subject subject,
                                                                  Set<String> claims,
                                                                  @Nullable List<com.nimbusds.langtag.LangTag> claimsLocales,
                                                                  ClaimsSourceRequestContext requestContext)
                                                           throws Exception
        Requests claims for the specified subject.
        Parameters:
        subject - The subject. Must not be null.
        claims - The names of the requested claims, with optional language tags. The names of verified claims (OpenID Connect for Identity Assurance 1.0) are prefixed with "verified:". Not null.
        claimsLocales - The preferred languages and scripts for the claims to return, null if not specified.
        requestContext - Provides access to additional parameters about the request. Not null.
        Returns:
        The claims, null if the subject wasn't found or the claims source is disabled.
        Throws:
        Exception - If retrieval of the claims failed.