AMZNInteractiveStrategy Constants Reference
Declared in | AMZNAuthorizeRequest.h |
---|---|
Availability | v3.0 |
AMZNInteractiveStrategy
These constants define interactive stratgies used in executing an authorization reuest. Interactive strategy defnies whether to switch UI for re-authentication when calling for authorize:handler API. LWA SDK for iOS supports fllowing three types of interactive strategyes:
Definition
typedef NS_ENUM(NSUInteger, AMZNInteractiveStrategy ) {
AMZNInteractiveStrategyAuto = 0,
AMZNInteractiveStrategyNever = 1,
AMZNInteractiveStrategyAlways = 2,
};
Constants
AMZNInteractiveStrategyAuto
-
AMZNInteractiveStrategyAuto: The SDK first looks up for locally stored authorization grant. If those stored authorization grant contains all requested scopes (or any remaining scopes are implicitly authorized), then the SDK will then try to return currently cached access token. If the token has expired, the SDK will try to refresh and return a new access token. If there is no previously authorized user, or some of the requested scopes are not authorized, or the token refresh call failed, the SDK will redirect end user to SignIn flow. AMZNAuthorizeRequest will default to use AMZNInteractiveStrategyAuto if no interactive strategy is specified by caller.
Available in 3.0
Declared In
AMZNAuthorizeRequest.h
. AMZNInteractiveStrategyNever
-
AMZNInteractiveStrategyNever: In this case, the SDK only try to use locally cached authorized grant. If those stored authorization grant contains all requested scopes (or any remaining scopes are implicitly authorized), then the SDK will then try to return currently cached access token. If the token has expired, the SDK will try to refresh and return a new access token. If there is no previously authorized user, or some of the requested scopes are not authorized, or the token refresh call failed, the SDK will return error.
Available in 3.0
Declared In
AMZNAuthorizeRequest.h
. AMZNInteractiveStrategyAlways
-
AMZNInteractiveStrategyAlways: In this case, the SDK will not look up for locally stored authorization grant, instead, it will always force to redirect end user to SignIn whenever an authorization request is being executed.
Available in 3.0
Declared In
AMZNAuthorizeRequest.h
.
Availability
v3.0
Declared In
AMZNAuthorizeRequest.h