public class CurrentEnvModule extends AttributeFinderModule
The XACML specification doesn't require that values be cached (ie, remain consistent within an
evaluation), but does allow it. Any caching, as well as details of which time to use (time at the
PEP, PDP, etc.) is taken care of by the EvaluationCtx
which is used to supply the
current values.
Modifier and Type | Field and Description |
---|---|
static String |
ENVIRONMENT_CURRENT_DATE
Standard environment variable that represents the current date
|
static String |
ENVIRONMENT_CURRENT_DATETIME
Standard environment variable that represents the current date and time
|
static String |
ENVIRONMENT_CURRENT_TIME
Standard environment variable that represents the current time
|
Constructor and Description |
---|
CurrentEnvModule() |
Modifier and Type | Method and Description |
---|---|
EvaluationResult |
findAttribute(URI attributeType,
URI attributeId,
String issuer,
URI category,
EvaluationCtx context)
Used to get the current time, date, or dateTime.
|
Set<String> |
getSupportedCategories()
Returns a
Set with a single String specifying that environment
attributes are supported by this module. |
boolean |
isDesignatorSupported()
Returns true always because this module supports designators.
|
findAttribute, getIdentifier, getSupportedIds, invalidateCache, isSelectorSupported
public static final String ENVIRONMENT_CURRENT_TIME
public static final String ENVIRONMENT_CURRENT_DATE
public static final String ENVIRONMENT_CURRENT_DATETIME
public boolean isDesignatorSupported()
isDesignatorSupported
in class AttributeFinderModule
public Set<String> getSupportedCategories()
Set
with a single String
specifying that environment
attributes are supported by this module.getSupportedCategories
in class AttributeFinderModule
Set
with AttributeDesignator
includedpublic EvaluationResult findAttribute(URI attributeType, URI attributeId, String issuer, URI category, EvaluationCtx context)
findAttribute
in class AttributeFinderModule
attributeType
- the datatype of the attributes to find, which must be time, date, or
dateTime for this module to resolve a valueattributeId
- the identifier of the attributes to find, which must be one of the three
ENVIRONMENT_* fields for this module to resolve a valueissuer
- the issuer of the attributes, or null if unspecifiedcategory
- the category of the attributecontext
- the representation of the request dataCopyright © 2022 WSO2. All rights reserved.