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: AuthnRequest.java,v 1.2 2008/06/25 05:47:56 qcheng Exp $
026 *
027 * Portions Copyrighted 2016 ForgeRock AS.
028 */
029
030
031package com.sun.identity.saml2.protocol;
032
033import com.fasterxml.jackson.annotation.JsonTypeInfo;
034import com.sun.identity.saml2.assertion.Conditions;
035import com.sun.identity.saml2.assertion.Subject;
036import com.sun.identity.saml2.common.SAML2Exception;
037import com.sun.identity.saml2.protocol.impl.AuthnRequestImpl;
038
039/** 
040 *  The <code>AuthnRequest</code> interface defines methods for properties
041 *  required by an authentication request.
042 *
043 *  @supported.all.api
044 */
045
046@JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.CLASS,
047        defaultImpl = AuthnRequestImpl.class)
048public interface AuthnRequest extends RequestAbstract {
049    
050    /** 
051     * Returns the <code>Subject</code> object. 
052     *
053     * @return the <code>Subject</code> object. 
054     * @see #setSubject(Subject)
055     */
056    public Subject getSubject();
057    
058    /** 
059     * Sets the <code>Subject</code> object. 
060     *
061     * @param subject the new <code>Subject</code> object. 
062     * @throws SAML2Exception if the object is immutable.
063     * @see #getSubject
064     */
065    public void setSubject(Subject subject) throws SAML2Exception;
066    
067    /** 
068     * Returns the <code>NameIDPolicy</code> object.
069     *
070     * @return the <code>NameIDPolicy</code> object. 
071     * @see #setNameIDPolicy(NameIDPolicy)
072     */
073    public NameIDPolicy getNameIDPolicy();
074    
075    /** 
076     * Sets the <code>NameIDPolicy</code> object. 
077     *
078     * @param nameIDPolicy the new <code>NameIDPolicy</code> object. 
079     * @throws SAML2Exception if the object is immutable.
080     * @see #getNameIDPolicy
081     */
082    
083    public void setNameIDPolicy(NameIDPolicy nameIDPolicy) 
084    throws SAML2Exception;
085    
086    /** 
087     * Returns the <code>Conditions</code> object.
088     *
089     * @return the <code>Conditions</code> object. 
090     * @see #setConditions(Conditions)
091     */
092    public Conditions getConditions();
093    
094    /** 
095     * Sets the <code>Conditions</code> object. 
096     *
097     * @param conditions the new <code>Conditions</code> object.
098     * @throws SAML2Exception if the object is immutable.
099     * @see #getConditions
100     */
101    
102    public void setConditions(Conditions conditions) throws SAML2Exception;
103    
104    /** 
105     * Returns the <code>RequestedAuthnContext</code> object. 
106     *
107     * @return the <code>RequestAuthnContext</code> object. 
108     * @see #setRequestedAuthnContext(RequestedAuthnContext)
109     */
110    
111    public RequestedAuthnContext getRequestedAuthnContext();
112    
113    /** 
114     * Sets the <code>RequestedAuthnContext</code>. 
115     *
116     * @param reqAuthnContext the new <code>RequestedAuthnContext</code>
117     *        object.
118     * @throws SAML2Exception if the object is immutable.
119     * @see #getRequestedAuthnContext
120     */
121    public void setRequestedAuthnContext(RequestedAuthnContext reqAuthnContext)
122    throws SAML2Exception;
123    
124    /** 
125     * Sets the <code>Scoping</code> object. 
126     *
127     * @param scoping the new <code>Scoping</code> Object.
128     * @throws SAML2Exception if the object is immutable.
129     * @see #getScoping
130     */
131    public void setScoping(Scoping scoping) throws SAML2Exception;
132    
133    /** 
134     * Returns the <code>Scoping</code> object. 
135     *
136     * @return the <code>Scoping</code> object. 
137     * @see #setScoping(Scoping)
138     */
139    public Scoping getScoping();
140    
141    /** 
142     * Returns value of <code>isForceAuthn</code> attribute.
143     *
144     * @return value of <code>isForceAuthn</code> attribute, or null if the attribute is not present.
145     */
146    public Boolean isForceAuthn();
147    
148    /** 
149     * Sets the value of the <code>ForceAuthn</code> attribute.
150     *
151     * @param value the value of <code>ForceAuthn</code> attribute.
152     * @throws SAML2Exception if the object is immutable.
153     */
154    public void setForceAuthn(Boolean value)    
155    throws SAML2Exception;
156    
157    /** 
158     * Returns the value of the <code>isPassive</code> attribute.
159     *
160     * @return value of <code>isPassive</code> attribute, or null if the attribute is not present.
161     */
162    public Boolean isPassive();
163    
164    /** 
165     * Sets the value of the <code>IsPassive</code> attribute.
166     *
167     * @param value Value of <code>IsPassive</code> attribute.
168     * @throws SAML2Exception if the object is immutable.
169     */
170    public void setIsPassive(Boolean value)     
171    throws SAML2Exception;
172    
173    /** 
174     * Sets the value of the <code>ProtocolBinding</code> attribute.
175     *
176     * @param protocolBinding value of the <code>ProtocolBinding</code>
177     *        attribute.
178     * @throws SAML2Exception if the object is immutable.
179     * @see #getProtocolBinding
180     */
181    public void setProtocolBinding(String protocolBinding)   
182    throws SAML2Exception;
183    
184    /** 
185     * Returns the value of the <code>ProtocolBinding</code> attribute.
186     *
187     * @return the value of <code>ProtocolBinding</code> attribute.
188     * @see #setProtocolBinding(String)
189     */
190    public String getProtocolBinding();
191    
192    /** 
193     * Returns the value of the <code>AssertionConsumerServiceURL</code>
194     * attribute.
195     *
196     * @return the value of <code>AssertionConsumerServiceURL</code> attribute.
197     * @see #setAssertionConsumerServiceURL(String)
198     */
199    public String getAssertionConsumerServiceURL();
200    
201    /** 
202     * Sets the value of the <code>AssertionConsumerServiceURL</code> 
203     * attribute.
204     *
205     * @param url the value of <code>AssertionConsumerServiceURL</code> 
206     *        attribute.
207     * @throws SAML2Exception if the object is immutable.
208     * @see #getAssertionConsumerServiceURL
209     */
210    public void setAssertionConsumerServiceURL(String url) throws SAML2Exception;
211    
212    /** 
213     * Returns the value of the <code>AssertionConsumerServiceIndex</code> 
214     * attribute.
215     *
216     * @return value of the <code>AssertionConsumerServiceIndex<code> 
217     *         attribute.
218     * @see #setAssertionConsumerServiceIndex(Integer)
219     */
220    public Integer getAssertionConsumerServiceIndex();
221    
222    /** 
223     * Sets the value of the <code>AssertionConsumerServiceIndex</code> 
224     * attribute.
225     *
226     * @param index value of the <code>AssertionConsumerServiceIndex</code>
227     *        attribute.
228     * @throws SAML2Exception if the object is immutable.
229     * @see #getAssertionConsumerServiceIndex
230     */
231    public void setAssertionConsumerServiceIndex(Integer index)
232    throws SAML2Exception;
233    
234
235    /**
236     * Returns the value of the <code>AttributeConsumingServiceIndex</code>
237     * attribute.
238     *
239     * @return value of the <code>AttributeConsumingServiceIndex<code> 
240     *         attribute.
241     * @see #setAttributeConsumingServiceIndex(Integer)
242     */
243    public Integer getAttributeConsumingServiceIndex();
244
245    /**
246     * Sets the value of the <code>AttributeConsumingServiceIndex</code>
247     * attribute.
248     *
249     * @param index value of the <code>AttributeConsumingServiceIndex</code>
250     *        attribute.
251     * @throws SAML2Exception if the object is immutable.
252     * @see #getAttributeConsumingServiceIndex
253     */
254    public void setAttributeConsumingServiceIndex(Integer index)
255    throws SAML2Exception;
256
257    /** 
258     * Sets the <code>ProviderName</code> attribute value.
259     *
260     * @param providerName value of the <code>ProviderName</code> attribute.
261     * @throws SAML2Exception if the object is immutable.
262     * @see #getProviderName
263     */
264    public void setProviderName(String providerName) throws SAML2Exception;
265    
266    /** 
267     * Returns the <code>ProviderName</code> attribute value.
268     *
269     * @return value of the <code>ProviderName</code> attribute value.
270     * @see #setProviderName(String)
271     */
272    public String getProviderName();
273}