public class SamlService extends AuthorizationEndpointBase
Modifier and Type | Class and Description |
---|---|
class |
SamlService.BindingProtocol |
protected class |
SamlService.PostBindingProtocol |
protected class |
SamlService.RedirectBindingProtocol |
Modifier and Type | Field and Description |
---|---|
static String |
ARTIFACT_RESOLUTION_SERVICE_PATH |
protected static org.jboss.logging.Logger |
logger |
APP_INITIATED_FLOW, authManager, clientConnection, event, headers, httpRequest, realm, session
Constructor and Description |
---|
SamlService(RealmModel realm,
EventBuilder event,
DestinationValidator destinationValidator) |
Modifier and Type | Method and Description |
---|---|
javax.ws.rs.core.Response |
artifactResolutionService(InputStream inputStream)
Handles SOAP messages.
|
javax.ws.rs.core.Response |
artifactResolve(ArtifactResolveType artifactResolveMessage,
SAMLDocumentHolder artifactResolveHolder)
Takes an artifact resolve message and returns the artifact response, if the artifact is found belonging to a session
of the issuer.
|
static int |
compareKeys(KeyWrapper o1,
KeyWrapper o2) |
String |
getDescriptor() |
static String |
getIDPMetadataDescriptor(javax.ws.rs.core.UriInfo uriInfo,
KeycloakSession session,
RealmModel realm) |
AuthenticationSessionModel |
getOrCreateLoginSessionForIdpInitiatedSso(KeycloakSession session,
RealmModel realm,
ClientModel client,
String relayState)
Creates a client session object for SAML IdP-initiated SSO session.
|
javax.ws.rs.core.Response |
idpInitiatedSSO(String clientUrlName,
String relayState) |
protected javax.ws.rs.core.Response |
newBrowserAuthentication(AuthenticationSessionModel authSession,
boolean isPassive,
boolean redirectToAuthentication) |
protected javax.ws.rs.core.Response |
newBrowserAuthentication(AuthenticationSessionModel authSession,
boolean isPassive,
boolean redirectToAuthentication,
SamlProtocol samlProtocol) |
SamlService.PostBindingProtocol |
newPostBindingProtocol() |
SamlService.RedirectBindingProtocol |
newRedirectBindingProtocol() |
void |
postBinding(javax.ws.rs.container.AsyncResponse asyncResponse,
String samlRequest,
String samlResponse,
String relayState,
String artifact) |
void |
redirectBinding(javax.ws.rs.container.AsyncResponse asyncResponse,
String samlRequest,
String samlResponse,
String relayState,
String artifact) |
javax.ws.rs.core.Response |
soapBinding(InputStream inputStream)
Handles SOAP messages.
|
checkRealm, checkSsl, createAuthenticationSession, createProcessor, getAuthenticationFlow, handleBrowserAuthenticationRequest
protected static final org.jboss.logging.Logger logger
public static final String ARTIFACT_RESOLUTION_SERVICE_PATH
public SamlService(RealmModel realm, EventBuilder event, DestinationValidator destinationValidator)
protected javax.ws.rs.core.Response newBrowserAuthentication(AuthenticationSessionModel authSession, boolean isPassive, boolean redirectToAuthentication)
protected javax.ws.rs.core.Response newBrowserAuthentication(AuthenticationSessionModel authSession, boolean isPassive, boolean redirectToAuthentication, SamlProtocol samlProtocol)
public SamlService.RedirectBindingProtocol newRedirectBindingProtocol()
public SamlService.PostBindingProtocol newPostBindingProtocol()
@GET public void redirectBinding(@Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @QueryParam(value="SAMLRequest") String samlRequest, @QueryParam(value="SAMLResponse") String samlResponse, @QueryParam(value="RelayState") String relayState, @QueryParam(value="SAMLart") String artifact)
@POST @Consumes(value="application/x-www-form-urlencoded") public void postBinding(@Suspended javax.ws.rs.container.AsyncResponse asyncResponse, @FormParam(value="SAMLRequest") String samlRequest, @FormParam(value="SAMLResponse") String samlResponse, @FormParam(value="RelayState") String relayState, @FormParam(value="SAMLart") String artifact)
@GET @Path(value="descriptor") @Produces(value="application/xml") public String getDescriptor() throws Exception
Exception
public static String getIDPMetadataDescriptor(javax.ws.rs.core.UriInfo uriInfo, KeycloakSession session, RealmModel realm)
public static int compareKeys(KeyWrapper o1, KeyWrapper o2)
@GET @Path(value="clients/{client}") @Produces(value="text/html; charset=utf-8") public javax.ws.rs.core.Response idpInitiatedSSO(@PathParam(value="client") String clientUrlName, @QueryParam(value="RelayState") String relayState)
public AuthenticationSessionModel getOrCreateLoginSessionForIdpInitiatedSso(KeycloakSession session, RealmModel realm, ClientModel client, String relayState)
session
- KC sessionrealm
- Realm to create client session inclient
- Client to create client session forrelayState
- Optional relay state - free field as per SAML specification@POST @Path(value="resolve") @Consumes(value={"application/soap+xml","text/xml"}) public javax.ws.rs.core.Response artifactResolutionService(InputStream inputStream)
inputStream
- the data of the request.@POST @Consumes(value={"application/soap+xml","text/xml"}) public javax.ws.rs.core.Response soapBinding(InputStream inputStream)
inputStream
- the data of the request.public javax.ws.rs.core.Response artifactResolve(ArtifactResolveType artifactResolveMessage, SAMLDocumentHolder artifactResolveHolder) throws ParsingException, ConfigurationException, ProcessingException
artifactResolveMessage
- The artifact resolve message sent by the clientartifactResolveHolder
- the document containing the artifact resolve message sent by the clientParsingException
ConfigurationException
ProcessingException
Copyright © 2021 JBoss by Red Hat. All rights reserved.