View Javadoc

1   /*
2   * Licensed to the Apache Software Foundation (ASF) under one or more
3   * contributor license agreements.  See the NOTICE file distributed with
4   * this work for additional information regarding copyright ownership.
5   * The ASF licenses this file to You under the Apache License, Version 2.0
6   * (the "License"); you may not use this file except in compliance with
7   * the License.  You may obtain a copy of the License at
8   *
9   *     http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17  package org.apache.jetspeed.security.activeauthentication;
18  
19  import java.util.List;
20  
21  
22  /***
23   * <p>
24   * ActiveAuthenticationIdentityProvider
25   * </p>
26   * <p>
27   * Provides identity tokens used during active authentication to bridge the deficiencies  
28   * in Java Login Modules and general Active Authentication patterns
29   * based on Java login modules. Creates a unique, short lived identity token, caching basic Authentication information across redirects, 
30   * requests, and threads during the active authentication process. The life-time
31   * of this cached authentication information is meant to be very short lived. 
32   * </p>
33   * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
34   * @version $Id: $
35   *
36   */
37  public interface ActiveAuthenticationIdentityProvider
38  {
39      /***
40       * Start an authentication event with the server, creating a new and unique identity token 
41       * 
42       * @return the newly created identity token 
43       */
44      IdentityToken createIdentityToken();
45  
46      /***
47       * Start an authentication event with the server, creating a new and unique identity token 
48       *
49       * @param seed seed information to add to token
50       * @return the newly created identity token 
51       */
52      IdentityToken createIdentityToken(String seed);
53  
54      /***
55       * Completes an authentication event for a given authentication token
56       * 
57       * @param token The token identifying the authentication event to be completed
58       */
59      void completeAuthenticationEvent(String token);
60      
61      /***
62       * Get a list of session attribute names that should be saved and restored upon authentication events
63       * @return list of session attribute names
64       */
65      List getSessionAttributeNames();
66  
67  }