public interface SSOToken
SSOToken
class represents a "single sign on"(SSO) token.
It contains SSO token-related information such as authentication method used
for authentication, authentication level of the authentication method, host
name of the client that sent the request (browser). It also contains
session-related information such as maximum session time, maximum session
idle time and session idle time.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.
|
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.
|
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.
|
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.
|
boolean |
isTokenRestricted()
Returns true if the SSOTokenID associated with this SSOToken is a
restricted token, false otherwise.
|
void |
setProperty(String name,
String value)
Sets a property for this token.
|
Principal getPrincipal() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the principalString getAuthType() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the authentication methodint getAuthLevel() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the authentication levelInetAddress getIPAddress() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the IP Address of the clientString getHostName() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the host name of the clientlong getTimeLeft() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the maximum session time.long getMaxSessionTime() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the maximum session timelong getIdleTime() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the session idle timelong getMaxIdleTime() throws SSOException
SSOException
- if the single sign on token is not valid or if there are
errors in getting the maximum idle timeSSOTokenID getTokenID()
void setProperty(String name, String value) throws SSOException
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 valueString getProperty(String name) throws SSOException
name
- The property name.SSOException
- if the single sign on token is not valid or if there are
errors in getting the property valueString getProperty(String name, boolean ignoreState) throws SSOException
name
- The property name.ignoreState
- The ignoreState flag.SSOException
- if the SSOToken is not VALID and if
ignoreState is set to false.void addSSOTokenListener(SSOTokenListener listener) throws SSOException
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.String encodeURL(String url) throws SSOException
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
url
- the URL to be encodedSSOException
- if URL cannot be encoded.boolean isTokenRestricted() throws SSOException
SSOException
- If we are unable to determine if the session is
restrictedString dereferenceRestrictedTokenID(SSOToken requester, String restrictedId) throws SSOException
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.