Interface OAuth
-
- All Implemented Interfaces:
public interface OAuthThe OAuth interface provides methods for authenticating a user, via the supported OAuth providers, provided you have configured them within your Stytch Dashboard.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public interfaceOAuth.ProviderAn interface describing the methods and parameters available for starting an OAuth or OAuth discovery flow for a specific provider
public interfaceOAuth.ProviderDiscoveryAn interface describing the methods and parameters available for starting an OAuth discovery flow for a specific provider
public interfaceOAuth.DiscoveryAn interface describing the parameters and methods available for authenticating an OAuth Discovery flow
public final classOAuth.AuthenticateParametersA data class wrapping the parameters necessary to authenticate an OAuth flow
-
Method Summary
Modifier and Type Method Description abstract UnitsetOAuthReceiverActivity(ComponentActivity activity)abstract StytchResult<OAuthAuthenticateResponseData>authenticate(OAuth.AuthenticateParameters parameters)Authenticate an OAuth flow abstract Unitauthenticate(OAuth.AuthenticateParameters parameters, Function1<StytchResult<OAuthAuthenticateResponseData>, Unit> callback)Authenticate an OAuth flow abstract CompletableFuture<StytchResult<OAuthAuthenticateResponseData>>authenticateCompletable(OAuth.AuthenticateParameters parameters)Authenticate an OAuth flow abstract OAuth.ProvidergetGoogle()Exposes an instance of the Google OAuth implementation abstract OAuth.ProvidergetMicrosoft()Exposes an instance of the Microsoft OAuth implementation abstract OAuth.ProvidergetHubspot()Exposes an instance of the HubSpot OAuth implementation abstract OAuth.ProvidergetSlack()Exposes an instance of the Slack OAuth implementation abstract OAuth.ProvidergetGithub()Exposes an instance of the GitHub OAuth implementation abstract OAuth.DiscoverygetDiscovery()Exposes an instance of the Discovery OAuth implementation -
-
Method Detail
-
setOAuthReceiverActivity
abstract Unit setOAuthReceiverActivity(ComponentActivity activity)
-
authenticate
abstract StytchResult<OAuthAuthenticateResponseData> authenticate(OAuth.AuthenticateParameters parameters)
Authenticate an OAuth flow
- Parameters:
parameters- required to authenticate the OAuth flow- Returns:
OAuthAuthenticateResponse
-
authenticate
abstract Unit authenticate(OAuth.AuthenticateParameters parameters, Function1<StytchResult<OAuthAuthenticateResponseData>, Unit> callback)
Authenticate an OAuth flow
- Parameters:
parameters- required to authenticate the OAuth flowcallback- a callback that receives an OAuthAuthenticateResponse
-
authenticateCompletable
abstract CompletableFuture<StytchResult<OAuthAuthenticateResponseData>> authenticateCompletable(OAuth.AuthenticateParameters parameters)
Authenticate an OAuth flow
- Parameters:
parameters- required to authenticate the OAuth flow- Returns:
OAuthAuthenticateResponse
-
getGoogle
abstract OAuth.Provider getGoogle()
Exposes an instance of the Google OAuth implementation
-
getMicrosoft
abstract OAuth.Provider getMicrosoft()
Exposes an instance of the Microsoft OAuth implementation
-
getHubspot
abstract OAuth.Provider getHubspot()
Exposes an instance of the HubSpot OAuth implementation
-
getSlack
abstract OAuth.Provider getSlack()
Exposes an instance of the Slack OAuth implementation
-
getGithub
abstract OAuth.Provider getGithub()
Exposes an instance of the GitHub OAuth implementation
-
getDiscovery
abstract OAuth.Discovery getDiscovery()
Exposes an instance of the Discovery OAuth implementation
-
-
-
-