OidcProviderConfig.CreateRequest

public static final class OidcProviderConfig.CreateRequest extends ProviderConfig.AbstractCreateRequest<T extends AbstractCreateRequest<T>>

A specification class for creating a new OIDC Auth provider.

Set the initial attributes of the new provider by calling various setter methods available in this class.

Public Constructor Summary

CreateRequest()
Creates a new OidcProviderConfig.CreateRequest, which can be used to create a new OIDC Auth provider.

Public Method Summary

OidcProviderConfig.CreateRequest
setClientId(String clientId)
Sets the client ID for the new provider.
OidcProviderConfig.CreateRequest
setClientSecret(String clientSecret)
Sets the client secret for the new provider.
OidcProviderConfig.CreateRequest
setCodeResponseType(boolean enabled)
Sets whether to enable the code response flow for the new provider.
OidcProviderConfig.CreateRequest
setIdTokenResponseType(boolean enabled)
Sets whether to enable the ID token response flow for the new provider.
OidcProviderConfig.CreateRequest
setIssuer(String issuer)
Sets the issuer for the new provider.
OidcProviderConfig.CreateRequest
setProviderId(String providerId)
Sets the ID for the new provider.

Inherited Method Summary

Public Constructors

public CreateRequest ()

Creates a new OidcProviderConfig.CreateRequest, which can be used to create a new OIDC Auth provider.

The returned object should be passed to createOidcProviderConfig(CreateRequest) to save the config.

Public Methods

public OidcProviderConfig.CreateRequest setClientId (String clientId)

Sets the client ID for the new provider.

Parameters
clientId A non-null, non-empty client ID string.
Throws
IllegalArgumentException If the client ID is null or empty.

public OidcProviderConfig.CreateRequest setClientSecret (String clientSecret)

Sets the client secret for the new provider. This is required for the code flow.

Parameters
clientSecret A non-null, non-empty client secret string.
Throws
IllegalArgumentException If the client secret is null or empty.

public OidcProviderConfig.CreateRequest setCodeResponseType (boolean enabled)

Sets whether to enable the code response flow for the new provider. By default, this is not enabled if no response type is specified.

A client secret must be set for this response type.

Having both the code and ID token response flows is currently not supported.

Parameters
enabled A boolean signifying whether the code response type is supported.

public OidcProviderConfig.CreateRequest setIdTokenResponseType (boolean enabled)

Sets whether to enable the ID token response flow for the new provider. By default, this is enabled if no response type is specified.

Having both the code and ID token response flows is currently not supported.

Parameters
enabled A boolean signifying whether the ID token response type is supported.

public OidcProviderConfig.CreateRequest setIssuer (String issuer)

Sets the issuer for the new provider.

Parameters
issuer A non-null, non-empty issuer URL string.
Throws
IllegalArgumentException If the issuer URL is null or empty, or if the format is invalid.

public OidcProviderConfig.CreateRequest setProviderId (String providerId)

Sets the ID for the new provider.

Parameters
providerId A non-null, non-empty provider ID string.
Throws
IllegalArgumentException If the provider ID is null or empty, or is not prefixed with 'oidc.'.