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) voidclose()createArtifact(String entityId) Creates an artifact.resolveArtifact(AuthenticatedClientSessionModel clientSessionModel, String artifact) selectSourceClient(KeycloakSession session, String 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 - Specified by:
resolveArtifactin interfaceArtifactResolver- Throws:
ArtifactResolverProcessingException
-
selectSourceClient
public ClientModel selectSourceClient(KeycloakSession session, String artifact) throws ArtifactResolverProcessingException - Specified by:
selectSourceClientin interfaceArtifactResolver- Throws:
ArtifactResolverProcessingException
-
buildArtifact
public String buildArtifact(AuthenticatedClientSessionModel clientSessionModel, String entityId, String artifactResponse) throws ArtifactResolverProcessingException - Specified by:
buildArtifactin interfaceArtifactResolver- Throws:
ArtifactResolverProcessingException
-
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()
-