Package org.keycloak.protocol.saml
Class SamlService.BindingProtocol
java.lang.Object
org.keycloak.protocol.saml.SamlService.BindingProtocol
- Direct Known Subclasses:
- SamlService.PostBindingProtocol,- SamlService.RedirectBindingProtocol
- Enclosing class:
- SamlService
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected jakarta.ws.rs.core.ResponsebasicChecks(String samlRequest, String samlResponse, String artifact) protected abstract booleancontainsUnencryptedSignature(SAMLDocumentHolder documentHolder) protected abstract StringencodeSamlDocument(Document samlDocument) protected abstract jakarta.ws.rs.core.Responseerror(KeycloakSession session, AuthenticationSessionModel authenticationSession, jakarta.ws.rs.core.Response.Status status, String message, Object... parameters) voidexecute(jakarta.ws.rs.container.AsyncResponse asyncReponse, String samlRequest, String samlResponse, String relayState, String artifact) jakarta.ws.rs.core.Responseprotected abstract SAMLDocumentHolderextractRequestDocument(String samlRequest) protected abstract SAMLDocumentHolderextractResponseDocument(String response) protected abstract Stringprotected StringgetBindingType(AuthnRequestType requestAbstractType) protected URIgetExpectedDestinationUri(KeycloakSession session) KEYCLOAK-12616, KEYCLOAK-12944: construct the expected destination URI using the configured base URI.protected voidhandleArtifact(jakarta.ws.rs.container.AsyncResponse asyncResponse, String artifact, String relayState) Handle a received artifact message.protected jakarta.ws.rs.core.ResponsehandleSamlRequest(String samlRequest, String relayState) protected jakarta.ws.rs.core.ResponsehandleSamlResponse(String samlResponse, String relayState) protected booleanprotected jakarta.ws.rs.core.ResponseloginRequest(String relayState, AuthnRequestType requestAbstractType, ClientModel client) protected jakarta.ws.rs.core.ResponselogoutRequest(LogoutRequestType logoutRequest, ClientModel client, String relayState) protected abstract voidverifySignature(SAMLDocumentHolder documentHolder, ClientModel client) 
- 
Field Details- 
redirectToAuthenticationprotected boolean redirectToAuthentication
 
- 
- 
Constructor Details- 
BindingProtocolpublic BindingProtocol()
 
- 
- 
Method Details- 
errorprotected abstract jakarta.ws.rs.core.Response error(KeycloakSession session, AuthenticationSessionModel authenticationSession, jakarta.ws.rs.core.Response.Status status, String message, Object... parameters) 
- 
basicChecks
- 
isDestinationRequiredprotected boolean isDestinationRequired()
- 
handleSamlResponse
- 
handleSamlRequest
- 
handleArtifactprotected void handleArtifact(jakarta.ws.rs.container.AsyncResponse asyncResponse, String artifact, String relayState) Handle a received artifact message. This means finding the client based on the content of the artifact, sending an ArtifactResolve, receiving an ArtifactResponse, and handling its content based on the "standard" workflows.- Parameters:
- artifact- the received artifact
- relayState- the current relay state
 
- 
encodeSamlDocument- Throws:
- ProcessingException
 
- 
verifySignatureprotected abstract void verifySignature(SAMLDocumentHolder documentHolder, ClientModel client) throws VerificationException - Throws:
- VerificationException
 
- 
containsUnencryptedSignature
- 
extractRequestDocument
- 
extractResponseDocument
- 
loginRequestprotected jakarta.ws.rs.core.Response loginRequest(String relayState, AuthnRequestType requestAbstractType, ClientModel client) 
- 
getBindingType
- 
getBindingType
- 
logoutRequestprotected jakarta.ws.rs.core.Response logoutRequest(LogoutRequestType logoutRequest, ClientModel client, String relayState) 
- 
execute
- 
execute
- 
getExpectedDestinationUriKEYCLOAK-12616, KEYCLOAK-12944: construct the expected destination URI using the configured base URI.- Parameters:
- session- a reference to the- KeycloakSession.
- Returns:
- the constructed URI.
 
 
-