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 thebasic interface
. Implementations must be thread-safe.Claims sources can be:
- LDAP directories
- SQL or NoSQL databases
- Web services
- Files
-
-
Field Summary
Fields Modifier and Type Field Description static String
VERIFIED_CLAIM_NAME_PREFIX
Theverified:
prefix for names of verified claims.
-
Method Summary
All Methods Instance Methods Abstract Methods 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, ClaimsSourceRequestContext requestContext)
Requests claims for the specified subject.-
Methods inherited from interface com.nimbusds.openid.connect.provider.spi.claims.ClaimsSupport
supportedClaims
-
-
-
-
Field Detail
-
VERIFIED_CLAIM_NAME_PREFIX
static final String VERIFIED_CLAIM_NAME_PREFIX
Theverified:
prefix for names of verified claims.- See Also:
- Constant Field Values
-
-
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 benull
.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:". Notnull
.claimsLocales
- The preferred languages and scripts for the claims to return,null
if not specified.requestContext
- Provides access to additional parameters about the request. Notnull
.- Returns:
- The claims,
null
if the subject wasn't found or the claims source isdisabled
. - Throws:
Exception
- If retrieval of the claims failed.
-
-