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 Summary

    Modifier and Type
    Method
    Description
    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)
    Requests claims for the specified subject.

    Methods inherited from interface com.nimbusds.openid.connect.provider.spi.claims.ClaimsSupport

    supportedClaims

    Methods inherited from interface com.nimbusds.openid.connect.provider.spi.Lifecycle

    init, isEnabled, shutdown
  • Method Details

    • 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) 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.