Class AbstractRequestAssertionConsumerHandler
- java.lang.Object
-
- org.apache.cxf.rs.security.saml.sso.AbstractSSOSpHandler
-
- org.apache.cxf.rs.security.saml.sso.AbstractRequestAssertionConsumerHandler
-
- Direct Known Subclasses:
RequestAssertionConsumerFilter,RequestAssertionConsumerService
public abstract class AbstractRequestAssertionConsumerHandler extends AbstractSSOSpHandler
-
-
Constructor Summary
Constructors Constructor Description AbstractRequestAssertionConsumerHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()protected StringcreateSecurityContext(RequestState requestState, String encodedSamlResponse, String relayState, boolean postBinding)protected javax.ws.rs.core.ResponsedoProcessSamlResponse(String encodedSamlResponse, String relayState, boolean postBinding)StringgetApplicationURL()StringgetAssertionConsumerServiceAddress()TokenReplayCache<String>getReplayCache()booleanisCheckClientAddress()booleanisEnforceResponseSigned()booleanisParseApplicationURLFromRelayState()protected booleanisStateExpired(long stateCreatedAt, long expiresAt)booleanisSupportBase64Encoding()booleanisSupportDeflateEncoding()protected RequestStateprocessRelayState(String relayState)protected voidreportError(String code)voidsetApplicationURL(String applicationURL)Set the Application URL to forward to, for the unsolicited IdP case.voidsetAssertionConsumerServiceAddress(String assertionConsumerServiceAddress)voidsetCheckClientAddress(boolean checkClientAddress)voidsetEnforceAssertionsSigned(boolean enforceAssertionsSigned)Enforce that Assertions must be signed if the POST binding was used.voidsetEnforceKnownIssuer(boolean enforceKnownIssuer)Enforce that the Issuer of the received Response/Assertion is known to this RACS.voidsetEnforceResponseSigned(boolean enforceResponseSigned)Enforce that a SAML Response must be signed.voidsetKeyInfoMustBeAvailable(boolean keyInfoMustBeAvailable)voidsetMessageContext(MessageContext mc)voidsetParseApplicationURLFromRelayState(boolean parseApplicationURLFromRelayState)Whether to parse the application URL to forward to from the RelayState, for the unsolicted IdP case.voidsetReplayCache(TokenReplayCache<String> replayCache)voidsetSupportBase64Encoding(boolean supportBase64Encoding)voidsetSupportDeflateEncoding(boolean deflate)protected voidvalidateSamlResponseProtocol(org.opensaml.saml.saml2.core.Response samlResponse)Validate the received SAML Response as per the protocolprotected SSOValidatorResponsevalidateSamlSSOResponse(boolean postBinding, org.opensaml.saml.saml2.core.Response samlResponse, RequestState requestState)Validate the received SAML Response as per the Web SSO profile-
Methods inherited from class org.apache.cxf.rs.security.saml.sso.AbstractSSOSpHandler
createCookie, getCallbackHandler, getIdpServiceAddress, getIssuerId, getSignatureCrypto, getSignatureUsername, getStateProvider, getStateTimeToLive, isSupportUnsolicited, setCallbackHandler, setCallbackHandlerClass, setIdpServiceAddress, setIssuerId, setSignatureCrypto, setSignaturePropertiesFile, setSignatureUsername, setStateProvider, setStateTimeToLive, setSupportUnsolicited
-
-
-
-
Method Detail
-
setMessageContext
@Context public void setMessageContext(MessageContext mc)
-
setSupportDeflateEncoding
public void setSupportDeflateEncoding(boolean deflate)
-
isSupportDeflateEncoding
public boolean isSupportDeflateEncoding()
-
setReplayCache
public void setReplayCache(TokenReplayCache<String> replayCache)
-
getReplayCache
public TokenReplayCache<String> getReplayCache() throws Exception
- Throws:
Exception
-
setEnforceAssertionsSigned
public void setEnforceAssertionsSigned(boolean enforceAssertionsSigned)
Enforce that Assertions must be signed if the POST binding was used. The default is true.
-
setEnforceKnownIssuer
public void setEnforceKnownIssuer(boolean enforceKnownIssuer)
Enforce that the Issuer of the received Response/Assertion is known to this RACS. The default is true.
-
setSupportBase64Encoding
public void setSupportBase64Encoding(boolean supportBase64Encoding)
-
isSupportBase64Encoding
public boolean isSupportBase64Encoding()
-
close
@PreDestroy public void close()
- Overrides:
closein classAbstractSSOSpHandler
-
doProcessSamlResponse
protected javax.ws.rs.core.Response doProcessSamlResponse(String encodedSamlResponse, String relayState, boolean postBinding)
-
createSecurityContext
protected String createSecurityContext(RequestState requestState, String encodedSamlResponse, String relayState, boolean postBinding)
-
processRelayState
protected RequestState processRelayState(String relayState)
-
validateSamlResponseProtocol
protected void validateSamlResponseProtocol(org.opensaml.saml.saml2.core.Response samlResponse)
Validate the received SAML Response as per the protocol
-
validateSamlSSOResponse
protected SSOValidatorResponse validateSamlSSOResponse(boolean postBinding, org.opensaml.saml.saml2.core.Response samlResponse, RequestState requestState)
Validate the received SAML Response as per the Web SSO profile
-
reportError
protected void reportError(String code)
-
setKeyInfoMustBeAvailable
public void setKeyInfoMustBeAvailable(boolean keyInfoMustBeAvailable)
-
isEnforceResponseSigned
public boolean isEnforceResponseSigned()
-
setEnforceResponseSigned
public void setEnforceResponseSigned(boolean enforceResponseSigned)
Enforce that a SAML Response must be signed.
-
getApplicationURL
public String getApplicationURL()
-
setApplicationURL
public void setApplicationURL(String applicationURL)
Set the Application URL to forward to, for the unsolicited IdP case.- Parameters:
applicationURL-
-
isParseApplicationURLFromRelayState
public boolean isParseApplicationURLFromRelayState()
-
setParseApplicationURLFromRelayState
public void setParseApplicationURLFromRelayState(boolean parseApplicationURLFromRelayState)
Whether to parse the application URL to forward to from the RelayState, for the unsolicted IdP case.- Parameters:
parseApplicationURLFromRelayState-
-
getAssertionConsumerServiceAddress
public String getAssertionConsumerServiceAddress()
-
setAssertionConsumerServiceAddress
public void setAssertionConsumerServiceAddress(String assertionConsumerServiceAddress)
-
isCheckClientAddress
public boolean isCheckClientAddress()
-
setCheckClientAddress
public void setCheckClientAddress(boolean checkClientAddress)
-
isStateExpired
protected boolean isStateExpired(long stateCreatedAt, long expiresAt)
-
-