Skip to content

Latest commit

Β 

History

History
824 lines (592 loc) Β· 11 KB

File metadata and controls

824 lines (592 loc) Β· 11 KB

Reference

factors

client.factors.list() -> ListFactorsResponseContent

πŸ“ Description

List of factors enabled for the Auth0 tenant and available for enrollment by this user.

πŸ”Œ Usage

client.factors().list();

AuthenticationMethods

client.authenticationMethods.list() -> ListAuthenticationMethodsResponseContent

πŸ“ Description

Retrieve detailed list of authentication methods belonging to the authenticated user.

πŸ”Œ Usage

client.authenticationMethods().list(
    ListAuthenticationMethodsRequestParameters
        .builder()
        .type(
            OptionalNullable.of(FactorTypeEnum.PASSWORD)
        )
        .build()
);

βš™οΈ Parameters

type: Optional<FactorTypeEnum> β€” Filter authentication methods by type

client.authenticationMethods.create(request) -> CreateAuthenticationMethodResponseContent

πŸ“ Description

Start the enrollment of a supported authentication method.

πŸ”Œ Usage

client.authenticationMethods().create(
    CreateAuthenticationMethodRequestContent.phone(
        CreatePhoneAuthenticationMethod
            .builder()
            .phoneNumber("phone_number")
            .build()
    )
);

βš™οΈ Parameters

request: CreateAuthenticationMethodRequestContent

client.authenticationMethods.get(authenticationMethodId) -> GetAuthenticationMethodResponseContent

πŸ“ Description

Retrieves a single authentication method belonging to the authenticated user.

πŸ”Œ Usage

client.authenticationMethods().get("authentication_method_id");

βš™οΈ Parameters

authenticationMethodId: String β€” Authentication Method ID. This value is part of the Location header returned when creating an authentication method. It should be used as it is, without any modifications.

client.authenticationMethods.delete(authenticationMethodId)

πŸ“ Description

Deletes a single authentication method belonging to the authenticated user.

πŸ”Œ Usage

client.authenticationMethods().delete("authentication_method_id");

βš™οΈ Parameters

authenticationMethodId: String β€” Authentication Method ID. This value is part of the Location header returned when creating an authentication method. It should be used as it is, without any modifications.

client.authenticationMethods.update(authenticationMethodId, request) -> UpdateAuthenticationMethodResponseContent

πŸ“ Description

Updates a single authentication method

πŸ”Œ Usage

client.authenticationMethods().update(
    "authentication_method_id",
    UpdateAuthenticationMethodRequestContent
        .builder()
        .build()
);

βš™οΈ Parameters

authenticationMethodId: String β€” Authentication Method ID. This value is part of the Location header returned when creating an authentication method. It should be used as it is, without any modifications.

name: Optional<String> β€” The friendly name of the authentication method

preferredAuthenticationMethod: Optional<PhoneAuthenticationMethodEnum> β€” The preferred authentication method (for phone authenticators)

client.authenticationMethods.verify(authenticationMethodId, request) -> VerifyAuthenticationMethodResponseContent

πŸ“ Description

Confirm the enrollment of a supported authentication method.

πŸ”Œ Usage

client.authenticationMethods().verify(
    "authentication_method_id",
    VerifyAuthenticationMethodRequestContent.of(
        VerifyEmailAuthenticationMethod
            .builder()
            .authSession("Fe26.2**05c400ed...")
            .otpCode("123456")
            .build()
    )
);

βš™οΈ Parameters

authenticationMethodId: String β€” Authentication Method ID. This value is part of the Location header returned when creating an authentication method. It should be used as it is, without any modifications.

request: VerifyAuthenticationMethodRequestContent

ConnectedAccounts

client.connectedAccounts.create(request) -> CreateConnectedAccountsResponseContent

πŸ“ Description

Start an authorization flow to link the authenticated user's account with an external identity provider.

πŸ”Œ Usage

client.connectedAccounts().create(
    CreateConnectedAccountsRequestContent
        .builder()
        .connection("connection")
        .redirectUri("redirect_uri")
        .build()
);

βš™οΈ Parameters

connection: String β€” The name of the connection to link the account with (e.g., 'google-oauth2', 'facebook').

redirectUri: String β€” The URI to redirect to after the connection process completes.

state: Optional<String> β€” An opaque value used to maintain state between the request and callback.

codeChallenge: Optional<String> β€” The PKCE code challenge derived from the code verifier.

codeChallengeMethod: Optional<CreateConnectedAccountsRequestContentCodeChallengeMethod> β€” The method used to derive the code challenge. Required when code_challenge is provided.

scopes: Optional<List<String>> β€” Defines the permissions that the client requests from the Identity Provider. Must include the standard scopes used to identify the user (e.g. 'openid', 'email', 'profile'), the scope required to obtain refresh tokens if needed (e.g. 'offline_access'), and any custom scopes the client needs to access protected resources.

authorizationParams: Optional<AuthorizationParams>

client.connectedAccounts.complete(request) -> CompleteConnectedAccountsResponseContent

πŸ“ Description

Complete a previously started authorization flow to link the authenticated user's account with an external identity provider.

πŸ”Œ Usage

client.connectedAccounts().complete(
    CompleteConnectedAccountsRequestContent
        .builder()
        .authSession("auth_session")
        .connectCode("connect_code")
        .redirectUri("redirect_uri")
        .build()
);

βš™οΈ Parameters

authSession: String β€” The authentication session identifier

connectCode: String β€” The authorization code returned from the connect flow

redirectUri: String β€” The redirect URI used in the original request

codeVerifier: Optional<String> β€” The PKCE code verifier

client.connectedAccounts.list() -> SyncPagingIterable&lt;ConnectedAccount&gt;

πŸ“ Description

Retrieve connected accounts belonging to the authenticated user.

πŸ”Œ Usage

client.connectedAccounts().list(
    ListConnectedAccountsRequestParameters
        .builder()
        .connection(
            OptionalNullable.of(
                ConnectionNamesFilter.of("connection")
            )
        )
        .from(
            OptionalNullable.of("from")
        )
        .take(
            OptionalNullable.of(1)
        )
        .build()
);

βš™οΈ Parameters

connection: Optional<ConnectionNamesFilter> β€” Filter connected accounts by connection names

from: Optional<String> β€” Cursor for pagination - start retrieving results from this point

take: Optional<Integer> β€” Number of results to return (1-20)

client.connectedAccounts.delete(id)

πŸ“ Description

Delete a connected account belonging to the authenticated user.

πŸ”Œ Usage

client.connectedAccounts().delete("id");

βš™οΈ Parameters

id: String β€” The unique identifier of the connected account

ConnectedAccounts Connections

client.connectedAccounts.connections.list() -> SyncPagingIterable&lt;ConnectedAccountConnection&gt;

πŸ“ Description

Retrieve available connections that can be used for account linking by the authenticated user.

πŸ”Œ Usage

client.connectedAccounts().connections().list(
    ListConnectedAccountsConnectionsRequestParameters
        .builder()
        .from(
            OptionalNullable.of("from")
        )
        .take(
            OptionalNullable.of(1)
        )
        .build()
);

βš™οΈ Parameters

from: Optional<String> β€” Cursor for pagination - start retrieving results from this point

take: Optional<Integer> β€” Number of results to return (1-20)