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 * Portions Copyrighted 2015-2016 ForgeRock AS.
028 */
029
030package com.sun.identity.saml2.assertion;
031
032import java.util.Date;
033import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
034import com.sun.identity.saml2.assertion.impl.AuthnStatementImpl;
035import com.sun.identity.saml2.common.SAML2Exception;
036
037/**
038 * The <code>AuthnStatement</code> element describes a statement by the
039 * SAML authority asserting that the assertion subject was authenticated
040 * by a particular means at a particular time. It is of type 
041 * <code>AuthnStatementType</code>.
042 * <p>
043 * <pre>
044 * &lt;complexType name="AuthnStatementType">
045 *   &lt;complexContent>
046 *     &lt;extension base="{urn:oasis:names:tc:SAML:2.0:assertion}
047 *     StatementAbstractType">
048 *       &lt;sequence>
049 *         &lt;element ref="{urn:oasis:names:tc:SAML:2.0:assertion}
050 *         SubjectLocality" minOccurs="0"/>
051 *         &lt;element ref="{urn:oasis:names:tc:SAML:2.0:assertion}
052 *         AuthnContext"/>
053 *       &lt;/sequence>
054 *       &lt;attribute name="AuthnInstant" use="required"
055 *       type="{http://www.w3.org/2001/XMLSchema}dateTime" />
056 *       &lt;attribute name="SessionIndex"
057 *       type="{http://www.w3.org/2001/XMLSchema}string" />
058 *       &lt;attribute name="SessionNotOnOrAfter"
059 *       type="{http://www.w3.org/2001/XMLSchema}dateTime" />
060 *     &lt;/extension>
061 *   &lt;/complexContent>
062 * &lt;/complexType>
063 * </pre>
064 * @supported.all.api
065 */
066@JsonDeserialize(as=AuthnStatementImpl.class)
067public interface AuthnStatement extends Statement {
068
069    /**
070     * Returns the value of the <code>AuthnContext</code> property.
071     *
072     * @return <code>AuthnContext</code> of the statement.
073     * @see #setAuthnContext(AuthnContext)
074     */
075    AuthnContext getAuthnContext();
076
077    /**
078     * Sets the value of the <code>AuthnContext</code> property.
079     *
080     * @param value new <code>AuthnContext</code>.
081     * @throws SAML2Exception if the object is immutable.
082     * @see #getAuthnContext()
083     */
084    void setAuthnContext(AuthnContext value)
085        throws SAML2Exception;
086
087    /**
088     * Returns the value of the <code>AuthnInstant</code> attribute.
089     *
090     * @return the value of the <code>AuthnInstant</code> attribute.
091     * @see #setAuthnInstant(Date)
092     */
093    Date getAuthnInstant();
094
095    /**
096     * Sets the value of the <code>AuthnInstant</code> attribute.
097     *
098     * @param value new value of <code>AuthnInstant</code> attribute.
099     * @throws SAML2Exception if the object is immutable.
100     * @see #getAuthnInstant()
101     */
102    void setAuthnInstant(Date value)
103        throws SAML2Exception;
104
105    /**
106     * Returns the value of the <code>SubjectLocality</code> property.
107     *
108     * @return <code>SubjectLocality</code> of the statement.
109     * @see #setSubjectLocality(SubjectLocality)
110     */
111    SubjectLocality getSubjectLocality();
112
113    /**
114     * Sets the value of the <code>SubjectLocality</code> property.
115     *
116     * @param value the new value of <code>SubjectLocality</code>.
117     * @throws SAML2Exception if the object is immutable.
118     * @see #getSubjectLocality()
119     */
120    void setSubjectLocality(SubjectLocality value)
121        throws SAML2Exception;
122
123    /**
124     * Returns the value of the <code>SessionIndex</code> attribute.
125     *
126     * @return the value of the <code>SessionIndex</code> attribute.
127     * @see #setSessionIndex(String)
128     */
129    String getSessionIndex();
130
131    /**
132     * Sets the value of the <code>SessionIndex</code> attribute.
133     *
134     * @param value new value of <code>SessionIndex</code> attribute.
135     * @throws SAML2Exception if the object is immutable.
136     * @see #getSessionIndex()
137     */
138    void setSessionIndex(String value)
139        throws SAML2Exception;
140
141    /**
142     * Returns the value of the <code>SessionNotOnOrAfter</code> attribute.
143     *
144     * @return the value of <code>SessionNotOnOrAfter</code> attribute.
145     * @see #setSessionNotOnOrAfter(Date)
146     */
147    Date getSessionNotOnOrAfter();
148
149    /**
150     * Sets the value of the <code>SessionNotOnOrAfter</code> attribute.
151     *
152     * @param value new <code>SessionNotOnOrAfter</code> attribute.
153     * @throws SAML2Exception if the object is immutable.
154     * @see #getSessionNotOnOrAfter()
155     */
156    void setSessionNotOnOrAfter(Date value)
157        throws SAML2Exception;
158}