SessionCondition
instead.@Deprecated public class SessionCondition extends Object implements Condition
SessionCondition
is a plugin implementation
of Condition
. This lets you define the maximum
user session time during which a policy applies. There is an option
to terminate the user session if the session time exceeds the
maximum allowed.Modifier and Type | Field and Description |
---|---|
static String |
ADVICE_DENY
Deprecated.
Key that is used in the
Advice to identify the condition
decision is deny . |
static String |
ADVICE_TERMINATE_SESSION
Deprecated.
Key that is used in the
Advice to identify the session was
terminated. |
static String |
REQUEST_SESSION_CREATION_TIME
Deprecated.
Key that is used to define the user session creation time
of the request.
|
static String |
SESSION_CONDITION_ADVICE
Deprecated.
Key that is used to identify the advice messages from this
condition.
|
AM_IDENTITY_NAME, APPLICATION_IDLE_TIMEOUT, APPLICATION_NAME, AUTH_LEVEL, AUTH_LEVEL_CONDITION_ADVICE, AUTH_SCHEME, AUTH_SCHEME_CONDITION_ADVICE, AUTHENTICATE_TO_REALM, AUTHENTICATE_TO_REALM_CONDITION_ADVICE, AUTHENTICATE_TO_SERVICE, AUTHENTICATE_TO_SERVICE_CONDITION_ADVICE, DNS_NAME, END_DATE, END_DAY, END_IP, END_TIME, ENFORCEMENT_TIME_ZONE, INVOCATOR_PRINCIPAL_UUID, LDAP_FILTER, MAX_SESSION_TIME, REQUEST_AUTH_LEVEL, REQUEST_AUTH_SCHEMES, REQUEST_AUTHENTICATED_TO_REALMS, REQUEST_AUTHENTICATED_TO_SERVICES, REQUEST_DNS_NAME, REQUEST_IP, REQUEST_TIME_ZONE, START_DATE, START_DAY, START_IP, START_TIME, TERMINATE_SESSION, VALUE_CASE_INSENSITIVE
Constructor and Description |
---|
SessionCondition()
Deprecated.
No argument constructor.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Deprecated.
Creates and returns a copy of this object.
|
ConditionDecision |
getConditionDecision(SSOToken token,
Map env)
Deprecated.
Gets the decision computed by this condition object, based on the
map of environment parameters or the user token.
|
String |
getDisplayName(String property,
Locale locale)
Deprecated.
Gets the display name for the property name.
|
Map |
getProperties()
Deprecated.
Gets the properties of the condition.
|
List |
getPropertyNames()
Deprecated.
Gets a list of property names for the condition.
|
Syntax |
getPropertySyntax(String property)
Deprecated.
Gets the
Syntax for a property name. |
Set |
getValidValues(String property)
Deprecated.
Gets a set of valid values given the property name.
|
void |
setProperties(Map properties)
Deprecated.
Sets the properties of the condition.
|
public static final String REQUEST_SESSION_CREATION_TIME
env
parameter while
invoking getConditionDecision
method of the
SessionCondition
. Value for the key should be a
Long
whose value is time in milliseconds since epoch.public static final String SESSION_CONDITION_ADVICE
public static final String ADVICE_TERMINATE_SESSION
Advice
to identify the session was
terminated.public static final String ADVICE_DENY
Advice
to identify the condition
decision is deny
.public List getPropertyNames()
getPropertyNames
in interface Condition
public Syntax getPropertySyntax(String property)
Syntax
for a property name.getPropertySyntax
in interface Condition
property
- property nameSyntax for the property name
Syntax
public String getDisplayName(String property, Locale locale) throws PolicyException
getDisplayName
in interface Condition
property
- property namelocale
- locale for which the property name must be customizedPolicyException
- if unable to get the diplay name.public Set getValidValues(String property) throws PolicyException
Syntax
is either the
SINGLE_CHOICE
or MULTIPLE_CHOICE
.getValidValues
in interface Condition
property
- property namePolicyException
- if unable to get the Syntax
public void setProperties(Map properties) throws PolicyException
ConditionDecision
is influenced
by these properties.setProperties
in interface Condition
properties
- the properties of the condition that governs
whether a policy applies. The properties should define
value for MAX_SESSION_TIME
and optionally
TERMINATE_SESSION
.
The value should be a Set of string values. The value for
MAX_SESSION_TIME
should be parse-able as
an Integer
PolicyException
- if properties is null or does not contain
valid value for MAX_SESSION_TIME
ConditionDecision
public Map getProperties()
getProperties
in interface Condition
Map
view of the properties that govern
the evaluation of the condition.
Please note that properties is not cloned before returningCondition.setProperties(java.util.Map<java.lang.String, java.util.Set<java.lang.String>>)
public ConditionDecision getConditionDecision(SSOToken token, Map env) throws PolicyException, SSOException
TERMINATE_SESSION
is true and the condition
evaluation is false, it terminates the user session.getConditionDecision
in interface Condition
token
- single-sign-on token of the userenv
- request specific environment map of key/value pair. This
condition looks for value of key
REQUEST_SESSION_CREATION_TIME
in the map. And the
value should be a Long
. If the env
is
null of does not define value for
REQUEST_SESSION_CREATION_TIME
, the
value will be obtained from SSO token of the userPolicyException
- if the condition has not been initializedSSOException
- if the SSO token is invalid or there is error when
trying to destroy the SSO tokenConditionDecision
Copyright © 2010–2025 Open Identity Platform Community. All rights reserved.