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
 
 public abstract class SamlService.BindingProtocol extends Object 
- 
- 
Field SummaryFields Modifier and Type Field Description protected booleanredirectToAuthentication
 - 
Constructor SummaryConstructors Constructor Description BindingProtocol()
 - 
Method SummaryAll Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected javax.ws.rs.core.ResponsebasicChecks(String samlRequest, String samlResponse, String artifact)protected abstract booleancontainsUnencryptedSignature(SAMLDocumentHolder documentHolder)protected abstract StringencodeSamlDocument(Document samlDocument)protected abstract javax.ws.rs.core.Responseerror(KeycloakSession session, AuthenticationSessionModel authenticationSession, javax.ws.rs.core.Response.Status status, String message, Object... parameters)javax.ws.rs.core.Responseexecute(String samlRequest, String samlResponse, String relayState, String artifact)voidexecute(javax.ws.rs.container.AsyncResponse asyncReponse, String samlRequest, String samlResponse, String relayState, String artifact)protected abstract SAMLDocumentHolderextractRequestDocument(String samlRequest)protected abstract SAMLDocumentHolderextractResponseDocument(String response)protected abstract StringgetBindingType()protected StringgetBindingType(AuthnRequestType requestAbstractType)protected URIgetExpectedDestinationUri(KeycloakSession session)KEYCLOAK-12616, KEYCLOAK-12944: construct the expected destination URI using the configured base URI.protected voidhandleArtifact(javax.ws.rs.container.AsyncResponse asyncResponse, String artifact, String relayState)Handle a received artifact message.protected javax.ws.rs.core.ResponsehandleSamlRequest(String samlRequest, String relayState)protected javax.ws.rs.core.ResponsehandleSamlResponse(String samlResponse, String relayState)protected booleanisDestinationRequired()protected javax.ws.rs.core.ResponseloginRequest(String relayState, AuthnRequestType requestAbstractType, ClientModel client)protected javax.ws.rs.core.ResponselogoutRequest(LogoutRequestType logoutRequest, ClientModel client, String relayState)protected abstract voidverifySignature(SAMLDocumentHolder documentHolder, ClientModel client)
 
- 
- 
- 
Method Detail- 
errorprotected abstract javax.ws.rs.core.Response error(KeycloakSession session, AuthenticationSessionModel authenticationSession, javax.ws.rs.core.Response.Status status, String message, Object... parameters) 
 - 
basicChecksprotected javax.ws.rs.core.Response basicChecks(String samlRequest, String samlResponse, String artifact) 
 - 
isDestinationRequiredprotected boolean isDestinationRequired() 
 - 
handleSamlResponseprotected javax.ws.rs.core.Response handleSamlResponse(String samlResponse, String relayState) 
 - 
handleSamlRequestprotected javax.ws.rs.core.Response handleSamlRequest(String samlRequest, String relayState) 
 - 
handleArtifactprotected void handleArtifact(javax.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
 
 - 
encodeSamlDocumentprotected abstract String encodeSamlDocument(Document samlDocument) throws ProcessingException - Throws:
- ProcessingException
 
 - 
verifySignatureprotected abstract void verifySignature(SAMLDocumentHolder documentHolder, ClientModel client) throws VerificationException - Throws:
- VerificationException
 
 - 
containsUnencryptedSignatureprotected abstract boolean containsUnencryptedSignature(SAMLDocumentHolder documentHolder) 
 - 
extractRequestDocumentprotected abstract SAMLDocumentHolder extractRequestDocument(String samlRequest) 
 - 
extractResponseDocumentprotected abstract SAMLDocumentHolder extractResponseDocument(String response) 
 - 
loginRequestprotected javax.ws.rs.core.Response loginRequest(String relayState, AuthnRequestType requestAbstractType, ClientModel client) 
 - 
getBindingTypeprotected String getBindingType(AuthnRequestType requestAbstractType) 
 - 
getBindingTypeprotected abstract String getBindingType() 
 - 
logoutRequestprotected javax.ws.rs.core.Response logoutRequest(LogoutRequestType logoutRequest, ClientModel client, String relayState) 
 - 
executepublic javax.ws.rs.core.Response execute(String samlRequest, String samlResponse, String relayState, String artifact) 
 - 
executepublic void execute(javax.ws.rs.container.AsyncResponse asyncReponse, String samlRequest, String samlResponse, String relayState, String artifact)
 - 
getExpectedDestinationUriprotected URI getExpectedDestinationUri(KeycloakSession session) KEYCLOAK-12616, KEYCLOAK-12944: construct the expected destination URI using the configured base URI.- Parameters:
- session- a reference to the- KeycloakSession.
- Returns:
- the constructed URI.
 
 
- 
 
-