public class SAMLClient extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
SAML_RELAYSTATE |
static String |
SAML_RESPONSE |
static String |
SAML_SIGALG |
static String |
SAML_SIGNATURE |
| Constructor and Description |
|---|
SAMLClient(SAMLConfig config)
Create a new SAMLClient, using the IdPConfig for endpoints and
validation.
|
| Modifier and Type | Method and Description |
|---|---|
org.opensaml.saml2.core.AuthnRequest |
createAuthnRequest(String requestId) |
void |
doSAMLRedirect(javax.servlet.http.HttpServletResponse response,
String relayState) |
String |
generateAuthnRequest(String requestId)
Create a new AuthnRequest suitable for sending to an HTTPRedirect binding
endpoint on the IdP.
|
IdPConfig |
getIdPConfig()
Get the configured IdpConfig.
|
SPConfig |
getSPConfig()
Get the configured SPConfig.
|
AttributeSet |
validateResponseGET(String queryString) |
AttributeSet |
validateResponsePOST(String _authnResponse)
Check an authnResponse and return the subject if validation succeeds.
|
public static final String SAML_RESPONSE
public static final String SAML_RELAYSTATE
public static final String SAML_SIGALG
public static final String SAML_SIGNATURE
public SAMLClient(SAMLConfig config) throws SAMLException
config - SAMLExceptionpublic IdPConfig getIdPConfig()
public SPConfig getSPConfig()
public org.opensaml.saml2.core.AuthnRequest createAuthnRequest(String requestId)
public String generateAuthnRequest(String requestId) throws SAMLException
requestId - random generated RequestIdSAMLExceptionpublic AttributeSet validateResponsePOST(String _authnResponse) throws SAMLException
_authnResponse - a base64-encoded AuthnResponse from the SPSAMLException - if validation failed.public AttributeSet validateResponseGET(String queryString) throws SAMLException
SAMLExceptionpublic void doSAMLRedirect(javax.servlet.http.HttpServletResponse response,
String relayState)
throws SAMLException,
org.opensaml.ws.message.encoder.MessageEncodingException
SAMLExceptionorg.opensaml.ws.message.encoder.MessageEncodingExceptionCopyright © 2015. All rights reserved.