Package org.apache.cxf.sts.token.renewer
Class SAMLTokenRenewer
java.lang.Object
org.apache.cxf.sts.token.provider.AbstractSAMLTokenProvider
org.apache.cxf.sts.token.renewer.SAMLTokenRenewer
- All Implemented Interfaces:
TokenRenewer
A TokenRenewer implementation that renews a (valid or expired) SAML Token.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandleToken(ReceivedToken renewTarget) Return true if this TokenRenewer implementation is able to renew a token.booleancanHandleToken(ReceivedToken renewTarget, String realm) Return true if this TokenRenewer implementation is able to renew a token in the given realm.Get the ConditionsProviderlongGet how long a token is allowed to be expired for before renewal (in seconds).Get the map of realm->RealmProperties for this token providerbooleanGet whether we allow renewal after expiry.booleanReturn whether the provided token will be signed or not.renewToken(TokenRenewerParameters tokenParameters) Renew a token given a TokenRenewerParametersvoidsetAllowRenewalAfterExpiry(boolean allowRenewalAfterExpiry) Set whether we allow renewal after expiry.voidsetConditionsProvider(ConditionsProvider conditionsProvider) Set the ConditionsProvidervoidsetMaxExpiry(long newExpiry) Set a new value (in seconds) for how long a token is allowed to be expired for before renewal.voidsetRealmMap(Map<String, ? extends RealmProperties> realms) Set the map of realm->RealmProperties for this token providervoidsetSignToken(boolean signToken) Set whether the provided token will be signed or not.voidsetVerifyProofOfPossession(boolean verifyProofOfPossession) Set whether proof of possession is required or not to renew a tokenMethods inherited from class org.apache.cxf.sts.token.provider.AbstractSAMLTokenProvider
signToken
-
Field Details
-
DEFAULT_MAX_EXPIRY
public static final long DEFAULT_MAX_EXPIRY- See Also:
-
-
Constructor Details
-
SAMLTokenRenewer
public SAMLTokenRenewer()
-
-
Method Details
-
canHandleToken
Return true if this TokenRenewer implementation is able to renew a token.- Specified by:
canHandleTokenin interfaceTokenRenewer
-
canHandleToken
Return true if this TokenRenewer implementation is able to renew a token in the given realm.- Specified by:
canHandleTokenin interfaceTokenRenewer
-
setVerifyProofOfPossession
public void setVerifyProofOfPossession(boolean verifyProofOfPossession) Set whether proof of possession is required or not to renew a token- Specified by:
setVerifyProofOfPossessionin interfaceTokenRenewer
-
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:
setAllowRenewalAfterExpiryin interfaceTokenRenewer
-
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
Renew a token given a TokenRenewerParameters- Specified by:
renewTokenin interfaceTokenRenewer
-
setConditionsProvider
Set the 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
Set the map of realm->RealmProperties for this token provider- Parameters:
realms- the map of realm->RealmProperties for this token provider
-
getRealmMap
Get the map of realm->RealmProperties for this token provider- Returns:
- the map of realm->RealmProperties for this token provider
-