Package org.keycloak.protocol.saml
Class DefaultSamlArtifactResolver
java.lang.Object
org.keycloak.protocol.saml.DefaultSamlArtifactResolver
- All Implemented Interfaces:
 ArtifactResolver,Provider
ArtifactResolver for artifact-04 format.
 Other kind of format for artifact are allowed by standard but not specified.
 Artifact 04 is the only one specified in SAML2.0 specification.
- 
Field Summary
Fields - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionbuildArtifact(AuthenticatedClientSessionModel clientSessionModel, String entityId, String artifactResponse) Creates and stores an artifactvoidclose()createArtifact(String entityId) Creates an artifact.resolveArtifact(AuthenticatedClientSessionModel clientSessionModel, String artifact) Returns a serialized Saml ArtifactResponse corresponding to the artifact that was created bybuildArtifactselectSourceClient(KeycloakSession session, String artifact) Returns client model that issued artifact 
- 
Field Details
- 
logger
protected static final org.jboss.logging.Logger logger 
 - 
 - 
Constructor Details
- 
DefaultSamlArtifactResolver
public DefaultSamlArtifactResolver() 
 - 
 - 
Method Details
- 
resolveArtifact
public String resolveArtifact(AuthenticatedClientSessionModel clientSessionModel, String artifact) throws ArtifactResolverProcessingException Description copied from interface:ArtifactResolverReturns a serialized Saml ArtifactResponse corresponding to the artifact that was created bybuildArtifact- Specified by:
 resolveArtifactin interfaceArtifactResolver- Parameters:
 clientSessionModel- client session model that can be used for obtaining the artifact responseartifact- the artifact- Returns:
 - serialized Saml ArtifactResponse corresponding to the artifact
 - Throws:
 ArtifactResolverProcessingException- When an error occurs during resolution of the artifact.
 - 
selectSourceClient
public ClientModel selectSourceClient(KeycloakSession session, String artifact) throws ArtifactResolverProcessingException Description copied from interface:ArtifactResolverReturns client model that issued artifact- Specified by:
 selectSourceClientin interfaceArtifactResolver- Parameters:
 session- KeycloakSession for searching for client corresponding clientartifact- the artifact- Returns:
 - the client model that issued the artifact
 - Throws:
 ArtifactResolverProcessingException- When an error occurs during client search
 - 
buildArtifact
public String buildArtifact(AuthenticatedClientSessionModel clientSessionModel, String entityId, String artifactResponse) throws ArtifactResolverProcessingException Description copied from interface:ArtifactResolverCreates and stores an artifact- Specified by:
 buildArtifactin interfaceArtifactResolver- Parameters:
 clientSessionModel- client session model that can be used for storing the response for artifactentityId- id of an issuer that issued the artifactResponseartifactResponse- serialized Saml ArtifactResponse that represents the response for created artifact- Returns:
 - the artifact
 - Throws:
 ArtifactResolverProcessingException- When an error occurs during creation of the artifact.
 - 
createArtifact
Creates an artifact. Format is:SAML_artifact := B64(TypeCode EndpointIndex RemainingArtifact)
TypeCode := 0x0004 EndpointIndex := Byte1Byte2 RemainingArtifact := SourceID MessageHandle
SourceID := 20-byte_sequence, used by the artifact receiver to determine artifact issuer MessageHandle := 20-byte_sequence
- Parameters:
 entityId- the entity id to encode in the sourceId- Returns:
 - an artifact
 - Throws:
 ArtifactResolverProcessingException
 - 
close
public void close() 
 -