Modifier and Type | Class and Description |
---|---|
static interface |
AuthorizationService.TokenResponseCallback
Callback interface for token endpoint requests.
|
Modifier and Type | Field and Description |
---|---|
static String |
SCOPE_ADDRESS
Scope value which requests access to the address claim.
|
static String |
SCOPE_EMAIL
Scope value which requests access to the email and email_verified claims.
|
static String |
SCOPE_OPENID
Scope value which requests access to the end-user's stable identifier.
|
static String |
SCOPE_PROFILE
Scope value which requests access to the end-user's default profile claims.
|
Constructor and Description |
---|
AuthorizationService(Context context)
Creates an AuthorizationService instance based on the provided configuration.
|
Modifier and Type | Method and Description |
---|---|
CustomTabsIntent.Builder |
createCustomTabsIntentBuilder()
Creates a custom tab builder, that will use a tab session from an existing connection to
a web browser, if available.
|
void |
dispose()
Disposes state that will not normally be handled by garbage collection.
|
void |
performAuthorizationRequest(AuthorizationRequest request,
PendingIntent resultHandlerIntent)
Sends an authorization request to the authorization service, using a
custom tab.
|
void |
performAuthorizationRequest(AuthorizationRequest request,
PendingIntent resultHandlerIntent,
CustomTabsIntent customTabsIntent)
Sends an authorization request to the authorization service, using a
custom tab.
|
void |
performTokenRequest(TokenRequest request,
AuthorizationService.TokenResponseCallback callback)
Sends a request to the authorization service to exchange a code granted as part of an
authorization request for a token.
|
public static final String SCOPE_OPENID
public static final String SCOPE_PROFILE
public static final String SCOPE_EMAIL
public static final String SCOPE_ADDRESS
public CustomTabsIntent.Builder createCustomTabsIntentBuilder()
public void performAuthorizationRequest(@NonNull AuthorizationRequest request, @NonNull PendingIntent resultHandlerIntent)
request object
. Upon completion
of this request, the provided result handler intent
will be invoked.public void performAuthorizationRequest(@NonNull AuthorizationRequest request, @NonNull PendingIntent resultHandlerIntent, @NonNull CustomTabsIntent customTabsIntent)
request object
. Upon completion
of this request, the provided result handler intent
will be invoked.customTabsIntent
- The intent that will be used to start the custom tab. It is recommended that this intent
be created with the help of createCustomTabsIntentBuilder()
, which will ensure
that a warmed-up version of the browser will be used, minimizing latency.public void performTokenRequest(@NonNull TokenRequest request, @NonNull AuthorizationService.TokenResponseCallback callback)
public void dispose()
Activity.onStop()
).