01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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.Iterator;
20:
21: /**
22: * <p>
23: * Identity Token
24: * </p>
25: * <p>
26: * Holds a unique token identifying the current authentication process.
27: * This token can hold one or more unique name / value (object) attributes
28: * </p>
29: * @author <a href="mailto:taylor@apache.org">David Sean Taylor</a>
30: * @version $Id: $
31: *
32: */
33: public interface IdentityToken {
34: /**
35: * Get the value of the identity token
36: * @return the identity token string
37: */
38: String getToken();
39:
40: /**
41: * set a name/value attribute on this token
42: * @param name
43: * @param value
44: */
45: void setAttribute(String name, Object value);
46:
47: /**
48: * Get an attribute value given the attribute name
49: * @param name
50: * @return
51: */
52: Object getAttribute(String name);
53:
54: /**
55: * Get an iterator over all attribute names
56: * @return
57: */
58: Iterator getAttributeNames();
59: }
|