/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: FSAuthnResponseEnvelope.java,v 1.2 2008/06/25 05:46:43 qcheng Exp $
* Portions Copyrighted 2014 ForgeRock AS
*/
/**
* This class defines methods for setting and retrieving attributes and
* elements associated with a Liberty Response .
*
* @supported.all.api
* @deprecated since 12.0.0
*/
public class FSAuthnResponseEnvelope {
/**
* Default Constructor.
*/
public FSAuthnResponseEnvelope() {
}
/**
* Constructor create <code>FSAuthnResponseEnvelope</code> object.
*
* @param authnResponse the <code>FSAuthnResponse</code> object.
*/
this.authnResponse = authnResponse;
this.otherElements = null;
}
/**
* Constructor create <code>FSAuthnResponseEnvelope</code> object.
*
* @param root the Document element .
* @throws FSMsgException if there is an error creating the object.
* @throws SAMLException if there is an error creating the object.
*/
throws FSMsgException, SAMLException {
+ "null input.");
}
+ "wrong input.");
}
+ "No namespace");
}
}
for (int i = 0; i < length; i++) {
if (authnResponse != null) {
+ "included more than one <AuthnResponse>");
}
}
}
}
}
}
/**
* Returns the value of <code>MinorVersion</code> attribute.
*
* @return the value of <code>MinorVersion</code> attribute.
* @see #setMinorVersion(int)
*/
public int getMinorVersion() {
return minorVersion;
}
/**
* Sets the value of <code>MinorVersion<code> attribute.
*
* @param minorVersion the <code>MinorVersion</code> attribute.
*/
this.minorVersion = minorVersion;
}
/**
* Returns a list of elements.
*
* @return list of elements.
* @see #setOtherElements(List)
*/
return otherElements;
}
/**
* Sets a list of elements.
*
* @param otherElement a list of elements.
* @see #getOtherElements
*/
this.otherElements = otherElement;
}
/**
* Returns the <code>FSAuthnResponse</code> object.
*
* @return the <code>FSAuthnResponse</code> object.
* @see #setAuthnResponse(FSAuthnResponse)
*/
return authnResponse;
}
/**
* Sets the <code>FSAuthnResponse</code> object.
*
* @param authnResponse the <code>FSAuthnResponse</code> object.
* @see #getAuthnResponse
*/
this.authnResponse = authnResponse;
}
/**
* Returns the Assertion Consumer Service URL.
*
* @return the Assertion Consumer Service URL.
* @see #setAssertionConsumerServiceURL(String)
*/
return assertionConsumerServiceURL;
}
/**
* Sets the Assertion Consumer Service URL.
*
* @param assertionConsumerUrl the Assertion Consumer Service Identifier.
* @see #getAssertionConsumerServiceURL
*/
}
/**
* Returns the <code>FSAuthnResponseEnvelope</code> object.
*
* @param xml the XML string to create this object from
* @return <code>FSAuthnResponseEnvelope</code> object.
* @throws FSMsgException if there is error creating the object.
*/
throws FSMsgException {
try {
return new FSAuthnResponseEnvelope(root);
} catch(SAMLException ex){
+ "Error while parsing input xml string");
}
}
}
/**
* Returns XML document String for this object based on the Response Schema.
*
* @return XML String representing the <code>Response</code>
* @throws FSMsgException if there is an error.
*/
return toXMLString(true, true);
}
/**
* Creates a String representation of the <code>Response<code> object.
* @param includeNS : Determines whether or not the namespace qualifier
* is prepended to the Element when converted
* @param declareNS : Determines whether or not the namespace is declared
* within the Element.
* @return A string containing the valid XML for this element.
* @throws FSMsgException if there is an error.
*/
throws FSMsgException {
}
/**
* Creates a String representation of the <code>Response</code> object.
*
* @param includeNS Determines whether or not the namespace qualifier
* is prepended to the Element when converted
* @param declareNS Determines whether or not the namespace is declared
* within the Element.
* @param includeHeader Determines whether the output include the xml
* declaration header.
* @return a string containing the valid XML for this object.
* @throws FSMsgException if there is an error.
*/
boolean declareNS,
boolean includeHeader) throws FSMsgException {
if (includeHeader) {
}
if (includeNS) {
}
if (declareNS) {
} else {
}
}
if (authnResponse != null) {
}
if(assertionConsumerServiceURL != null &&
} else {
}
}
/**
* Returns a <code>Base64</code> Encoded String.
*
* @return a <code>Base64</code> Encoded String.
* @throws FSMsgException if there is an error encoding
* the string.
*/
}
/**
* Returns <code>FSAuthnResponseEnvelope</code> object. The
* object is creating by parsing the <code>Base64</code>
* encoded <code>XML</code> string.
*
* @param encodedReq the <code>Based64</code> encoded <code>XML</code>
* string.
* @throws FSMsgException if there is an error
* creating <code>FSAuthnResponseEnvelope</code> object.
*/
if (encodedReq != null) {
+ "parseBASE64EncodedString: decoded input string: \n"
+ decodedAuthnReq);
}
return parseXML(decodedAuthnReq);
} else {
+ "parseBASE64EncodedString: null String passed"
+ "in as argument.");
}
}
}
}