001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: AuthnStatement.java,v 1.2 2008/06/25 05:47:40 qcheng Exp $
026 *
027 */
028
029
030
031package com.sun.identity.saml2.assertion;
032
033import java.util.Date;
034import com.sun.identity.saml2.common.SAML2Exception;
035
036/**
037 * The <code>AuthnStatement</code> element describes a statement by the
038 * SAML authority asserting that the assertion subject was authenticated
039 * by a particular means at a particular time. It is of type 
040 * <code>AuthnStatementType</code>.
041 * <p>
042 * <pre>
043 * &lt;complexType name="AuthnStatementType">
044 *   &lt;complexContent>
045 *     &lt;extension base="{urn:oasis:names:tc:SAML:2.0:assertion}
046 *     StatementAbstractType">
047 *       &lt;sequence>
048 *         &lt;element ref="{urn:oasis:names:tc:SAML:2.0:assertion}
049 *         SubjectLocality" minOccurs="0"/>
050 *         &lt;element ref="{urn:oasis:names:tc:SAML:2.0:assertion}
051 *         AuthnContext"/>
052 *       &lt;/sequence>
053 *       &lt;attribute name="AuthnInstant" use="required"
054 *       type="{http://www.w3.org/2001/XMLSchema}dateTime" />
055 *       &lt;attribute name="SessionIndex"
056 *       type="{http://www.w3.org/2001/XMLSchema}string" />
057 *       &lt;attribute name="SessionNotOnOrAfter"
058 *       type="{http://www.w3.org/2001/XMLSchema}dateTime" />
059 *     &lt;/extension>
060 *   &lt;/complexContent>
061 * &lt;/complexType>
062 * </pre>
063 * @supported.all.api
064 */
065public interface AuthnStatement extends Statement {
066
067    /**
068     * Returns the value of the <code>AuthnContext</code> property.
069     *
070     * @return <code>AuthnContext</code> of the statement.
071     * @see #setAuthnContext(AuthnContext)
072     */
073    public AuthnContext getAuthnContext();
074
075    /**
076     * Sets the value of the <code>AuthnContext</code> property.
077     *
078     * @param value new <code>AuthnContext</code>.
079     * @throws SAML2Exception if the object is immutable.
080     * @see #getAuthnContext()
081     */
082    public void setAuthnContext(AuthnContext value)
083        throws SAML2Exception;
084
085    /**
086     * Returns the value of the <code>AuthnInstant</code> attribute.
087     *
088     * @return the value of the <code>AuthnInstant</code> attribute.
089     * @see #setAuthnInstant(Date)
090     */
091    public Date getAuthnInstant();
092
093    /**
094     * Sets the value of the <code>AuthnInstant</code> attribute.
095     *
096     * @param value new value of <code>AuthnInstant</code> attribute.
097     * @throws SAML2Exception if the object is immutable.
098     * @see #getAuthnInstant()
099     */
100    public void setAuthnInstant(Date value)
101        throws SAML2Exception;
102
103    /**
104     * Returns the value of the <code>SubjectLocality</code> property.
105     *
106     * @return <code>SubjectLocality</code> of the statement.
107     * @see #setSubjectLocality(SubjectLocality)
108     */
109    public SubjectLocality getSubjectLocality();
110
111    /**
112     * Sets the value of the <code>SubjectLocality</code> property.
113     *
114     * @param value the new value of <code>SubjectLocality</code>.
115     * @throws SAML2Exception if the object is immutable.
116     * @see #getSubjectLocality()
117     */
118    public void setSubjectLocality(SubjectLocality value)
119        throws SAML2Exception;
120
121    /**
122     * Returns the value of the <code>SessionIndex</code> attribute.
123     *
124     * @return the value of the <code>SessionIndex</code> attribute.
125     * @see #setSessionIndex(String)
126     */
127    public String getSessionIndex();
128
129    /**
130     * Sets the value of the <code>SessionIndex</code> attribute.
131     *
132     * @param value new value of <code>SessionIndex</code> attribute.
133     * @throws SAML2Exception if the object is immutable.
134     * @see #getSessionIndex()
135     */
136    public void setSessionIndex(String value)
137        throws SAML2Exception;
138
139    /**
140     * Returns the value of the <code>SessionNotOnOrAfter</code> attribute.
141     *
142     * @return the value of <code>SessionNotOnOrAfter</code> attribute.
143     * @see #setSessionNotOnOrAfter(Date)
144     */
145    public Date getSessionNotOnOrAfter();
146
147    /**
148     * Sets the value of the <code>SessionNotOnOrAfter</code> attribute.
149     *
150     * @param value new <code>SessionNotOnOrAfter</code> attribute.
151     * @throws SAML2Exception if the object is immutable.
152     * @see #getSessionNotOnOrAfter()
153     */
154    public void setSessionNotOnOrAfter(Date value)
155        throws SAML2Exception;
156}