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 java.util.List;
20  
21  import javax.xml.namespace.QName;
22  
23  import org.opensaml.common.SAMLObject;
24  import org.opensaml.common.xml.SAMLConstants;
25  
26  /** SAML 2.0 Core AuthnContext. */
27  public interface AuthnContext extends SAMLObject {
28  
29      /** Local Name of AuthnContext. */
30      public static final String DEFAULT_ELEMENT_LOCAL_NAME = "AuthnContext";
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 = "AuthnContextType";
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      /** URI for Internet Protocol authentication context. */
44      public static final String IP_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocol";
45  
46      /** URI for Internet Protocol Password authentication context. */
47      public static final String IP_PASSWORD_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:InternetProtocolPassword";
48  
49      /** URI for Kerberos authentication context. */
50      public static final String KERBEROS_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:Kerberos";
51  
52      /** URI for Mobile One Factor Unregistered authentication context. */
53      public static final String MOFU_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:MobileOneFactorUnregistered";
54  
55      /** URI for Mobile Two Factor Unregistered authentication context. */
56      public static final String MTFU = "urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorUnregistered";
57  
58      /** URI for Mobile One Factor Contract authentication context. */
59      public static final String MOFC_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:MobileOneFactorContract";
60  
61      /** URI for Mobile Two Factor Contract authentication context. */
62      public static final String MTFC_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:MobileTwoFactorContract";
63  
64      /** URI for Password authentication context. */
65      public static final String PASSWORD_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:Password";
66  
67      /** URI for Password Protected Transport authentication context. */
68      public static final String PPT_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport";
69  
70      /** URI for Previous Session authentication context. */
71      public static final String PREVIOUS_SESSION_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:PreviousSession";
72  
73      /** URI for X509 Public Key authentication context. */
74      public static final String X509_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:X509";
75  
76      /** URI for PGP authentication context. */
77      public static final String PGP_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:PGP";
78  
79      /** URI for SPKI authentication context. */
80      public static final String SPKI_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:SPKI";
81  
82      /** URI for XML Digital Signature authentication context. */
83      public static final String XML_DSIG_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:XMLDSig";
84  
85      /** URI for Smart Card authentication context. */
86      public static final String SMARTCARD_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:Smartcard";
87  
88      /** URI for Smart Card PKI authentication context. */
89      public static final String SMARTCARD_PKI_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:SmartcardPKI";
90  
91      /** URI for Software PKU authentication context. */
92      public static final String SOFTWARE_PKI_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:SoftwarePKI";
93  
94      /** URI for Telephony authentication context. */
95      public static final String TELEPHONY_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:Telephony";
96  
97      /** URI for Nomadic Telephony authentication context. */
98      public static final String NOMAD_TELEPHONY_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:NomadTelephony";
99  
100     /** URI for Personalized Telephony authentication context. */
101     public static final String PERSONAL_TELEPHONY_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:PersonalTelephony";
102 
103     /** URI for Authenticated Telephony authentication context. */
104     public static final String AUTHENTICATED_TELEPHONY_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:AuthenticatedTelephony";
105 
106     /** URI for Secure Remote Password authentication context. */
107     public static final String SRP_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:SecureRemotePassword";
108 
109     /** URI for SSL/TLS Client authentication context. */
110     public static final String TLS_CLIENT_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:TLSClient";
111 
112     /** URI for Time Synchornized Token authentication context. */
113     public static final String TIME_SYNC_TOKEN_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:TimeSyncToken";
114 
115     /** URI for unspecified authentication context. */
116     public static final String UNSPECIFIED_AUTHN_CTX = "urn:oasis:names:tc:SAML:2.0:ac:classes:unspecified";
117 
118     /**
119      * Gets the URI identifying the Context Class of this Authentication Context.
120      * 
121      * @return AuthnContext AuthnContextClassRef
122      */
123     public AuthnContextClassRef getAuthnContextClassRef();
124 
125     /**
126      * Sets the URI identifying the Context Class of this Authentication Context.
127      * 
128      * @param newAuthnContextClassRef the URI of this Authentication Context's Class.
129      */
130     public void setAuthnContextClassRef(AuthnContextClassRef newAuthnContextClassRef);
131 
132     /**
133      * Gets Declaration of this Authentication Context.
134      * 
135      * @return AuthnContext AuthnContextDecl
136      */
137     public AuthnContextDecl getAuthContextDecl();
138 
139     /**
140      * Sets the Declaration of this Authentication Context.
141      * 
142      * @param newAuthnContextDecl the Declaration of this Authentication Context
143      */
144     public void setAuthnContextDecl(AuthnContextDecl newAuthnContextDecl);
145 
146     /**
147      * Gets the URI of the Declaration of this Authentication Context.
148      * 
149      * @return AuthnContext AuthnContextDeclRef
150      */
151     public AuthnContextDeclRef getAuthnContextDeclRef();
152 
153     /**
154      * Sets the URI of the Declaration of this Authentication Context.
155      * 
156      * @param newAuthnContextDeclRef the URI of the Declaration of this Authentication Context
157      */
158     public void setAuthnContextDeclRef(AuthnContextDeclRef newAuthnContextDeclRef);
159 
160     /**
161      * Gets the Authenticating Athorities of this Authentication Context.
162      * 
163      * @return AuthnContext AuthenticatingAuthorities
164      */
165     public List<AuthenticatingAuthority> getAuthenticatingAuthorities();
166 }