java.lang.Object | ||
↳ | com.amazon.identity.auth.device.interactive.InteractiveRequest<T extends com.amazon.identity.auth.device.interactive.InteractiveListener<S, U, V>, S, U, V> | |
↳ | com.amazon.identity.auth.device.api.authorization.AuthorizeRequest |
Encapsulates the options for a call to authorize(AuthorizeRequest)
. The corresponding
listener for this request is AuthorizeListener
. See AuthorizeRequest.Builder
for creating
authorization requests.
By default, authorize requests:
setGrantType(GrantType)
to change the type of authorization result.false
to setShouldReturnUserData(boolean)
. User profile data can be later retrieved
with fetch(Context, com.amazon.identity.auth.device.api.Listener)
.Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
AuthorizeRequest.Builder | Instances of AuthorizeRequest must be constructed using this Builder . |
||||||||||
AuthorizeRequest.GrantType | The different kinds of authorization grants that can be requested from Login With Amazon. |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Request a scope in addition to the current set of scopes.
| |||||||||||
Request multiple scopes in addition to the current set of scopes.
| |||||||||||
Request a workflow in addition to the current set of workflows.
| |||||||||||
Request multiple workflows in addition to the current set of workflows.
| |||||||||||
For authorization code flow.
| |||||||||||
For authorization code flow.
| |||||||||||
By default, this is
ACCESS_TOKEN . | |||||||||||
Do not call this API, it is for internal SDK usage only.
| |||||||||||
Do not call this API, it is for internal SDK usage only.
| |||||||||||
Do not call this API, it is for internal SDK usage only.
| |||||||||||
The current set of scopes being requested.
| |||||||||||
The current set of workflows being requested.
| |||||||||||
Modifies the OAuth 2.0 proof key code challenge.
| |||||||||||
Modifies the OAuth 2.0 proof key code challenge method.
| |||||||||||
Change the kind of result received upon authorization completion.
| |||||||||||
Configure an authorization code request with a proof key for proof of possession, per RFC 7636.
| |||||||||||
Replace the current set of scopes for this request with a new one.
| |||||||||||
Upon authorization, the default behavior is to fetch and return user profile data in the
onSuccess(AuthorizeResult) via getUser() . | |||||||||||
Replace the current set of workflows for this request with a new one.
| |||||||||||
Indicates whether or not user profile data should be fetched upon authorization.
| |||||||||||
Indicates whether to enable the dialog showing progress upon authorization.
| |||||||||||
On FireOS or Android devices which have the Amazon Shopping APP installed,
upon authorization, there will be a consent page asking customers to grant permission for the specified scopes
of his Amazon account to your APP, and there should be a progress animation indicating data fetch from LWA.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() | |||||||||||
![]() |
Request a scope in addition to the current set of scopes.
scope | The given scope to request for. |
---|
Request multiple scopes in addition to the current set of scopes.
scopesToAdd | The given scopes to request for. |
---|
Request a workflow in addition to the current set of workflows.
workflow | The given workflow to request for. |
---|
Request multiple workflows in addition to the current set of workflows.
workflowsToAdd | The given workflows to request for. |
---|
For authorization code flow. The proof key.
For authorization code flow. The proof key's derivation method.
By default, this is ACCESS_TOKEN
.
Do not call this API, it is for internal SDK usage only.
Do not call this API, it is for internal SDK usage only.
The current set of scopes being requested.
The current set of workflows being requested.
Modifies the OAuth 2.0 proof key code challenge.
codeChallenge | The new code challenge to use. |
---|
Modifies the OAuth 2.0 proof key code challenge method.
codeChallengeMethod | The new code challenge method to use. |
---|
Change the kind of result received upon authorization completion.
By default, this is ACCESS_TOKEN
.
grantType | The kind of authorization grant to request. |
---|
Configure an authorization code request with a proof key for proof of possession, per RFC 7636.
codeChallenge | The OAuth 2.0 code challenged derived using the given codeChallengeMethod . |
---|---|
codeChallengeMethod | The method used to derive the codeChallenge , such as "S256".
|
Replace the current set of scopes for this request with a new one.
scopes | The new set of scopes to be requested. |
---|
Upon authorization, the default behavior is to fetch and return user profile data in the
onSuccess(AuthorizeResult)
via getUser()
. If this is set to
false
then user profile data is not returned, and the authorize request will finish without
incurring the cost of retrieving user profile data.
It may be desired to override the default behavior using this method in cases where user profile data is not desired, if no scopes for profile data are being requested, or if it is preferable to defer fetching of user profile data.
shouldReturnUserData | true to fetch return user data, false otherwise. |
---|
Replace the current set of workflows for this request with a new one.
workflows | The new set of workflows to be requested. |
---|
Indicates whether or not user profile data should be fetched upon authorization.
By default, this is true
.
Indicates whether to enable the dialog showing progress upon authorization.
By default, this is true
On FireOS or Android devices which have the Amazon Shopping APP installed, upon authorization, there will be a consent page asking customers to grant permission for the specified scopes of his Amazon account to your APP, and there should be a progress animation indicating data fetch from LWA. If you don't want to show the consent page and spinner, you can use this API to turn it off. Note that if this flag is set false, the LWA authorization will fail, if the customer didn't grant permission for the specified scopes of his Amazon account to your APP yet. By default, the consent page and animation is enabled.
showProgress | true to turn on progress dialog, false to turn off. |
---|