2 * Copyright [2006] [University Corporation for Advanced Internet Development, Inc.]
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 package edu.internet2.middleware.shibboleth.idp.authn;
22 import javolution.util.FastMap;
24 import org.opensaml.saml2.core.RequestedAuthnContext;
27 * Login context created by a profile handler and interpreted
28 * by the authentication package.
30 * Two properties are tracked by default:
32 * <code>forceAuth</code> - Should user authentiation be forced.
33 * <code>passiveAuth</code> - Should user authentication not control the UI.
35 * A Map<String, Object> is provided to store other properties.
36 * Alternatively, a profile handler may create a subclass of LoginContext with
39 public class Saml2LoginContext extends LoginContext {
41 /** The {@link RequestedAuthnContext} */
42 private RequestedAuthnContext ctx;
45 /** Creates a new instance of LoginContext */
46 public Saml2LoginContext() {
51 * Creates a new instance of LoginContext
53 * @param forceAuth if the authentication manager must reauth the user.
54 * @param passiveAuth if the authentication manager must not interact with the users UI.
55 * @param ctx The requested login context.
57 public Saml2LoginContext(boolean forceAuth, boolean passiveAuth, final RequestedAuthnContext ctx) {
59 super(forceAuth, passiveAuth);
66 * Set the requested authentication context.
68 * @param ctx The requested authN context.
70 public void setRequestedAuthnContext(RequestedAuthnContext ctx) {
76 * Returns the requested authentication context.
78 * @return the RequestedAuthnContext, or <code>null</code> if none was set.
80 public RequestedAuthnContext getRequestedAuthnContext() {