org.jboss.identity.federation.api.saml.v2.request
Class SAML2Request

java.lang.Object
  extended by org.jboss.identity.federation.api.saml.v2.request.SAML2Request

public class SAML2Request
extends java.lang.Object

API for SAML2 Request

Since:
Jan 5, 2009
Author:
Anil.Saldhana@redhat.com

Constructor Summary
SAML2Request()
           
 
Method Summary
 AuthnRequestType createAuthnRequestType(java.lang.String id, java.lang.String assertionConsumerURL, java.lang.String destination, java.lang.String issuerValue)
          Create an authentication request
 LogoutRequestType createLogoutRequest(java.lang.String issuer)
          Create a Logout Request
 AuthnRequestType getAuthnRequestType(java.io.InputStream is)
          Get the AuthnRequestType from an input stream
 AuthnRequestType getAuthnRequestType(java.lang.String fileName)
          Get AuthnRequestType from a file
 RequestAbstractType getRequestType(java.io.InputStream is)
          Get a Request Type from Input Stream
 void marshall(RequestAbstractType requestType, java.io.OutputStream os)
          Marshall the AuthnRequestType to an output stream
 void marshall(RequestAbstractType requestType, java.io.Writer writer)
          Marshall the AuthnRequestType to a writer
 XACMLAuthzDecisionQueryType parseXACMLDecisionQuery(java.io.InputStream is)
          XACMLAuthorizationDecisionQuery from an input stream
 XACMLAuthzDecisionQueryType parseXACMLDecisionQuery(java.lang.String resourceName)
          Parse an XACML Authorization Decision Query from an xml file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SAML2Request

public SAML2Request()
Method Detail

createAuthnRequestType

public AuthnRequestType createAuthnRequestType(java.lang.String id,
                                               java.lang.String assertionConsumerURL,
                                               java.lang.String destination,
                                               java.lang.String issuerValue)
                                        throws java.lang.Exception
Create an authentication request

Parameters:
id -
assertionConsumerURL -
destination -
issuerValue -
Returns:
Throws:
java.lang.Exception

getAuthnRequestType

public AuthnRequestType getAuthnRequestType(java.lang.String fileName)
                                     throws java.lang.Exception
Get AuthnRequestType from a file

Parameters:
fileName - file with the serialized AuthnRequestType
Returns:
AuthnRequestType
Throws:
java.lang.Exception
java.lang.IllegalArgumentException - if the input fileName is null IllegalStateException if the InputStream from the fileName is null

getRequestType

public RequestAbstractType getRequestType(java.io.InputStream is)
                                   throws java.lang.Exception
Get a Request Type from Input Stream

Parameters:
is -
Returns:
Throws:
java.lang.Exception
java.lang.IllegalArgumentException - inputstream is null

getAuthnRequestType

public AuthnRequestType getAuthnRequestType(java.io.InputStream is)
                                     throws java.lang.Exception
Get the AuthnRequestType from an input stream

Parameters:
is - Inputstream containing the AuthnRequest
Returns:
Throws:
java.lang.Exception
java.lang.IllegalArgumentException - inputstream is null

createLogoutRequest

public LogoutRequestType createLogoutRequest(java.lang.String issuer)
                                      throws java.lang.Exception
Create a Logout Request

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

parseXACMLDecisionQuery

public XACMLAuthzDecisionQueryType parseXACMLDecisionQuery(java.lang.String resourceName)
                                                    throws java.lang.Exception
Parse an XACML Authorization Decision Query from an xml file

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

parseXACMLDecisionQuery

public XACMLAuthzDecisionQueryType parseXACMLDecisionQuery(java.io.InputStream is)
                                                    throws java.lang.Exception
XACMLAuthorizationDecisionQuery from an input stream

Parameters:
is - The InputStream where the xacml query exists
Returns:
Throws:
java.lang.Exception

marshall

public void marshall(RequestAbstractType requestType,
                     java.io.OutputStream os)
              throws java.lang.Exception
Marshall the AuthnRequestType to an output stream

Parameters:
requestType -
os -
Throws:
java.lang.Exception

marshall

public void marshall(RequestAbstractType requestType,
                     java.io.Writer writer)
              throws java.lang.Exception
Marshall the AuthnRequestType to a writer

Parameters:
requestType -
writer -
Throws:
java.lang.Exception


Copyright © 2009 JBoss Inc.. All Rights Reserved.