Apache CXF API

org.apache.cxf.sts.token.renewer
Class SAMLTokenRenewer

java.lang.Object
  extended by org.apache.cxf.sts.token.renewer.SAMLTokenRenewer
All Implemented Interfaces:
TokenRenewer

public class SAMLTokenRenewer
extends Object
implements TokenRenewer

A TokenRenewer implementation that renews a (valid or expired) SAML Token.


Field Summary
static long DEFAULT_MAX_EXPIRY
           
 
Constructor Summary
SAMLTokenRenewer()
           
 
Method Summary
 boolean canHandleToken(ReceivedToken renewTarget)
          Return true if this TokenRenewer implementation is able to renew a token.
 boolean canHandleToken(ReceivedToken renewTarget, String realm)
          Return true if this TokenRenewer implementation is able to renew a token in the given realm.
 ConditionsProvider getConditionsProvider()
          Get the ConditionsProvider
 long getMaxExpiry()
          Get how long a token is allowed to be expired for before renewal (in seconds).
 Map<String,SAMLRealm> getRealmMap()
          Get the map of realm->SAMLRealm for this token provider
 boolean isAllowRenewalAfterExpiry()
          Get whether we allow renewal after expiry.
 boolean isSignToken()
          Return whether the provided token will be signed or not.
 TokenRenewerResponse renewToken(TokenRenewerParameters tokenParameters)
          Renew a token given a TokenRenewerParameters
 void setAllowRenewalAfterExpiry(boolean allowRenewalAfterExpiry)
          Set whether we allow renewal after expiry.
 void setConditionsProvider(ConditionsProvider conditionsProvider)
          Set the ConditionsProvider
 void setMaxExpiry(long newExpiry)
          Set a new value (in seconds) for how long a token is allowed to be expired for before renewal.
 void setRealmMap(Map<String,SAMLRealm> realms)
          Set the map of realm->SAMLRealm for this token provider
 void setSignToken(boolean signToken)
          Set whether the provided token will be signed or not.
 void setVerifyProofOfPossession(boolean verifyProofOfPossession)
          Set whether proof of possession is required or not to renew a token
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MAX_EXPIRY

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

SAMLTokenRenewer

public SAMLTokenRenewer()
Method Detail

canHandleToken

public boolean canHandleToken(ReceivedToken renewTarget)
Return true if this TokenRenewer implementation is able to renew a token.

Specified by:
canHandleToken in interface TokenRenewer

canHandleToken

public boolean canHandleToken(ReceivedToken renewTarget,
                              String realm)
Return true if this TokenRenewer implementation is able to renew a token in the given realm.

Specified by:
canHandleToken in interface TokenRenewer

setVerifyProofOfPossession

public void setVerifyProofOfPossession(boolean verifyProofOfPossession)
Set whether proof of possession is required or not to renew a token

Specified by:
setVerifyProofOfPossession in interface TokenRenewer

isAllowRenewalAfterExpiry

public boolean isAllowRenewalAfterExpiry()
Get whether we allow renewal after expiry. The default is false.


setAllowRenewalAfterExpiry

public void setAllowRenewalAfterExpiry(boolean allowRenewalAfterExpiry)
Set whether we allow renewal after expiry. The default is false.

Specified by:
setAllowRenewalAfterExpiry in interface TokenRenewer

setMaxExpiry

public void setMaxExpiry(long newExpiry)
Set a new value (in seconds) for how long a token is allowed to be expired for before renewal. The default is 30 minutes.


getMaxExpiry

public long getMaxExpiry()
Get how long a token is allowed to be expired for before renewal (in seconds). The default is 30 minutes.


renewToken

public TokenRenewerResponse renewToken(TokenRenewerParameters tokenParameters)
Renew a token given a TokenRenewerParameters

Specified by:
renewToken in interface TokenRenewer

setConditionsProvider

public void setConditionsProvider(ConditionsProvider conditionsProvider)
Set the ConditionsProvider


getConditionsProvider

public ConditionsProvider getConditionsProvider()
Get the ConditionsProvider


isSignToken

public boolean isSignToken()
Return whether the provided token will be signed or not. Default is true.


setSignToken

public void setSignToken(boolean signToken)
Set whether the provided token will be signed or not. Default is true.


setRealmMap

public void setRealmMap(Map<String,SAMLRealm> realms)
Set the map of realm->SAMLRealm for this token provider

Parameters:
realms - the map of realm->SAMLRealm for this token provider

getRealmMap

public Map<String,SAMLRealm> getRealmMap()
Get the map of realm->SAMLRealm for this token provider

Returns:
the map of realm->SAMLRealm for this token provider

Apache CXF API

Apache CXF