SASLRequest.java revision a688bcbb4bcff5398fdd29b86f83450257dc0df4
/**
* 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: SASLRequest.java,v 1.2 2008/06/25 05:47:08 qcheng Exp $
*
*/
/**
* The <code>SASLRequest</code> class represents <code>SASLRequest</code>
* element defined in Authentication Service schema.
* @supported.all.api
*/
public class SASLRequest {
/**
* Constructs a <code>SASLRequest</code> instance.
*
* @param mechanism Mechanism attribute value.
*/
}
/**
* Constructs a <code>SAMLRequest</code> with a
* <code>org.w3c.dom.Element</code>.
* @param element a <code>SASLRequest</code> element
* @exception AuthnSvcException if an error occurs while parsing the
* <code>SASLRequest</code> element
*/
for(int i = 0; i < length; i++) {
throw new AuthnSvcException("tooManyDataInReq");
} else if (requestAuthnContext != null) {
throw new AuthnSvcException("invalidSeqInReq");
}
} else if (AuthnSvcConstants.NS_PROTOCOLS_SCHEMA
.equals(namespaceURI) &&
if (requestAuthnContext != null) {
throw new AuthnSvcException("tooManyReqAuthnCon");
}
} else {
throw new AuthnSvcException("invalidChildReq");
}
}
}
throw new AuthnSvcException(msg);
}
}
/**
* Returns value of Element 'Data'.
* @return value of Element 'Data'
* @see #setData(byte[])
*/
public byte[] getData() {
return data;
}
/**
* Returns Element <code>RequestAuthnContext</code>.
* @return Element <code>RequestAuthnContext</code>
* @see #setRequestAuthnContext(Element)
*/
public Element getRequestAuthnContext() {
return requestAuthnContext;
}
/**
* Returns value of <code>mechanism</code> attribute.
* @return value of <code>mechanism</code> attribute
* @see #setMechanism(String)
*/
public String getMechanism() {
return mechanism;
}
/**
* Returns value of <code>authzID</code> attribute.
* @return value of <code>authzID</code> attribute
* @see #setAuthzID(String)
*/
public String getAuthzID() {
return authzID;
}
/**
* Returns value of <code>advisoryAuthnID</code> attribute.
* @return value of <code>advisoryAuthnID</code> attribute
* @see #setAdvisoryAuthnID(String)
*/
public String getAdvisoryAuthnID() {
return advisoryAuthnID;
}
/**
* Returns value of <code>id</code> attribute.
* @return value of <code>id</code> attribute
* @see #setId(String)
*/
return id;
}
/**
* Returns value of <code>messageID</code> attribute of
* <code>CorrelationHeader</code>.
* @return value of <code>messageID</code> attribute
* @see #setMessageID(String)
*/
public String getMessageID() {
return messageID;
}
/**
* Returns value of <code>refToMessageID</code> attribute of
* <code>CorrelationHeader</code>.
* @return value of <code>refToMessageID</code> attribute
* @see #setRefToMessageID(String)
*/
public String getRefToMessageID() {
return refToMessageID;
}
/**
* Sets value of Element 'Data'.
* @param data value of Element 'Data'
* @see #getData()
*/
}
/**
* Sets Element <code>RequestAuthnContext</code>.
* @param requestAuthnContext Element <code>RequestAuthnContext</code>
* @see #getRequestAuthnContext()
*/
}
/**
* Sets value of <code>mechanism</code> attribute
* @param mechanism value of <code>mechanism</code> attribute
* @see #getMechanism()
*/
}
/**
* Sets value of <code>authzID</code> attribute.
* @param authzID value of <code>authzID</code> attribute
* @see #getAuthzID()
*/
}
/**
* Sets value of <code>advisoryAuthnID</code> attribute.
* @param advisoryAuthnID value of <code>advisoryAuthnID</code> attribute
* @see #getAdvisoryAuthnID()
*/
this.advisoryAuthnID = advisoryAuthnID;
}
/**
* Sets value of <code>id</code> attribute.
* @param id value of <code>id</code> attribute
* @see #getId()
*/
}
/**
* Sets value of <code>messageID</code> attribute of
* <code>CorrelationHeader</code>.
* @param messageID value of <code>messageID</code> attribute
* @see #getMessageID()
*/
}
/**
* Sets value of <code>refToMessageID</code> attribute of
* <code>CorrelationHeader</code>.
* @param refToMessageID value of <code>refToMessageID</code> attribute
* @see #getRefToMessageID()
*/
this.refToMessageID = refToMessageID;
}
/**
* Returns <code>SASLRequest</code> in <code>org.w3c.dom.Element</code>
* format.
*
* @return <code>SASLRequest</code> in <code>org.w3c.dom.Element</code>
* format.
* @exception AuthnSvcException if an error occurs while creating the
* <code>SASLRequest</code> element
*/
try {
}
authzID);
}
if (advisoryAuthnID != null) {
}
}
}
return doc.getDocumentElement();
}
}