Oracle Application Server JAAS Provider API Reference
10g Release 2 (10.1.2)

B14019-02


com.evermind.security
Interface User

All Superinterfaces:
java.security.Principal

public interface User
extends java.security.Principal

A User is used to represent a user.

This interface is deprecated in 10.1.2 in favor of the standard J2SE JAAS mechanism based on LoginModule. See OC4J Security Guide for more information on implementing custom JAAS login module.


Method Summary
 void addToGroup(Group group)
          Adds the user to the specified group (if possible), throws UnsupportedOperationException if not possible.
 boolean authenticate(java.lang.String password)
          Verify this user.
 java.lang.String getCertificateIssuerDN()
          Retrieves the certificate issuer DN for this user, null if certificates are not supported or this user is not associated with a certificate.
 java.math.BigInteger getCertificateSerial()
          Retrieves the certificate serial ID for this user, null if certificates are not supported or this user is not associated with a certificate.
 java.lang.String getDescription()
          Returns a short description of this user or null if no description is present.
 java.util.Set getGroups()
          Returns the groups that this user belongs to, if known/supported.
 java.util.Locale getLocale()
          Return this users Locale or null if none specified.
 java.lang.String getName()
          Returns the username of this user
 java.lang.String getPassword()
          Gets the user password, may result in an exception if it's not supported by the current UserManager (for security or other reasons).
 boolean hasPermission(java.security.Permission permission)
          Check if this user has the named permission.
 boolean isMemberOf(Group group)
          See if this user is a member of the specified group.
 void removeFromGroup(Group group)
          Removes the user from the specified group, throws UnsupportedOperationException if not supported in this manager.
 void setCertificate(java.lang.String issuerDN, java.math.BigInteger serial)
          Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.
 void setCertificate(java.security.cert.X509Certificate cert)
          Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.
 void setDescription(java.lang.String description)
          Sets the description of this user, throws UnsupportedOperationException if not possible.
 void setLocale(java.util.Locale locale)
          Sets the locale of this user, throws UnsupportedOperationException if locale specification is not supported by the UserManager used.
 void setPassword(java.lang.String password)
          Sets the user password, may result in an exception if it's not supported by the current UserManager.

 

Methods inherited from interface java.security.Principal
equals, hashCode, toString

 

Method Detail

getName

public java.lang.String getName()
Returns the username of this user
Specified by:
getName in interface java.security.Principal

getDescription

public java.lang.String getDescription()
Returns a short description of this user or null if no description is present.

setDescription

public void setDescription(java.lang.String description)
Sets the description of this user, throws UnsupportedOperationException if not possible.

authenticate

public boolean authenticate(java.lang.String password)
Verify this user.

getLocale

public java.util.Locale getLocale()
Return this users Locale or null if none specified.

setLocale

public void setLocale(java.util.Locale locale)
               throws java.lang.UnsupportedOperationException
Sets the locale of this user, throws UnsupportedOperationException if locale specification is not supported by the UserManager used.
Throws:
java.lang.UnsupportedOperationException

hasPermission

public boolean hasPermission(java.security.Permission permission)
Check if this user has the named permission.

isMemberOf

public boolean isMemberOf(Group group)
See if this user is a member of the specified group.

setPassword

public void setPassword(java.lang.String password)
Sets the user password, may result in an exception if it's not supported by the current UserManager.

getPassword

public java.lang.String getPassword()
Gets the user password, may result in an exception if it's not supported by the current UserManager (for security or other reasons). This API will throw an exception if OC4J is configured with security providers such as SSO, JAZN-LDAP, and 3rd party LDAP server. So, to keep the application transparent across different security providers, applications should not use this API.

getCertificateSerial

public java.math.BigInteger getCertificateSerial()
Retrieves the certificate serial ID for this user, null if certificates are not supported or this user is not associated with a certificate.

getCertificateIssuerDN

public java.lang.String getCertificateIssuerDN()
Retrieves the certificate issuer DN for this user, null if certificates are not supported or this user is not associated with a certificate.

setCertificate

public void setCertificate(java.lang.String issuerDN,
                           java.math.BigInteger serial)
                    throws java.lang.UnsupportedOperationException
Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.
Throws:
java.lang.UnsupportedOperationException

setCertificate

public void setCertificate(java.security.cert.X509Certificate cert)
Sets the certificate associated with this user, may throw UnsupportedOperationException if certificates are not supported by this UserManager.

addToGroup

public void addToGroup(Group group)
                throws java.lang.UnsupportedOperationException
Adds the user to the specified group (if possible), throws UnsupportedOperationException if not possible.
Throws:
java.lang.UnsupportedOperationException

removeFromGroup

public void removeFromGroup(Group group)
                     throws java.lang.UnsupportedOperationException
Removes the user from the specified group, throws UnsupportedOperationException if not supported in this manager.
Throws:
java.lang.UnsupportedOperationException

getGroups

public java.util.Set getGroups()
                        throws java.lang.UnsupportedOperationException
Returns the groups that this user belongs to, if known/supported.
Throws:
java.lang.UnsupportedOperationException

Oracle Application Server JAAS Provider API Reference
10g Release 2 (10.1.2)

B14019-02


Copyright © 2004, 2005, Oracle. All rights reserved.