OAuthProvider.Builder

public class OAuthProvider.Builder


Class used to create instances of OAuthProvider.

Summary

Public methods

@NonNull OAuthProvider.Builder
addCustomParameter(@NonNull String paramKey, @NonNull String paramValue)

Configures custom parameters to be passed to the identity provider during the OAuth sign-in flow.

@NonNull OAuthProvider.Builder

Similar to addCustomParameter, this takes a Map and adds each entry to the set of custom parameters to be passed.

@NonNull OAuthProvider

Returns an OAuthProvider created from this Builder.

@NonNull OAuthProvider.Builder

Sets the OAuth 2 scopes to be presented to the user during their sign-in flow with the identity provider.

Public methods

addCustomParameter

public @NonNull OAuthProvider.Builder addCustomParameter(@NonNull String paramKey, @NonNull String paramValue)

Configures custom parameters to be passed to the identity provider during the OAuth sign-in flow. Calling this method multiple times will add to the set of custom parameters being passed, rather than overwriting them (as long as key values don't collide).

Parameters
@NonNull String paramKey

the name of the custom parameter

@NonNull String paramValue

the value of the custom parameter

addCustomParameters

public @NonNull OAuthProvider.Builder addCustomParameters(@NonNull Map<StringString> customParameters)

Similar to addCustomParameter, this takes a Map and adds each entry to the set of custom parameters to be passed. Calling this method multiple times will add to the set of custom parameters being passed, rather than overwriting them (as long as key values don't collide).

Parameters
@NonNull Map<StringString> customParameters

a dictionary of custom parameter names and values to be passed to the identity provider as part of the sign-in flow.

build

public @NonNull OAuthProvider build()

Returns an OAuthProvider created from this Builder.

setScopes

public @NonNull OAuthProvider.Builder setScopes(@NonNull List<String> scopes)

Sets the OAuth 2 scopes to be presented to the user during their sign-in flow with the identity provider.