Package org.forgerock.openidconnect
Class ClientBuilder
- java.lang.Object
-
- org.forgerock.openidconnect.ClientBuilder
-
public class ClientBuilder extends Object
Builds a OAuth2 Client.- Since:
- 11.0.0
-
-
Constructor Summary
Constructors Constructor Description ClientBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ClientcreateClient()Creates the OAuth2 Client.ClientBuildersetAccessToken(String accessToken)Sets the registration access token of the OAuth2Client.ClientBuildersetAccessTokenLifeTime(Long accessTokenLifeTime)Sets the Access token lifetime.ClientBuildersetAllowedGrantScopes(List<String> allowedGrantScopes)Sets the allowed scopes of the OAuth2Client.ClientBuildersetApplicationType(String applicationType)Sets the application type of the OAuth2Client.ClientBuildersetAuthorizationCodeLifeTime(Long authorizationCodeLifeTime)Sets the authorization code lifetime.ClientBuildersetClientID(String clientID)Sets the client id of the OAuth2Client.ClientBuildersetClientName(List<String> clientName)Sets the client_name of the OAuth2ClientClientBuildersetClientSecret(String clientSecret)Sets the client secret of the OAuth2Client.ClientBuildersetClientSessionURI(String clientSessionURI)Sets the client session uri of the OAuth2Client.ClientBuildersetClientType(String clientType)Sets the client type of the OAuth2Client.ClientBuildersetContacts(List<String> contacts)ClientBuildersetDefaultGrantScopes(List<String> defaultGrantScopes)Sets the default scopes of the OAuth2Client.ClientBuildersetDefaultMaxAge(Long defaultMaxAge)Sets the default max age on the OAuth2Client.ClientBuildersetDefaultMaxAgeEnabled(Boolean defaultMaxAgeEnabled)Sets whether to enforce the default max age.ClientBuildersetDisplayDescription(List<String> displayDescription)Sets the client description of the OAuth2Client.ClientBuildersetDisplayName(List<String> displayName)Sets the display name of the OAuth2Client.ClientBuildersetIdTokenSignedResponseAlgorithm(String idTokenSignedResponseAlgorithm)Sets the id token signed response alg of the OAuth2Client.ClientBuildersetJwks(String jwks)Sets the JWKs value.ClientBuildersetJwksUri(String jwksUri)Sets the JWKs URI value.ClientBuildersetJwtTokenLifeTime(Long jwtTokenLifeTime)Sets the JWT token lifetime.ClientBuildersetPostLogoutRedirectionURIs(List<String> postLogoutRedirectionURIs)Sets the post logout redirection URIs of the OAuth2Client.ClientBuildersetPublicKeySelector(String selector)Sets the public key selector.ClientBuildersetRedirectionURIs(List<String> redirectionURIs)Sets the redirection uris of the OAuth2Client.ClientBuildersetRefreshTokenLifeTime(Long refreshTokenLifeTime)Sets the Refresh token lifetime.ClientBuildersetResponseTypes(List<String> responseTypes)Sets the response types of the OAuth2Client.ClientBuildersetSectorIdentifierUri(String sectorIdentifierUri)Sets the sector identifier uri.ClientBuildersetSubjectType(String subjectType)Sets the subject type of the OAuth2Client.ClientBuildersetTokenEndpointAuthMethod(String tokenEndpointAuthMethod)Sets the token endpoint auth method value.ClientBuildersetX509(String x509)Sets the X509 value.
-
-
-
Method Detail
-
setClientID
public ClientBuilder setClientID(String clientID)
Sets the client id of the OAuth2Client.- Parameters:
clientID- The client id.
-
setClientType
public ClientBuilder setClientType(String clientType)
Sets the client type of the OAuth2Client.- Parameters:
clientType- The client type.
-
setRedirectionURIs
public ClientBuilder setRedirectionURIs(List<String> redirectionURIs)
Sets the redirection uris of the OAuth2Client.- Parameters:
redirectionURIs- The redirection uris.
-
setAllowedGrantScopes
public ClientBuilder setAllowedGrantScopes(List<String> allowedGrantScopes)
Sets the allowed scopes of the OAuth2Client.- Parameters:
allowedGrantScopes- The allowed scopes.
-
setDefaultGrantScopes
public ClientBuilder setDefaultGrantScopes(List<String> defaultGrantScopes)
Sets the default scopes of the OAuth2Client.- Parameters:
defaultGrantScopes- The default scopes.
-
setDisplayName
public ClientBuilder setDisplayName(List<String> displayName)
Sets the display name of the OAuth2Client.- Parameters:
displayName- The display name.
-
setDisplayDescription
public ClientBuilder setDisplayDescription(List<String> displayDescription)
Sets the client description of the OAuth2Client.- Parameters:
displayDescription- The client description.
-
setClientName
public ClientBuilder setClientName(List<String> clientName)
Sets the client_name of the OAuth2Client- Parameters:
clientName- the client_name to set.
-
setSubjectType
public ClientBuilder setSubjectType(String subjectType)
Sets the subject type of the OAuth2Client.- Parameters:
subjectType- The subject type.
-
setIdTokenSignedResponseAlgorithm
public ClientBuilder setIdTokenSignedResponseAlgorithm(String idTokenSignedResponseAlgorithm)
Sets the id token signed response alg of the OAuth2Client.- Parameters:
idTokenSignedResponseAlgorithm- The id token signed response alg.
-
setPostLogoutRedirectionURIs
public ClientBuilder setPostLogoutRedirectionURIs(List<String> postLogoutRedirectionURIs)
Sets the post logout redirection URIs of the OAuth2Client.- Parameters:
postLogoutRedirectionURIs- The post logout redirection URIs.
-
setAccessToken
public ClientBuilder setAccessToken(String accessToken)
Sets the registration access token of the OAuth2Client.- Parameters:
accessToken- The registration access token.
-
setClientSessionURI
public ClientBuilder setClientSessionURI(String clientSessionURI)
Sets the client session uri of the OAuth2Client.- Parameters:
clientSessionURI- The client session uri.
-
setContacts
public ClientBuilder setContacts(List<String> contacts)
- Parameters:
contacts- The contact information for the clients- Returns:
-
setApplicationType
public ClientBuilder setApplicationType(String applicationType)
Sets the application type of the OAuth2Client.- Parameters:
applicationType- The application type.
-
setClientSecret
public ClientBuilder setClientSecret(String clientSecret)
Sets the client secret of the OAuth2Client.- Parameters:
clientSecret- The client's secret.
-
setResponseTypes
public ClientBuilder setResponseTypes(List<String> responseTypes)
Sets the response types of the OAuth2Client.- Parameters:
responseTypes- The response types.
-
setDefaultMaxAge
public ClientBuilder setDefaultMaxAge(Long defaultMaxAge)
Sets the default max age on the OAuth2Client.- Parameters:
defaultMaxAge- The default max age, in seconds.
-
setDefaultMaxAgeEnabled
public ClientBuilder setDefaultMaxAgeEnabled(Boolean defaultMaxAgeEnabled)
Sets whether to enforce the default max age.- Parameters:
defaultMaxAgeEnabled- Whether to enforce the default max age.
-
setTokenEndpointAuthMethod
public ClientBuilder setTokenEndpointAuthMethod(String tokenEndpointAuthMethod)
Sets the token endpoint auth method value.- Parameters:
tokenEndpointAuthMethod- token endpoint auth method this client uses.
-
setJwks
public ClientBuilder setJwks(String jwks)
Sets the JWKs value.- Parameters:
jwks- jwks containing valid public keys.
-
setJwksUri
public ClientBuilder setJwksUri(String jwksUri)
Sets the JWKs URI value.- Parameters:
jwksUri- URL containing JWKs of valid public keys.
-
setX509
public ClientBuilder setX509(String x509)
Sets the X509 value.- Parameters:
x509- Public key certificate.
-
setPublicKeySelector
public ClientBuilder setPublicKeySelector(String selector)
Sets the public key selector.- Parameters:
selector- Which of the public key types to use.
-
setSectorIdentifierUri
public ClientBuilder setSectorIdentifierUri(String sectorIdentifierUri)
Sets the sector identifier uri.- Parameters:
sectorIdentifierUri- identifier uri to be used when pairwise.
-
setAuthorizationCodeLifeTime
public ClientBuilder setAuthorizationCodeLifeTime(Long authorizationCodeLifeTime)
Sets the authorization code lifetime.- Parameters:
authorizationCodeLifeTime- Authorization code lifetime.
-
setAccessTokenLifeTime
public ClientBuilder setAccessTokenLifeTime(Long accessTokenLifeTime)
Sets the Access token lifetime.- Parameters:
accessTokenLifeTime- Access token lifetime.
-
setRefreshTokenLifeTime
public ClientBuilder setRefreshTokenLifeTime(Long refreshTokenLifeTime)
Sets the Refresh token lifetime.- Parameters:
refreshTokenLifeTime- Refresh token lifetime.
-
setJwtTokenLifeTime
public ClientBuilder setJwtTokenLifeTime(Long jwtTokenLifeTime)
Sets the JWT token lifetime.- Parameters:
jwtTokenLifeTime- JWT token lifetime.
-
createClient
public Client createClient()
Creates the OAuth2 Client.- Returns:
- The OAuth2 Client.
-
-