Modifier and Type | Class and Description |
---|---|
protected class |
AuthSSOToken.AuthSSOTokenID |
Modifier and Type | Field and Description |
---|---|
protected static Map |
allSSOTokens |
protected AuthContext |
authContext |
protected HashSet |
callbackObjects |
static int |
DESTROYED |
static int |
INVALID |
protected String |
key |
protected static Random |
random |
protected HashMap |
session |
static int |
VALID |
Modifier | Constructor and Description |
---|---|
protected |
AuthSSOToken(AuthContext authc) |
Modifier and Type | Method and Description |
---|---|
void |
addSSOTokenListener(SSOTokenListener listener)
Adds an SSO token listener for the token change events.
|
String |
dereferenceRestrictedTokenID(SSOToken requester,
String restrictedId)
Given a restricted token, returns the SSOTokenID of the master token
can only be used if the requester is an app token
|
String |
encodeURL(String url)
Returns the encoded URL , rewritten to include the session id.
|
byte[] |
getAddress() |
int |
getAuthLevel()
Returns the authentication level of the authentication method used for
authentication.
|
String |
getAuthType()
Returns the authentication method used for authentication.
|
String |
getHostName()
Returns the host name of the client (browser) that sent the request.
|
long |
getIdleTime()
Returns the session idle time in seconds.
|
InetAddress |
getIPAddress()
Returns the IP Address of the client (browser) that sent the request.
|
long |
getMaxIdleTime()
Returns the maximum session idle time in minutes.
|
long |
getMaxSessionTime()
Returns the maximum session time in minutes.
|
protected static String |
getNewKey() |
Principal |
getPrincipal()
Returns the value of the property "Principal" set to the single sign on
token.
|
String |
getProperty(String name)
Gets the property stored in this token.
|
String |
getProperty(String name,
boolean ignoreState)
Gets the property stored in this token.
|
protected int |
getState() |
long |
getTimeLeft()
Returns the time left in seconds on the session based on max session
time.
|
SSOTokenID |
getTokenID()
Returns single sign on token ID object.
|
protected void |
invalidate() |
boolean |
isTokenRestricted()
Returns true if the SSOTokenID associated with this SSOToken is a
restricted token, false otherwise.
|
protected boolean |
isValid() |
void |
setProperty(String name,
String value)
Sets a property for this token.
|
protected void |
validate() |
protected static Map allSSOTokens
protected static Random random
public static final int INVALID
public static final int VALID
public static final int DESTROYED
protected AuthContext authContext
protected HashMap session
protected HashSet callbackObjects
protected String key
protected AuthSSOToken(AuthContext authc) throws InvalidAuthContextException
InvalidAuthContextException
protected static String getNewKey()
public Principal getPrincipal() throws SSOException
SSOToken
getPrincipal
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the principalpublic String getAuthType() throws SSOException
SSOToken
getAuthType
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the authentication methodpublic int getAuthLevel() throws SSOException
SSOToken
getAuthLevel
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the authentication levelpublic InetAddress getIPAddress() throws SSOException
SSOToken
getIPAddress
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the IP Address of the clientpublic String getHostName() throws SSOException
SSOToken
getHostName
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the host name of the clientpublic byte[] getAddress() throws SSOException
SSOException
public long getTimeLeft() throws SSOException
SSOToken
getTimeLeft
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the maximum session time.public String encodeURL(String url)
SSOToken
Encoded URL format if query string in the original URL passed is present will be :
protocol://server:port/path?queryString&cookieName=cookieValueEncoded URL format if query string in the original URL passed is not present will be:
protocol://server:port/path?cookieName=cookieValue
public long getMaxSessionTime() throws SSOException
SSOToken
getMaxSessionTime
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the maximum session timepublic long getIdleTime() throws SSOException
SSOToken
getIdleTime
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the session idle timepublic long getMaxIdleTime() throws SSOException
SSOToken
getMaxIdleTime
in interface SSOToken
SSOException
- if the single sign on token is not valid or if there are
errors in getting the maximum idle timepublic SSOTokenID getTokenID()
SSOToken
getTokenID
in interface SSOToken
protected int getState() throws SSOException
SSOException
public void setProperty(String name, String value) throws SSOException
SSOToken
setProperty
in interface SSOToken
name
- The property name.value
- The property value.SSOException
- if the single sign on token is not valid or if there are
errors in setting the property name and valuepublic String getProperty(String name) throws SSOException
SSOToken
getProperty
in interface SSOToken
name
- The property name.SSOException
- if the single sign on token is not valid or if there are
errors in getting the property valuepublic String getProperty(String name, boolean ignoreState) throws SSOException
SSOToken
getProperty
in interface SSOToken
name
- The property name.ignoreState
- The ignoreState flag.SSOException
- if the SSOToken is not VALID and if
ignoreState is set to false.public void addSSOTokenListener(SSOTokenListener listener) throws SSOException
SSOToken
addSSOTokenListener
in interface SSOToken
listener
- A reference to an SSOTokenListener
object.SSOException
- if the token is not valid or if there are errors in
setting the SSO token listener.protected boolean isValid()
protected void validate() throws SSOException
SSOException
protected void invalidate()
public boolean isTokenRestricted() throws SSOException
SSOToken
isTokenRestricted
in interface SSOToken
SSOException
- If we are unable to determine if the session is
restrictedpublic String dereferenceRestrictedTokenID(SSOToken requester, String restrictedId) throws SSOException
SSOToken
dereferenceRestrictedTokenID
in interface SSOToken
requester
- Must be an app tokenrestrictedId
- The SSOTokenID of the restricted tokenSSOException
- If the master token cannot be dereferencedCopyright © 2010–2025 Open Identity Platform Community. All rights reserved.