public interface ClaimsSource
| Modifier and Type | Method and Description |
|---|---|
com.nimbusds.openid.connect.sdk.claims.UserInfo |
getClaims(com.nimbusds.oauth2.sdk.id.Subject subject,
Set<String> claims,
List<com.nimbusds.langtag.LangTag> claimsLocales)
Requests claims for the specified subject.
|
void |
init(InitContext initContext)
Initialises the OpenID Connect claims source.
|
boolean |
isEnabled()
Checks if the OpenID Connect claims source is enabled.
|
void |
shutdown()
Shuts down the OpenID Connect claims source.
|
Set<String> |
supportedClaims()
Returns the names of the supported OpenID Connect claims.
|
void init(InitContext initContext) throws Exception
initContext - The initialisation context. Can be used to
retrieve a configuration file required to set up
the claims source, e.g. the parameters to
establish a database connection. Not
null.Exception - If initialisation failed.boolean isEnabled()
true if the claims source is enabled, else
false.Set<String> supportedClaims()
Example:
name email email_verified
sub (subject) claim name.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
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.null if the subject wasn't found or the
claims source is disabled.Exception - If retrieval of the claims failed.Copyright © 2014 NimbusDS. All Rights Reserved.