01: /* Copyright 2001 The JA-SIG Collaborative. All rights reserved.
02: * See license distributed with this file and
03: * available online at http://www.uportal.org/license.html
04: */
05:
06: package org.jasig.portal.security;
07:
08: import java.io.Serializable;
09:
10: /**
11: * <p>An interface that defines the required methods for assigning and
12: * retrieving information about the authenticated principal (user). Providers
13: * requiring additional principal information should extend this interface
14: * rather than replacing it.</p>
15: *
16: * @author Andrew Newman, newman@yale.edu
17: * @version $Revision: 34783 $
18: */
19: public interface IPrincipal extends Serializable {
20:
21: /**
22: * Returns the locally unique username or user identifier for this
23: * principal.
24: */
25: public String getUID();
26:
27: /**
28: * Returns the globally unique user identifier for this principal. This
29: * identifier should be maximally unique within the scope of the deployed
30: * security mechanism.
31: *
32: */
33: public String getGlobalUID();
34:
35: /**
36: * Returns the human-readable name of the principal. This should be either
37: * their first and last name or whatever local convention dicates should be
38: * returned by the CommonName (CN) attribute for those security contexts
39: * using X.509 style naming.
40: */
41: public String getFullName();
42:
43: /**
44: * Sets the locally unique username in preparation for authentication. Note
45: * that post-authentication, an attempt to set a UID may either fail or
46: * reset the authentication status of the security context container.
47: *
48: * @param UID The desired locally unique UID value.
49: */
50: public void setUID(String UID);
51: }
|