/**
* 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: FSAuthenticationStatement.java,v 1.2 2008/06/25 05:46:43 qcheng Exp $
* Portions Copyrighted 2014 ForgeRock AS
*/
/**
* The <code>FSAuthenticationStatement</code> element represents an
* authentication statement by the issuer that it's subject was authenticated
* by a particular means at a particular time.
*
* @supported.all.api
* @deprecated since 12.0.0
*/
/**
* Default Constructor.
*/
public FSAuthenticationStatement(){
}
/**
* Constructor to create <code>FSAuthenticationStatement</code> object.
*
* @param authMethod the Authentication method in the statement.
* @param authInstant the authentication date in the statement.
* @param subject the Subject in the statement.
* @param authnContext the Authentication Context.
* @throws FSMsgException if there is error
* creating the object.
* @throws SAMLException if the version is incorrect.
*/
public FSAuthenticationStatement(
) throws FSMsgException, SAMLException {
if (authnContext == null) {
"AuthnContext");
}
} else {
this._authnContext = authnContext;
}
}
/**
* Constructor for create <code>FSAuthenticationStatement</code> object.
*
* @param authMethod the Authentication method in the statement.
* @param authInstant the authentication date in the statement.
* @param subject the <code>Subject</code> in the statement.
* @param subjectLocality the <code>SubjectLocality</code> in the statement.
* @param authorityBinding a List of <code>AuthorityBinding</code> objects.
* @param authnContext the Authentication Context.
* @throws FSMsgException if there is an error
* creating the object.
* @throws SAMLException on error.
*/
public FSAuthenticationStatement(
) throws FSMsgException, SAMLException {
super(authMethod,
// check if the AuthnContext is null
if (authnContext == null) {
"AuthnContext.");
}
} else {
this._authnContext = authnContext;
}
}
/**
* Constructs an <code>FSAuthenticationStatement</code> object from a
* Document Element.
*
* @param element the Document Element object.
* @throws FSMsgException if document element is null
* or required attributes cannot be retrieved from the element.
* @throws SAMLException on error.
*/
throws FSMsgException, SAMLException {
}
int i = 0;
//handle the attributes of AuthenticationStatement
for (i = 0; i < attCount; i++) {
"Attribute name is either null or empty.");
}
}
try {
} catch (ParseException pe ) {
"StringToDate: ", pe);
} // end of try...catch
try {
} catch (ParseException pe ) {
"StringToDate: ", pe);
}
}
}
} // end of for loop
//Handle the children elements of AuthenticationStatement
if (nodeCount > 0) {
for (i = 0; i < nodeCount; i++) {
"The tag name or tag namespace of child" +
" element is either null or empty.");
}
}
"FSAuthenticationStatement" +
":should only contain one subject");
}
} else {
this._subject =
}
if (_subjectLocality != null) {
"FSAuthenticationStatement"+
"Statement: should at most " +
"contain one SubjectLocality.");
}
} else {
}
if (_authnContext != null) {
"Statement: should not contain more " +
"than one AuthnContext element.");
}
} else {
}
if (_authorityBinding == null) {
_authorityBinding = new ArrayList();
}
(Element)currentNode))) == false) {
"FSAuthenticationStatement"+
": failed to add to the" +
" AuthorityBinding list.");
}
}
} else {
"Wrong element "
+ tagName + "included.");
}
}
} // end of if (currentNode.getNodeType() == Node.ELEMENT_NODE)
} // end of for loop
} // end of if (nodeCount > 0)
// check if the subject is null
"contain one subject.");
}
}
}
/**
* Returns the value of <code>SessionIndex</code> attribute.
*
* @return the value of </code>SessionIndex</code> attribute.
* @see #setSessionIndex(String)
*/
return sessionIndex;
}
/**
* Sets the <code>SessionIndex</code> attribute.
*
* @param sessionIndex the value of <code>SessionIndex</code> attribute.
* @see #getSessionIndex
*/
this.sessionIndex = sessionIndex;
}
/**
* Returns the re-authentication date for this
* authentication statement.
*
* @return the re-authentication date for this object.
* @see #setReauthenticateOnOrAfter
*/
return reauthenticateOnOrAfter;
}
/**
* Sets re-authentication date for this authentication
* statement.
*
* @param reauthenticateOnOrAfter the date object.
* @see #getReauthenticateOnOrAfter
*/
}
/**
* Returns the Authentication Context in this
* authentication statement.
*
* @return the Authentication Context object.
* @see #setAuthnContext(AuthnContext)
*/
return _authnContext;
}
/**
* Sets the Authentication Context object.
*
* @param authnContext the Authentication Context object.
* @see #getAuthnContext
*/
this._authnContext = authnContext;
}
/**
* 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 version the <code>MinorVersion</code> attribute.
* @see #getMinorVersion
*/
}
/**
* Returns a String representation of this object.
*
* @throws FSMsgException if there is an error creating
* the string.
* @return a String representation of this Object.
*/
return (toXMLString(true, false));
}
/**
* Returns a String representation of this 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 object.
* @throws FSMsgException if there is an error creating
* the string.
*/
throws FSMsgException {
if (includeNS) {
}
if (declareNS) {
} else {
}
}
if ((_authenticationMethod != null) &&
}
if (_authenticationInstant != null) {
.append("\" ");
}
if (reauthenticateOnOrAfter != null) {
.append("\" ");
}
if (sessionIndex != null) {
}
.append("=\"")
if (getSubject() != null) {
}
if (_subjectLocality != null) {
}
}
}
if (_authnContext != null) {
}
}
}