Interface ClaimsSource

  • All Superinterfaces:
    ClaimsSupport, CommonClaimsSource, Lifecycle

    @ThreadSafe
    public interface ClaimsSource
    extends CommonClaimsSource
    Service Provider Interface (SPI) for sourcing OpenID Connect UserInfo and other claims about a subject (end-user). 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,
                                                                  List<com.nimbusds.langtag.LangTag> claimsLocales)
                                                           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. Must not be null.
        claimsLocales - The preferred languages and scripts for the claims to return, null if not specified.
        Returns:
        The claims, null if the subject wasn't found or the claims source is disabled.
        Throws:
        Exception - If retrieval of the claims failed.