org.jboss.identity.federation.bindings.util
Class RedirectBindingSignatureUtil

java.lang.Object
  extended by org.jboss.identity.federation.bindings.util.RedirectBindingSignatureUtil

public class RedirectBindingSignatureUtil
extends java.lang.Object

Signature Support for the HTTP/Redirect binding

Since:
Dec 16, 2008
Author:
Anil.Saldhana@redhat.com

Constructor Summary
RedirectBindingSignatureUtil()
           
 
Method Summary
static AuthnRequestType getRequestFromSignedURL(java.lang.String signedURL)
          From the SAML Request URL, get the Request object
static java.lang.String getSAMLRequestURLWithSignature(AuthnRequestType authRequest, java.lang.String relayState, java.security.PrivateKey signingKey)
          Get the URL for the SAML request that contains the signature and signature algorithm
static java.lang.String getSAMLRequestURLWithSignature(java.lang.String urlEncodedRequest, java.lang.String urlEncodedRelayState, java.security.PrivateKey signingKey)
          Given an url-encoded saml request and relay state and a private key, compute the url
static java.lang.String getSAMLResponseURLWithSignature(ResponseType responseType, java.lang.String relayState, java.security.PrivateKey signingKey)
          Get the URL for the SAML request that contains the signature and signature algorithm
static java.lang.String getSAMLResponseURLWithSignature(java.lang.String urlEncodedResponse, java.lang.String urlEncodedRelayState, java.security.PrivateKey signingKey)
          Given an url-encoded saml response and relay state and a private key, compute the url
static byte[] getSignatureValueFromSignedURL(java.lang.String signedURL)
          Get the signature value from the url
static java.lang.String getTokenValue(java.lang.String queryString, java.lang.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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RedirectBindingSignatureUtil

public RedirectBindingSignatureUtil()
Method Detail

getSAMLRequestURLWithSignature

public static java.lang.String getSAMLRequestURLWithSignature(AuthnRequestType authRequest,
                                                              java.lang.String relayState,
                                                              java.security.PrivateKey signingKey)
                                                       throws java.lang.Exception
Get the URL for the SAML request that contains the signature and signature algorithm

Parameters:
authRequest -
relayState -
signingKey -
Returns:
Throws:
java.lang.Exception

getSAMLResponseURLWithSignature

public static java.lang.String getSAMLResponseURLWithSignature(ResponseType responseType,
                                                               java.lang.String relayState,
                                                               java.security.PrivateKey signingKey)
                                                        throws java.lang.Exception
Get the URL for the SAML request that contains the signature and signature algorithm

Parameters:
responseType -
relayState -
signingKey -
Returns:
Throws:
java.lang.Exception

getSAMLRequestURLWithSignature

public static java.lang.String getSAMLRequestURLWithSignature(java.lang.String urlEncodedRequest,
                                                              java.lang.String urlEncodedRelayState,
                                                              java.security.PrivateKey signingKey)
                                                       throws java.lang.Exception
Given an url-encoded saml request and relay state and a private key, compute the url

Parameters:
urlEncodedRequest -
urlEncodedRelayState -
signingKey -
Returns:
Throws:
java.lang.Exception

getSAMLResponseURLWithSignature

public static java.lang.String getSAMLResponseURLWithSignature(java.lang.String urlEncodedResponse,
                                                               java.lang.String urlEncodedRelayState,
                                                               java.security.PrivateKey signingKey)
                                                        throws java.lang.Exception
Given an url-encoded saml response and relay state and a private key, compute the url

Parameters:
urlEncodedResponse -
urlEncodedRelayState -
signingKey -
Returns:
Throws:
java.lang.Exception

getRequestFromSignedURL

public static AuthnRequestType getRequestFromSignedURL(java.lang.String signedURL)
                                                throws java.lang.Exception
From the SAML Request URL, get the Request object

Parameters:
signedURL -
Returns:
Throws:
java.lang.Exception

getSignatureValueFromSignedURL

public static byte[] getSignatureValueFromSignedURL(java.lang.String signedURL)
                                             throws java.lang.Exception
Get the signature value from the url

Parameters:
signedURL -
Returns:
Throws:
java.lang.Exception

getTokenValue

public static java.lang.String getTokenValue(java.lang.String queryString,
                                             java.lang.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

Parameters:
queryString -
token -
Returns:


Copyright © 2009 JBoss Inc.. All Rights Reserved.