T - the type of the requestpublic class PostRequestHttpObject<T extends RequestAbstractType> extends HTTPPostEncoder implements RequestHttpObject<T>
If signature credentials are supplied when creating the object the request will be signed.
DEFAULT_TEMPLATE_ID| Constructor and Description |
|---|
PostRequestHttpObject(T request,
String relayState,
X509Credential signatureCredentials,
String endpoint)
Constructor that puts together to resulting object.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getHttpHeaders()
Returns a mapping of header names and values that should be used when sending the request.
|
String |
getMethod()
Returns the HTTP method that should be used to send the request, via the user agent, to the Identity Provider.
|
T |
getRequest()
Returns the actual request (for easy access to its elements).
|
Map<String,String> |
getRequestParameters()
If the
RequestHttpObject.getMethod() returns "POST" the request should be posted to the Identity Provider. |
String |
getSendUrl()
Returns the complete URL that the SP application should use when the user agent is sent to the Identity Provider.
|
String |
toString() |
doDestroy, doEncode, doInitialize, getBindingURI, getVelocityEngine, getVelocityTemplateId, populateVelocityContext, postEncode, setVelocityEngine, setVelocityTemplateIdgetEndpointURLencode, getMessageToLog, logEncodedMessage, marshallMessagegetHttpServletResponse, setHttpServletResponsegetMessageContext, prepareContext, setMessageContextdestroy, initialize, isDestroyed, isInitializedclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitencode, prepareContext, setMessageContextinitialize, isInitializeddestroy, isDestroyedpublic PostRequestHttpObject(T request, String relayState, X509Credential signatureCredentials, String endpoint) throws MessageEncodingException, SignatureException
request - the request objectrelayState - the relay statesignatureCredentials - optional signature credentialsendpoint - the endpoint where we send this request toMessageEncodingException - for encoding errorsSignatureException - for signature errorspublic String getSendUrl()
For a redirect, this URL could look something like: https://www.theidp.com/auth?SAMLRequest=<encoded request>&RelayState=abcd.
getSendUrl in interface RequestHttpObject<T extends RequestAbstractType>public String getMethod()
getMethod in interface RequestHttpObject<T extends RequestAbstractType>public Map<String,String> getRequestParameters()
RequestHttpObject.getMethod() returns "POST" the request should be posted to the Identity Provider. The request
parameters are represented using a Map where the entries represent parameter names and values.
Note: for the "GET" method this method returns null.
getRequestParameters in interface RequestHttpObject<T extends RequestAbstractType>public Map<String,String> getHttpHeaders()
getHttpHeaders in interface RequestHttpObject<T extends RequestAbstractType>public T getRequest()
getRequest in interface RequestHttpObject<T extends RequestAbstractType>Copyright © 2018 Litsec AB. All rights reserved.