public class EndSessionResponse extends AuthorizationManagementResponse
A response to end session request.
| Modifier and Type | Class and Description |
|---|---|
static class |
EndSessionResponse.Builder
Creates instances of
EndSessionResponse. |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EXTRA_RESPONSE
The extra string used to store an
EndSessionResponse in an intent by
toIntent(). |
EndSessionRequest |
request
The end session request associated with this response.
|
java.lang.String |
state
The returned state parameter, which must match the value specified in the request.
|
| Modifier and Type | Method and Description |
|---|---|
static EndSessionResponse |
fromIntent(android.content.Intent dataIntent)
Extracts an end session response from an intent produced by
toIntent(). |
java.lang.String |
getState() |
static EndSessionResponse |
jsonDeserialize(org.json.JSONObject json)
Reads an end session response from a JSON string representation produced by
jsonSerialize(). |
static EndSessionResponse |
jsonDeserialize(java.lang.String jsonStr)
Reads an end session response from a JSON string representation produced by
AuthorizationManagementResponse.jsonSerializeString(). |
org.json.JSONObject |
jsonSerialize()
Produces a JSON representation of the end session response for persistent storage or local
transmission (e.g.
|
android.content.Intent |
toIntent()
Produces an intent containing this end session response.
|
jsonSerializeStringpublic static final java.lang.String EXTRA_RESPONSE
The extra string used to store an EndSessionResponse in an intent by
toIntent().
@NonNull public final EndSessionRequest request
The end session request associated with this response.
@Nullable public final java.lang.String state
The returned state parameter, which must match the value specified in the request. AppAuth for Android ensures that this is the case.
@Nullable public java.lang.String getState()
getState in class AuthorizationManagementResponse@NonNull public org.json.JSONObject jsonSerialize()
Produces a JSON representation of the end session response for persistent storage or local transmission (e.g. between activities).
jsonSerialize in class AuthorizationManagementResponse@NonNull public static EndSessionResponse jsonDeserialize(@NonNull org.json.JSONObject json) throws org.json.JSONException
Reads an end session response from a JSON string representation produced by
jsonSerialize().
org.json.JSONException - if the provided JSON does not match the expected structure.@NonNull public static EndSessionResponse jsonDeserialize(@NonNull java.lang.String jsonStr) throws org.json.JSONException
Reads an end session response from a JSON string representation produced by
AuthorizationManagementResponse.jsonSerializeString(). This method is just a convenience wrapper for
jsonDeserialize(JSONObject), converting the JSON string to its JSON object form.
org.json.JSONException - if the provided JSON does not match the expected structure.public android.content.Intent toIntent()
Produces an intent containing this end session response. This is used to deliver the
end session response to the registered handler after a call to
AuthorizationService.performEndSessionRequest(net.openid.appauth.EndSessionRequest, android.app.PendingIntent).
toIntent in class AuthorizationManagementResponse@Nullable public static EndSessionResponse fromIntent(@NonNull android.content.Intent dataIntent)
Extracts an end session response from an intent produced by toIntent(). This is
used to extract the response from the intent data passed to an activity registered as the
handler for AuthorizationService.performEndSessionRequest(net.openid.appauth.EndSessionRequest, android.app.PendingIntent).