Class A3LSignInOptions.Builder
java.lang.Object
com.amazon.A3L.authentication.api.signin.A3LSignInOptions.Builder
- Enclosing class:
- A3LSignInOptions
Builder for
A3LSignInOptions
.-
Constructor Summary
ConstructorsConstructorDescriptionBuilder()
Default Builder forA3LSignInOptions
which starts with clean configuration.Builder
(A3LSignInOptions a3LSignInOptions) A Builder forA3LSignInOptions
which you can specify one of the default configurations A3L Authentication (will) provide and make additional configurations based on it. -
Method Summary
Modifier and TypeMethodDescriptionfinal A3LSignInOptions
build()
Builds theA3LSignInOptions
object.final A3LSignInOptions.Builder
Specifies that email info is requested by your application.final A3LSignInOptions.Builder
Specifies that user ID is requested by your application.final A3LSignInOptions.Builder
requestIdToken
(String serverClientId) Specifies that an ID token for authenticated users is requested.final A3LSignInOptions.Builder
Specifies that user's profile info is requested by your application.final A3LSignInOptions.Builder
requestScopes
(Scope scope, Scope... scopes) Specifies OAuth 2.0 scopes your application requests.final A3LSignInOptions.Builder
setAccountName
(String accountName) Specifies an account name on the device that should be used.final A3LSignInOptions.Builder
setHostedDomain
(String hostedDomain) Specifies a hosted domain restriction.
-
Constructor Details
-
Builder
public Builder()Default Builder forA3LSignInOptions
which starts with clean configuration. If you are trying to implement Sign In, i.e. you want to get back user identity, you can start with newA3LSignInOptions
(A3LSignInOptions.DEFAULT_SIGN_IN
), -
Builder
A Builder forA3LSignInOptions
which you can specify one of the default configurations A3L Authentication (will) provide and make additional configurations based on it. e.g.A3LSignInOptions.DEFAULT_SIGN_IN
.- Parameters:
a3LSignInOptions
- : Default A3LSignInOptions Configuration
-
-
Method Details
-
requestId
Specifies that user ID is requested by your application. -
requestEmail
Specifies that email info is requested by your application. Note that we don't recommend keying user by email address since email address might change. Keying user by ID is the preferable approach. -
requestProfile
Specifies that user's profile info is requested by your application. -
requestIdToken
Specifies that an ID token for authenticated users is requested. Requesting an ID token requires that the server client ID be specified.- Parameters:
serverClientId
- : The client ID of the server that will verify the integrity of the token.
-
requestScopes
Specifies OAuth 2.0 scopes your application requests. SeeScopes
for more information.- Parameters:
scope
- : An OAuth 2.0 scope requested by your app.scopes
- : More OAuth 2.0 scopes requested by your app.
-
setAccountName
Specifies an account name on the device that should be used. If this is never called, the client will use the current default account for this application.- Parameters:
accountName
- : The account name on the device that should be used to sign in.
-
setHostedDomain
Specifies a hosted domain restriction. By setting this, sign in will be restricted to accounts of the user in the specified domain.- Parameters:
hostedDomain
- : domain of the user to restrict (for example, "mycollege.edu").
-
build
Builds theA3LSignInOptions
object.- Returns:
- A3LSignInOptions: a
A3LSignInOptions
instance.
-