Package net.openid.appauth
Class EndSessionResponse
- java.lang.Object
-
- net.openid.appauth.AuthorizationManagementResponse
-
- net.openid.appauth.EndSessionResponse
-
public class EndSessionResponse extends AuthorizationManagementResponse
A response to end session request.- See Also:
EndSessionRequest
,“OpenID Connect RP-Initiated Logout 1.0 - draft 01 https://openid.net/specs/openid-connect-rpinitiated-1_0.html”
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
EndSessionResponse.Builder
Creates instances ofEndSessionResponse
.
-
Field Summary
Fields Modifier and Type Field Description static String
EXTRA_RESPONSE
The extra string used to store anEndSessionResponse
in an intent bytoIntent()
.EndSessionRequest
request
The end session request associated with this response.String
state
The returned state parameter, which must match the value specified in the request.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static EndSessionResponse
fromIntent(Intent dataIntent)
Extracts an end session response from an intent produced bytoIntent()
.String
getState()
static EndSessionResponse
jsonDeserialize(String jsonStr)
Reads an end session response from a JSON string representation produced byAuthorizationManagementResponse.jsonSerializeString()
.static EndSessionResponse
jsonDeserialize(JSONObject json)
Reads an end session response from a JSON string representation produced byjsonSerialize()
.JSONObject
jsonSerialize()
Produces a JSON representation of the end session response for persistent storage or local transmission (e.g.Intent
toIntent()
Produces an intent containing this end session response.-
Methods inherited from class net.openid.appauth.AuthorizationManagementResponse
jsonSerializeString
-
-
-
-
Field Detail
-
EXTRA_RESPONSE
public static final String EXTRA_RESPONSE
The extra string used to store anEndSessionResponse
in an intent bytoIntent()
.- See Also:
- Constant Field Values
-
request
@NonNull public final EndSessionRequest request
The end session request associated with this response.
-
-
Method Detail
-
getState
@Nullable public String getState()
- Specified by:
getState
in classAuthorizationManagementResponse
-
jsonSerialize
@NonNull public JSONObject jsonSerialize()
Produces a JSON representation of the end session response for persistent storage or local transmission (e.g.between activities).
- Specified by:
jsonSerialize
in classAuthorizationManagementResponse
-
jsonDeserialize
@NonNull public static EndSessionResponse jsonDeserialize(@NonNull JSONObject json) throws JSONException
Reads an end session response from a JSON string representation produced byjsonSerialize()
.- Throws:
JSONException
- if the provided JSON does not match the expected structure.
-
jsonDeserialize
@NonNull public static EndSessionResponse jsonDeserialize(@NonNull String jsonStr) throws JSONException
Reads an end session response from a JSON string representation produced byAuthorizationManagementResponse.jsonSerializeString()
.This method is just a convenience wrapper for
jsonDeserialize(JSONObject)
, converting the JSON string to its JSON object form.- Throws:
JSONException
- if the provided JSON does not match the expected structure.
-
toIntent
public 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)
.- Specified by:
toIntent
in classAuthorizationManagementResponse
-
fromIntent
@Nullable public static EndSessionResponse fromIntent(@NonNull Intent dataIntent)
Extracts an end session response from an intent produced bytoIntent()
.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)
.
-
-