Package org.forgerock.openig.openam
Class SsoTokenContext
- java.lang.Object
-
- org.forgerock.services.context.AbstractContext
-
- org.forgerock.openig.openam.SsoTokenContext
-
- All Implemented Interfaces:
Context
public class SsoTokenContext extends AbstractContext
AnSsoTokenContext
could be used to store and retrieve an token.The
SingleSignOnFilter
uses this context to store the token and its validation information.
-
-
Field Summary
-
Fields inherited from class org.forgerock.services.context.AbstractContext
data
-
-
Constructor Summary
Constructors Constructor Description SsoTokenContext(Context parent, JsonValue info, String token, String loginEndpoint)
Creates a newSsoTokenContext
context with the provided token and additional validation information such as 'realm', 'uid' and 'authModule'.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description JsonValue
asJsonValue()
Returns the info associated with this context as aJsonValue
.static SsoTokenContext
fromSessionInfo(Context parent, org.forgerock.openig.tools.session.SessionInfo sessionInfo, String loginEndpoint)
Create aSsoTokenContext
from aSessionInfo
and SSO token.Map<String,Object>
getInfo()
Returns the info associated with this context.String
getLoginEndpoint()
The login endpoint URI evaluated fromSingleSignOnFilter
configuration.String
getValue()
Returns the token associated with this SsoTokenContext context.-
Methods inherited from class org.forgerock.services.context.AbstractContext
asContext, containsContext, containsContext, getContext, getContextName, getId, getParent, getRootId, isRootContext, toJsonValue, toString
-
-
-
-
Constructor Detail
-
SsoTokenContext
public SsoTokenContext(Context parent, JsonValue info, String token, String loginEndpoint)
Creates a newSsoTokenContext
context with the provided token and additional validation information such as 'realm', 'uid' and 'authModule'.- Parameters:
parent
- The parent context.info
- The validation information associated with this context to store, notnull
.token
- The token associated with this context to store, notnull
.loginEndpoint
- The login endpoint URI evaluated fromSingleSignOnFilter
configuration, may benull
.
-
-
Method Detail
-
fromSessionInfo
public static final SsoTokenContext fromSessionInfo(Context parent, org.forgerock.openig.tools.session.SessionInfo sessionInfo, String loginEndpoint)
Create aSsoTokenContext
from aSessionInfo
and SSO token.- Parameters:
parent
- The parent context.sessionInfo
- The validation information associated with this context to store, notnull
.loginEndpoint
- The login endpoint URI evaluated fromSingleSignOnFilter
configuration, may benull
.- Returns:
- a
SsoTokenContext
-
getInfo
public Map<String,Object> getInfo()
Returns the info associated with this context.- Returns:
- the info JSON as a map.
-
asJsonValue
public JsonValue asJsonValue()
Returns the info associated with this context as aJsonValue
.- Returns:
- the info associated with this context as a
JsonValue
.
-
getValue
public String getValue()
Returns the token associated with this SsoTokenContext context.- Returns:
- the token associated with this SsoTokenContext context.
-
getLoginEndpoint
public String getLoginEndpoint()
The login endpoint URI evaluated fromSingleSignOnFilter
configuration.- Returns:
- the login endpoint associated with this SsoTokenContext context.
-
-