Apache CXF API

org.apache.cxf.sts.token.provider
Class DefaultConditionsProvider

java.lang.Object
  extended by org.apache.cxf.sts.token.provider.DefaultConditionsProvider
All Implemented Interfaces:
ConditionsProvider

public class DefaultConditionsProvider
extends Object
implements ConditionsProvider

A default implementation of the ConditionsProvider interface.


Field Summary
static long DEFAULT_MAX_LIFETIME
           
 
Constructor Summary
DefaultConditionsProvider()
           
 
Method Summary
protected  List<org.apache.wss4j.common.saml.bean.AudienceRestrictionBean> createAudienceRestrictions(TokenProviderParameters providerParameters)
          Create a list of AudienceRestrictions to be added to the Conditions Element of the issued Assertion.
protected  String extractAddressFromParticipantsEPR(Object participants)
          Extract an address from a Participants EPR DOM element
 org.apache.wss4j.common.saml.bean.ConditionsBean getConditions(TokenProviderParameters providerParameters)
          Get a ConditionsBean object.
 long getFutureTimeToLive()
          Get how long (in seconds) a client-supplied Created Element is allowed to be in the future.
 long getLifetime()
          Get the default lifetime in seconds for issued SAML token where requestor doesn't specify a lifetime element
 long getMaxLifetime()
          Get the maximum lifetime in seconds for issued SAML token if requestor specifies lifetime element
 boolean isAcceptClientLifetime()
          Is client lifetime element accepted Default: false
 boolean isFailLifetimeExceedance()
          If requested lifetime exceeds shall it fail (default) or overwrite with maximum lifetime
 void setAcceptClientLifetime(boolean acceptClientLifetime)
          Set whether client lifetime is accepted
 void setFailLifetimeExceedance(boolean failLifetimeExceedance)
          If requested lifetime exceeds shall it fail (default) or overwrite with maximum lifetime
 void setFutureTimeToLive(long futureTimeToLive)
          Set how long (in seconds) a client-supplied Created Element is allowed to be in the future.
 void setLifetime(long lifetime)
          Set the default lifetime in seconds for issued SAML tokens
 void setMaxLifetime(long maxLifetime)
          Set the maximum lifetime in seconds for issued SAML tokens
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_LIFETIME

public static final long DEFAULT_MAX_LIFETIME
See Also:
Constant Field Values
Constructor Detail

DefaultConditionsProvider

public DefaultConditionsProvider()
Method Detail

getFutureTimeToLive

public long getFutureTimeToLive()
Get how long (in seconds) a client-supplied Created Element is allowed to be in the future. The default is 60 seconds to avoid common problems relating to clock skew.


setFutureTimeToLive

public void setFutureTimeToLive(long futureTimeToLive)
Set how long (in seconds) a client-supplied Created Element is allowed to be in the future. The default is 60 seconds to avoid common problems relating to clock skew.


setLifetime

public void setLifetime(long lifetime)
Set the default lifetime in seconds for issued SAML tokens

Parameters:
default - lifetime in seconds

getLifetime

public long getLifetime()
Get the default lifetime in seconds for issued SAML token where requestor doesn't specify a lifetime element

Specified by:
getLifetime in interface ConditionsProvider
Returns:
the lifetime in seconds

setMaxLifetime

public void setMaxLifetime(long maxLifetime)
Set the maximum lifetime in seconds for issued SAML tokens

Parameters:
maximum - lifetime in seconds

getMaxLifetime

public long getMaxLifetime()
Get the maximum lifetime in seconds for issued SAML token if requestor specifies lifetime element

Returns:
the maximum lifetime in seconds

isAcceptClientLifetime

public boolean isAcceptClientLifetime()
Is client lifetime element accepted Default: false


setAcceptClientLifetime

public void setAcceptClientLifetime(boolean acceptClientLifetime)
Set whether client lifetime is accepted


isFailLifetimeExceedance

public boolean isFailLifetimeExceedance()
If requested lifetime exceeds shall it fail (default) or overwrite with maximum lifetime


setFailLifetimeExceedance

public void setFailLifetimeExceedance(boolean failLifetimeExceedance)
If requested lifetime exceeds shall it fail (default) or overwrite with maximum lifetime


getConditions

public org.apache.wss4j.common.saml.bean.ConditionsBean getConditions(TokenProviderParameters providerParameters)
Get a ConditionsBean object.

Specified by:
getConditions in interface ConditionsProvider

createAudienceRestrictions

protected List<org.apache.wss4j.common.saml.bean.AudienceRestrictionBean> createAudienceRestrictions(TokenProviderParameters providerParameters)
Create a list of AudienceRestrictions to be added to the Conditions Element of the issued Assertion. The default behaviour is to add a single Audience URI per AudienceRestriction Element. The Audience URIs are from an AppliesTo address, and the wst:Participants (if either exist).


extractAddressFromParticipantsEPR

protected String extractAddressFromParticipantsEPR(Object participants)
Extract an address from a Participants EPR DOM element


Apache CXF API

Apache CXF