public class DefaultSamlArtifactResolver extends Object implements ArtifactResolver
Modifier and Type | Field and Description |
---|---|
protected static org.jboss.logging.Logger |
logger |
Constructor and Description |
---|
DefaultSamlArtifactResolver() |
Modifier and Type | Method and Description |
---|---|
String |
buildArtifact(AuthenticatedClientSessionModel clientSessionModel,
String entityId,
String artifactResponse)
Creates and stores an artifact
|
void |
close() |
String |
createArtifact(String entityId)
Creates an artifact.
|
String |
resolveArtifact(AuthenticatedClientSessionModel clientSessionModel,
String artifact)
Returns a serialized Saml ArtifactResponse corresponding to the artifact that was created by
buildArtifact |
ClientModel |
selectSourceClient(KeycloakSession session,
String artifact)
Returns client model that issued artifact
|
public String resolveArtifact(AuthenticatedClientSessionModel clientSessionModel, String artifact) throws ArtifactResolverProcessingException
ArtifactResolver
buildArtifact
resolveArtifact
in interface ArtifactResolver
clientSessionModel
- client session model that can be used for obtaining the artifact responseartifact
- the artifactArtifactResolverProcessingException
- When an error occurs during resolution of the artifact.public ClientModel selectSourceClient(KeycloakSession session, String artifact) throws ArtifactResolverProcessingException
ArtifactResolver
selectSourceClient
in interface ArtifactResolver
session
- KeycloakSession for searching for client corresponding clientartifact
- the artifactArtifactResolverProcessingException
- When an error occurs during client searchpublic String buildArtifact(AuthenticatedClientSessionModel clientSessionModel, String entityId, String artifactResponse) throws ArtifactResolverProcessingException
ArtifactResolver
buildArtifact
in interface ArtifactResolver
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 artifactArtifactResolverProcessingException
- When an error occurs during creation of the artifact.public String createArtifact(String entityId) throws ArtifactResolverProcessingException
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
entityId
- the entity id to encode in the sourceIdArtifactResolverProcessingException
Copyright © 2021 JBoss by Red Hat. All rights reserved.