Package com.sun.identity.policy.plugins
Class SessionCondition
- java.lang.Object
-
- com.sun.identity.policy.plugins.SessionCondition
-
@Deprecated public class SessionCondition extends Object implements Condition
Deprecated.UseSessionConditioninstead.The classSessionConditionis a plugin implementation ofCondition. 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.
-
-
Field Summary
Fields Modifier and Type Field Description static StringADVICE_DENYDeprecated.Key that is used in theAdviceto identify the condition decision isdeny.static StringADVICE_TERMINATE_SESSIONDeprecated.Key that is used in theAdviceto identify the session was terminated.static StringREQUEST_SESSION_CREATION_TIMEDeprecated.Key that is used to define the user session creation time of the request.static StringSESSION_CONDITION_ADVICEDeprecated.Key that is used to identify the advice messages from this condition.-
Fields inherited from interface com.sun.identity.policy.interfaces.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 Summary
Constructors Constructor Description SessionCondition()Deprecated.No argument constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Objectclone()Deprecated.Creates and returns a copy of this object.ConditionDecisiongetConditionDecision(SSOToken token, Map env)Deprecated.Gets the decision computed by this condition object, based on the map of environment parameters or the user token.StringgetDisplayName(String property, Locale locale)Deprecated.Gets the display name for the property name.MapgetProperties()Deprecated.Gets the properties of the condition.ListgetPropertyNames()Deprecated.Gets a list of property names for the condition.SyntaxgetPropertySyntax(String property)Deprecated.Gets theSyntaxfor a property name.SetgetValidValues(String property)Deprecated.Gets a set of valid values given the property name.voidsetProperties(Map properties)Deprecated.Sets the properties of the condition.
-
-
-
Field Detail
-
REQUEST_SESSION_CREATION_TIME
public static final String REQUEST_SESSION_CREATION_TIME
Deprecated.Key that is used to define the user session creation time of the request. This is passed in to theenvparameter while invokinggetConditionDecisionmethod of theSessionCondition. Value for the key should be aLongwhose value is time in milliseconds since epoch.- See Also:
- Constant Field Values
-
SESSION_CONDITION_ADVICE
public static final String SESSION_CONDITION_ADVICE
Deprecated.Key that is used to identify the advice messages from this condition.- See Also:
- Constant Field Values
-
ADVICE_TERMINATE_SESSION
public static final String ADVICE_TERMINATE_SESSION
Deprecated.Key that is used in theAdviceto identify the session was terminated.- See Also:
- Constant Field Values
-
ADVICE_DENY
public static final String ADVICE_DENY
Deprecated.Key that is used in theAdviceto identify the condition decision isdeny.- See Also:
- Constant Field Values
-
-
Method Detail
-
getPropertyNames
public List getPropertyNames()
Deprecated.Gets a list of property names for the condition.- Specified by:
getPropertyNamesin interfaceCondition- Returns:
- list of property names
-
getPropertySyntax
public Syntax getPropertySyntax(String property)
Deprecated.Gets theSyntaxfor a property name.- Specified by:
getPropertySyntaxin interfaceCondition- Parameters:
property- property name- Returns:
Syntaxfor the property name- See Also:
Syntax
-
getDisplayName
public String getDisplayName(String property, Locale locale) throws PolicyException
Deprecated.Gets the display name for the property name. The locale variable could be used by the plugin to customize the display name for the given locale. The locale variable could be null, in which case the plugin must use the default locale.- Specified by:
getDisplayNamein interfaceCondition- Parameters:
property- property namelocale- locale for which the property name must be customized- Returns:
- display name for the property name
- Throws:
PolicyException- if unable to get the diplay name.
-
getValidValues
public Set getValidValues(String property) throws PolicyException
Deprecated.Gets a set of valid values given the property name. This method is called if the propertySyntaxis either theSINGLE_CHOICEorMULTIPLE_CHOICE.- Specified by:
getValidValuesin interfaceCondition- Parameters:
property- property name- Returns:
- set of valid values for the property
- Throws:
PolicyException- if unable to get theSyntax
-
setProperties
public void setProperties(Map properties) throws PolicyException
Deprecated.Sets the properties of the condition. Evaluation ofConditionDecisionis influenced by these properties.- Specified by:
setPropertiesin interfaceCondition- Parameters:
properties- the properties of the condition that governs whether a policy applies. The properties should define value forMAX_SESSION_TIMEand optionallyTERMINATE_SESSION. The value should be a Set of string values. The value forMAX_SESSION_TIMEshould be parse-able as anInteger- Throws:
PolicyException- if properties is null or does not contain valid value forMAX_SESSION_TIME- See Also:
ConditionDecision
-
getProperties
public Map getProperties()
Deprecated.Gets the properties of the condition.- Specified by:
getPropertiesin interfaceCondition- Returns:
- unmodifiable
Mapview of the properties that govern the evaluation of the condition. Please note that properties is not cloned before returning - See Also:
Condition.setProperties(java.util.Map<java.lang.String, java.util.Set<java.lang.String>>)
-
getConditionDecision
public ConditionDecision getConditionDecision(SSOToken token, Map env) throws PolicyException, SSOException
Deprecated.Gets the decision computed by this condition object, based on the map of environment parameters or the user token. If the value ofTERMINATE_SESSIONis true and the condition evaluation is false, it terminates the user session.- Specified by:
getConditionDecisionin interfaceCondition- Parameters:
token- single-sign-on token of the userenv- request specific environment map of key/value pair. This condition looks for value of keyREQUEST_SESSION_CREATION_TIMEin the map. And the value should be aLong. If theenvis null of does not define value forREQUEST_SESSION_CREATION_TIME, the value will be obtained from SSO token of the user- Returns:
- The condition decision. The condition decision encapsulates whether a policy applies for the request and advice messages generated by the condition. Policy framework continues evaluating a policy only if it applies to the request as indicated by the condition decision. Otherwise, further evaluation of the policy is skipped. However, the advice messages encapsulated in the condition decision are aggregated and passed up, encapsulated in the policy decision
- Throws:
PolicyException- if the condition has not been initializedSSOException- if the SSO token is invalid or there is error when trying to destroy the SSO token- See Also:
ConditionDecision
-
-