Package net.shibboleth.sp.oidc.context
Class OAuthStateContext
java.lang.Object
org.opensaml.messaging.context.BaseContext
net.shibboleth.sp.oidc.context.OAuthStateContext
- All Implemented Interfaces:
Iterable<org.opensaml.messaging.context.BaseContext>
public class OAuthStateContext
extends org.opensaml.messaging.context.BaseContext
A context to store information pertaining to the OAuth2 state parameter.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensaml.messaging.context.BaseContext
org.opensaml.messaging.context.BaseContext.ContextSetNoRemoveIteratorDecorator, org.opensaml.messaging.context.BaseContext.DeprecatedContextClassNameLookAside -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetState()Gets the raw OAuth 2.0 state string.net.minidev.json.JSONObjectGets the decoded OAuth 2.0 state as a JSON object.Sets the raw OAuth 2.0 state string.setStateJson(net.minidev.json.JSONObject jsonObject) Sets the decoded OAuth 2.0 state as a JSON object.Methods inherited from class org.opensaml.messaging.context.BaseContext
addSubcontext, addSubcontext, clearSubcontexts, containsSubcontext, createSubcontext, ensureSubcontext, ensureSubcontext, getParent, getSubcontext, getSubcontext, getSubcontext, getSubcontext, iterator, removeFromParent, removeSubcontext, removeSubcontext, setParentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
state
The OAuth 2.0 state string. -
stateJson
@Nullable private net.minidev.json.JSONObject stateJsonOptionally the decoded state as a JSON object.
-
-
Constructor Details
-
OAuthStateContext
public OAuthStateContext()
-
-
Method Details
-
getState
Gets the raw OAuth 2.0 state string.- Returns:
- the state string, or
nullif not set
-
setState
Sets the raw OAuth 2.0 state string.- Parameters:
stateString- the state string to set- Returns:
- this context instance
-
getStateJson
@Nullable public net.minidev.json.JSONObject getStateJson()Gets the decoded OAuth 2.0 state as a JSON object.- Returns:
- the JSON object, or
nullif not set
-
setStateJson
Sets the decoded OAuth 2.0 state as a JSON object.- Parameters:
jsonObject- the JSON object to set- Returns:
- this context instance
-