public class RedirectBindingSignatureUtil extends Object
Constructor and Description |
---|
RedirectBindingSignatureUtil() |
Modifier and Type | Method and Description |
---|---|
static AuthnRequestType |
getRequestFromSignedURL(String signedURL)
From the SAML Request URL, get the Request object
|
static String |
getSAMLRequestURLWithSignature(AuthnRequestType authRequest,
String relayState,
PrivateKey signingKey)
Get the URL for the SAML request that contains the signature and signature algorithm
|
static String |
getSAMLRequestURLWithSignature(String urlEncodedRequest,
String urlEncodedRelayState,
PrivateKey signingKey)
Given an url-encoded saml request and relay state and a private key, compute the url
|
static String |
getSAMLResponseURLWithSignature(ResponseType responseType,
String relayState,
PrivateKey signingKey)
Get the URL for the SAML request that contains the signature and signature algorithm
|
static String |
getSAMLResponseURLWithSignature(String urlEncodedResponse,
String urlEncodedRelayState,
PrivateKey signingKey)
Given an url-encoded saml response and relay state and a private key, compute the url
|
static byte[] |
getSignatureValueFromSignedURL(String signedURL)
Get the signature value from the url
|
static String |
getTokenValue(String queryString,
String token)
From the query string that contains key/value pairs, get the value of a key Note: if the token is null, a
null
value is returned
|
static boolean |
validateSignature(String queryString,
PublicKey validatingKey,
byte[] sigValue) |
public static String getSAMLRequestURLWithSignature(AuthnRequestType authRequest, String relayState, PrivateKey signingKey) throws SAXException, IOException, GeneralSecurityException
authRequest
- relayState
- signingKey
- SAXException
IOException
GeneralSecurityException
public static String getSAMLResponseURLWithSignature(ResponseType responseType, String relayState, PrivateKey signingKey) throws IOException, GeneralSecurityException
responseType
- relayState
- signingKey
- IOException
GeneralSecurityException
public static String getSAMLRequestURLWithSignature(String urlEncodedRequest, String urlEncodedRelayState, PrivateKey signingKey) throws IOException, GeneralSecurityException
urlEncodedRequest
- urlEncodedRelayState
- signingKey
- GeneralSecurityException
IOException
public static String getSAMLResponseURLWithSignature(String urlEncodedResponse, String urlEncodedRelayState, PrivateKey signingKey) throws IOException, GeneralSecurityException
urlEncodedResponse
- urlEncodedRelayState
- signingKey
- GeneralSecurityException
IOException
public static AuthnRequestType getRequestFromSignedURL(String signedURL) throws ConfigurationException, ProcessingException, ParsingException, IOException
signedURL
- IOException
ParsingException
ProcessingException
ConfigurationException
public static byte[] getSignatureValueFromSignedURL(String signedURL) throws IOException
signedURL
- IOException
public static String getTokenValue(String queryString, String token)
queryString
- token
- public static boolean validateSignature(String queryString, PublicKey validatingKey, byte[] sigValue) throws UnsupportedEncodingException, GeneralSecurityException
Copyright © 2019 JBoss by Red Hat. All rights reserved.