View Javadoc

1   /*
2    * Copyright [2005] [University Corporation for Advanced Internet Development, Inc.]
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    * http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package org.opensaml.saml2.core;
18  
19  import javax.xml.namespace.QName;
20  
21  import org.opensaml.common.SAMLObject;
22  import org.opensaml.common.xml.SAMLConstants;
23  
24  /**
25   * SAML 2.0 Core SubjectConfirmation.
26   */
27  public interface SubjectConfirmation extends SAMLObject {
28  
29      /** Element local name. */
30      public static final String DEFAULT_ELEMENT_LOCAL_NAME = "SubjectConfirmation";
31  
32      /** Default element name. */
33      public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20_NS, DEFAULT_ELEMENT_LOCAL_NAME,
34              SAMLConstants.SAML20_PREFIX);
35  
36      /** Local name of the XSI type. */
37      public static final String TYPE_LOCAL_NAME = "SubjectConfirmationType";
38  
39      /** QName of the XSI type. */
40      public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20_NS, TYPE_LOCAL_NAME,
41              SAMLConstants.SAML20_PREFIX);
42  
43      /** Method attribute name. */
44      public static final String METHOD_ATTRIB_NAME = "Method";
45      
46      /** URI for the Holder of Key subject confirmation method, {@value}. */
47      public static final String METHOD_HOLDER_OF_KEY = "urn:oasis:names:tc:SAML:2.0:cm:holder-of-key";
48      
49      /** URI for the Sender Vouches subject confirmation method, {@value}. */
50      public static final String METHOD_SENDER_VOUCHES = "urn:oasis:names:tc:SAML:2.0:cm:sender-vouches";
51      
52      /** URI for the Bearer subject confirmation method, {@value}. */
53      public static final String METHOD_BEARER = "urn:oasis:names:tc:SAML:2.0:cm:bearer";
54  
55      /**
56       * Get the method used to confirm this subject.
57       * 
58       * @return the method used to confirm this subject
59       */
60      public String getMethod();
61  
62      /**
63       * Sets the method used to confirm this subject.
64       * 
65       * @param newMethod the method used to confirm this subject
66       */
67      public void setMethod(String newMethod);
68  
69      /**
70       * Gets the base identifier of the principal for this request.
71       * 
72       * @return the base identifier of the principal for this request
73       */
74      public BaseID getBaseID();
75  
76      /**
77       * Sets the base identifier of the principal for this request.
78       * 
79       * @param newBaseID the base identifier of the principal for this request
80       */
81      public void setBaseID(BaseID newBaseID);
82  
83      /**
84       * Gets the name identifier of the principal for this request.
85       * 
86       * @return the name identifier of the principal for this request
87       */
88      public NameID getNameID();
89  
90      /**
91       * Sets the name identifier of the principal for this request.
92       * 
93       * @param newNameID the name identifier of the principal for this request
94       */
95      public void setNameID(NameID newNameID);
96  
97      /**
98       * Gets the encrypted name identifier of the principal for this request.
99       * 
100      * @return the encrypted name identifier of the principal for this request
101      */
102     public EncryptedID getEncryptedID();
103 
104     /**
105      * Sets the encrypted name identifier of the principal for this request.
106      * 
107      * @param newEncryptedID the new encrypted name identifier of the principal for this request
108      */
109     public void setEncryptedID(EncryptedID newEncryptedID);
110 
111     /**
112      * Gets the data about how this subject was confirmed or constraints on the confirmation.
113      * 
114      * @return the data about how this subject was confirmed or constraints on the confirmation
115      */
116     public SubjectConfirmationData getSubjectConfirmationData();
117 
118     /**
119      * Sets the data about how this subject was confirmed or constraints on the confirmation.
120      * 
121      * @param newSubjectConfirmationData the data about how this subject was confirmed or constraints on the
122      *            confirmation
123      */
124     public void setSubjectConfirmationData(SubjectConfirmationData newSubjectConfirmationData);
125 }