/**
* 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: SASLResponse.java,v 1.2 2008/06/25 05:47:08 qcheng Exp $
* Portions Copyrighted 2014 ForgeRock AS.
*/
/**
* The <code>SASLResponse</code> class represents <code>SASLResponse</code>
* element defined in Authentication Service schema.
*
* @supported.all.api
* @deprecated since 12.0.0
*/
public class SASLResponse {
/**
* Continue status where the server expects the client to send another
* <code>SASLRequest</code>
*/
/**
* Abort status where the server is aborting the authentication exchange.
*/
/**
* OK status where the server considers the authentication exchange to have
* successfully completed.
*/
/**
* Constructs a <code>SASLResponse</code> instance.
*
* @param statusCode Status Code.
*/
this.statusCode = statusCode;
}
/**
* Constructs a <code>SASLResponse</code> with a
* <code>org.w3c.dom.Element</code>.
* @param element a <code>SASLResponse</code> element
* @exception AuthnSvcException if an error occurs while parsing the
* <code>SASLResponse</code> element
*/
int i;
for(i = 0; i < length; i++) {
break;
} else {
throw new AuthnSvcException("missingStatus");
}
}
}
statusE);
throw new AuthnSvcException("invalidStatusCodeNS");
}
for(i = i + 1; i < length; i++) {
throw new AuthnSvcException("tooManyStatus");
} else if(AuthnSvcConstants.TAG_PASSWORD_TRANSFORMS
throw new AuthnSvcException("tooManyPT");
credentialsE != null) {
throw new AuthnSvcException("invalidSeq");
}
ptE = childElement;
throw new AuthnSvcException("tooManyData");
throw new AuthnSvcException("invalidSeq");
}
} else if(AuthnSvcConstants.TAG_CREDENTIALS
if (credentialsE != null) {
throw new AuthnSvcException("tooManyCr");
}
} else {
throw new AuthnSvcException("invalidChild");
}
throw new AuthnSvcException("tooManyRO");
} else if (credentialsE != null) {
throw new AuthnSvcException("invalidSeq");
}
roE = childElement;
} else {
throw new AuthnSvcException("invalidChild");
}
}
}
}
try {
throw new AuthnSvcException(ex);
}
}
if (credentialsE != null) {
credentials = new ArrayList();
}
}
}
}
/**
* Returns value of attribute 'code' of Element 'Status'.
* @return value of attribute 'code' of Element 'Status'
* @see #setStatusCode(String)
*/
{
return statusCode;
}
/**
* Returns child Element 'PasswordTransforms'.
* @return child Element 'PasswordTransforms'
* @see #setPasswordTransforms(PasswordTransforms)
*/
{
return passwordTransforms;
}
/**
* Returns value of Element 'Data'.
* @return value of Element 'Data'
* @see #setData(byte[])
*/
public byte[] getData()
{
return data;
}
/**
* Returns Element <code>ResourceOffering</code>.
* @return Element <code>ResourceOffering</code>.
* @see #setResourceOffering(ResourceOffering)
*/
return resourceOffering;
}
/**
* Returns a list of child Element of 'Credentials' Element.
* @return a list of child Element of 'Credentials' Element
* @see #setCredentials(List)
*/
return credentials;
}
/**
* Returns value of <code>serverMechanism</code> attribute.
* @return value of <code>serverMechanism</code> attribute
* @see #setServerMechanism(String)
*/
return serverMechanism;
}
/**
* 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)
*/
return messageID;
}
/**
* Returns value of <code>refToMessageID</code> attribute of
* <code>CorrelationHeader</code>.
* @return value of <code>refToMessageID</code> attribute
* @see #setRefToMessageID(String)
*/
return refToMessageID;
}
/**
* Sets value of attribute 'code' of Element 'Status'.
* @param statusCode value of attribute 'code' of Element 'Status'
* @see #getStatusCode()
*/
this.statusCode = statusCode;
}
/**
* Sets child Element 'PasswordTransforms'
* @param passwordTransforms Element 'PasswordTransforms'
* @see #getPasswordTransforms()
*/
{
this.passwordTransforms = passwordTransforms;
}
/**
* Sets value of Element 'Data'.
* @param data value of Element 'Data'
* @see #getData()
*/
}
/**
* Sets Element <code>ResourceOffering</code>.
* @param resourceOffering Element <code>ResourceOffering</code>
* @see #getResourceOffering()
*/
this.resourceOffering = resourceOffering;
}
/**
* Sets a list of child Elements of 'Credentials' Element.
* @param credentials a list of child Elements of 'Credentials' Element
* @see #getCredentials()
*/
this.credentials = credentials;
}
/**
* Sets value of <code>mechanism</code> attribute.
* @param serverMechanism value of <code>mechanism</code> attribute
* @see #getServerMechanism()
*/
this.serverMechanism = serverMechanism;
}
/**
* 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>SASLResponse</code> in <code>org.w3c.dom.Element</code>
* format.
*
* @return <code>SASLResponse</code> in <code>org.w3c.dom.Element</code>
* format.
* @exception AuthnSvcException if an error occurs while creating the
* <code>SASLResponse</code> element
*/
try {
}
if (passwordTransforms != null) {
}
}
if (resourceOffering != null) {
throw new AuthnSvcException("invalidRO");
}
true));
}
true));
}
}
if (serverMechanism != null) {
}
}
return doc.getDocumentElement();
}
}