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
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)
Requests claims for the specified subject.-
Methods inherited from interface com.nimbusds.openid.connect.provider.spi.claims.ClaimsSupport
supportedClaims
-
-
-
-
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) 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. Must not benull
.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 isdisabled
. - Throws:
Exception
- If retrieval of the claims failed.
-
-