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 forA3LSignInOptionswhich starts with clean configuration.Builder(A3LSignInOptions a3LSignInOptions) A Builder forA3LSignInOptionswhich you can specify one of the default configurations A3L Authentication (will) provide and make additional configurations based on it. -
Method Summary
Modifier and TypeMethodDescriptionfinal A3LSignInOptionsbuild()Builds theA3LSignInOptionsobject.final A3LSignInOptions.BuilderSpecifies that email info is requested by your application.final A3LSignInOptions.BuilderSpecifies that user ID is requested by your application.final A3LSignInOptions.BuilderrequestIdToken(String serverClientId) Specifies that an ID token for authenticated users is requested.final A3LSignInOptions.BuilderSpecifies that user's profile info is requested by your application.final A3LSignInOptions.BuilderrequestScopes(Scope scope, Scope... scopes) Specifies OAuth 2.0 scopes your application requests.final A3LSignInOptions.BuildersetAccountName(String accountName) Specifies an account name on the device that should be used.final A3LSignInOptions.BuildersetHostedDomain(String hostedDomain) Specifies a hosted domain restriction.
-
Constructor Details
-
Builder
public Builder()Default Builder forA3LSignInOptionswhich 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 forA3LSignInOptionswhich 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. SeeScopesfor 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 theA3LSignInOptionsobject.- Returns:
- A3LSignInOptions: a
A3LSignInOptionsinstance.
-