/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2005 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: AuthXMLRequestParser.java,v 1.12 2009/11/02 07:20:23 222713 Exp $
*
*/
/*
* Portions Copyrighted 2010-2012 ForgeRock Inc
*/
/**
* <code>AuthXMLRequestParser</code> parses the XML data received from the
* client.
*/
public class AuthXMLRequestParser {
/**
* Create <code>AuthXMLRequestParser</code> object
* @param xmlString reprsents request
* @param req <code>HttpServletRequest</code> contains the request.
*/
servletReq = req;
try {
if (debug.messageEnabled()) {
}
} catch (Exception e) {
}
}
/**
* Parses the authentication request xml document.
*
* @return a AuthXMLRequest object.
* @throws AuthException if it fails to parse the xml.
*/
try {
if (xmlDocument == null) {
return null;
}
authXMLRequest = new AuthXMLRequest();
// get the document root
// get the attributes for the root element
if (debug.messageEnabled()) {
}
}
if (requestNode != null) {
if (debug.messageEnabled()) {
}
}
if (appSSOTokenNode != null) {
if (appSSOTokenID != null) {
if (debug.messageEnabled()) {
}
}
}
// get the Nodes for the Request Element
// get new auth context node
requestNode,"NewAuthContext");
if (newAuthContextNode != null) {
}
// get query node
if (queryInfoNode != null) {
queryInfoNode,"requestedInformation");
queryInfoNode, "orgName");
} else {
null, authIdentifier,false);
}
}
// get login node
//Let's set the request type to Login by default
//this method can change the default requesttype to
//request
//realm name from policy advice has precedence over
//the orgName attribute
}
}
}
if (localeAttr != null) {
}
if (debug.messageEnabled()) {
+ "Got the force auth flag: "+forceAuth);
}
}
if (localeAttr != null) {
}
AuthXMLUtils.getRemoteRequest(XMLUtils.getChildNode(requestNode,AuthXMLTags.REMOTE_REQUEST_RESPONSE));
AuthXMLUtils.getRemoteResponse(XMLUtils.getChildNode(requestNode,AuthXMLTags.REMOTE_REQUEST_RESPONSE));
}
// get submit requirements node
requestNode, "SubmitRequirements");
if (submitReqNode != null) {
AuthXMLUtils.getRemoteRequest(XMLUtils.getChildNode(requestNode,AuthXMLTags.REMOTE_REQUEST_RESPONSE));
AuthXMLUtils.getRemoteResponse(XMLUtils.getChildNode(requestNode,AuthXMLTags.REMOTE_REQUEST_RESPONSE));
}
// get logout node
if (logoutNode != null) {
}
// get abort node
}
}
} catch (AuthException e) {
throw e;
} catch (Exception e) {
}
return authXMLRequest;
}
/* Converts IndexType param to query patameter String */
indexTypeParam = "service";
indexTypeParam = "authlevel";
indexTypeParam = "role";
indexTypeParam = "module";
indexTypeParam = "user";
indexTypeParam = "sunamcompositeadvice";
}
return indexTypeParam;
}
/* get the attribute value for a node */
try {
if (requestNode == null) {
return null;
}
if (debug.messageEnabled()) {
}
return attrValue;
} catch (Exception e) {
if (debug.messageEnabled()) {
}
return null;
}
}
/* parse the login node elements */
private void parseLoginNodeElements(
// get the the Login Nodes and their values.
/* get the indexType , indexName */
if (indexTypeNamePair != null) {
if (debug.messageEnabled()) {
}
if (indexNameNode != null) {
if (debug.messageEnabled()) {
}
}
}
if (localeNode != null) {
}
// get the default values for callbacks if any.
if (paramsNode != null) {
}
// get the values for environment if any
for (int i = 0; i < len; i++) {
}
}
}
}
}
/* parse submit requirements node */
void parseSubmitReqElements(
Callback[] recdCallbacks) {
if (localeNode != null) {
if (debug.messageEnabled()) {
}
}
return;
}
}