Package org.keycloak.protocol.saml
Class DefaultSamlArtifactResolver
- java.lang.Object
- 
- org.keycloak.protocol.saml.DefaultSamlArtifactResolver
 
- 
- All Implemented Interfaces:
- ArtifactResolver,- Provider
 
 public class DefaultSamlArtifactResolver extends Object implements ArtifactResolver 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 SummaryFields Modifier and Type Field Description protected static org.jboss.logging.Loggerlogger
 - 
Constructor SummaryConstructors Constructor Description DefaultSamlArtifactResolver()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbuildArtifact(AuthenticatedClientSessionModel clientSessionModel, String entityId, String artifactResponse)Creates and stores an artifactvoidclose()StringcreateArtifact(String entityId)Creates an artifact.StringresolveArtifact(AuthenticatedClientSessionModel clientSessionModel, String artifact)Returns a serialized Saml ArtifactResponse corresponding to the artifact that was created bybuildArtifactClientModelselectSourceClient(KeycloakSession session, String artifact)Returns client model that issued artifact
 
- 
- 
- 
Method Detail- 
resolveArtifactpublic 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 interface- ArtifactResolver
- Parameters:
- clientSessionModel- client session model that can be used for obtaining the artifact response
- artifact- the artifact
- Returns:
- serialized Saml ArtifactResponse corresponding to the artifact
- Throws:
- ArtifactResolverProcessingException- When an error occurs during resolution of the artifact.
 
 - 
selectSourceClientpublic ClientModel selectSourceClient(KeycloakSession session, String artifact) throws ArtifactResolverProcessingException Description copied from interface:ArtifactResolverReturns client model that issued artifact- Specified by:
- selectSourceClientin interface- ArtifactResolver
- Parameters:
- session- KeycloakSession for searching for client corresponding client
- artifact- the artifact
- Returns:
- the client model that issued the artifact
- Throws:
- ArtifactResolverProcessingException- When an error occurs during client search
 
 - 
buildArtifactpublic String buildArtifact(AuthenticatedClientSessionModel clientSessionModel, String entityId, String artifactResponse) throws ArtifactResolverProcessingException Description copied from interface:ArtifactResolverCreates and stores an artifact- Specified by:
- buildArtifactin interface- ArtifactResolver
- Parameters:
- clientSessionModel- client session model that can be used for storing the response for artifact
- entityId- id of an issuer that issued the artifactResponse
- artifactResponse- serialized Saml ArtifactResponse that represents the response for created artifact
- Returns:
- the artifact
- Throws:
- ArtifactResolverProcessingException- When an error occurs during creation of the artifact.
 
 - 
createArtifactpublic String createArtifact(String entityId) throws ArtifactResolverProcessingException 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
 
 
- 
 
-