public static final class

OidcProviderConfig.UpdateRequest

extends ProviderConfig.AbstractUpdateRequest<T extends AbstractUpdateRequest<T>>
java.lang.Object
   ↳ com.google.firebase.auth.ProviderConfig.AbstractUpdateRequest<T extends com.google.firebase.auth.ProviderConfig.AbstractUpdateRequest<T>>
     ↳ com.google.firebase.auth.OidcProviderConfig.UpdateRequest

Class Overview

A specification class for updating an existing OIDC Auth provider.

An instance of this class can be obtained via a OidcProviderConfig object, or from a provider ID string. Specify the changes to be made to the provider config by calling the various setter methods available in this class.

Summary

Public Constructors
UpdateRequest(String providerId)
Creates a new OidcProviderConfig.UpdateRequest, which can be used to updates an existing OIDC Auth provider.
Public Methods
OidcProviderConfig.UpdateRequest setClientId(String clientId)
Sets the client ID for the exsting provider.
OidcProviderConfig.UpdateRequest setClientSecret(String clientSecret)
Sets the client secret for the new provider.
OidcProviderConfig.UpdateRequest setCodeResponseType(boolean enabled)
Sets whether to enable the code response flow for the new provider.
OidcProviderConfig.UpdateRequest setIdTokenResponseType(boolean enabled)
Sets whether to enable the ID token response flow for the new provider.
OidcProviderConfig.UpdateRequest setIssuer(String issuer)
Sets the issuer for the existing provider.
[Expand]
Inherited Methods
From class com.google.firebase.auth.ProviderConfig.AbstractUpdateRequest
From class java.lang.Object

Public Constructors

public UpdateRequest (String providerId)

Creates a new OidcProviderConfig.UpdateRequest, which can be used to updates an existing OIDC Auth provider.

The returned object should be passed to updateOidcProviderConfig(UpdateRequest) to save the updated config.

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.".

Public Methods

public OidcProviderConfig.UpdateRequest setClientId (String clientId)

Sets the client ID for the exsting provider.

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

public OidcProviderConfig.UpdateRequest 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.UpdateRequest 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.UpdateRequest 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.UpdateRequest setIssuer (String issuer)

Sets the issuer for the existing 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.