|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.security.acl.AbstractListableRealm
The Abstract Listable realm class is used to write custom security realms.
To implement a custom realm, you should only override the methods your realm knows about. For example, if your realm does not manage ACLs, you should not provide your own implementations of the ACL methods.
This class maintains a contract with the FlatGroup class for performance and correctness. If your realm provides a group abstraction, we recommend (but do not require) that your Group objects inherit from FlatGroup.
FlatGroup
Constructor Summary | |
protected |
AbstractListableRealm(java.lang.String auditName)
Constructor to be called by public constructors in subclasses. |
Method Summary | |
protected User |
authCertificates(java.lang.String userName,
java.util.Vector certificates)
Attempt authentication based on any X.509 certificates the user has presented. |
User |
authenticate(UserInfo userInfo)
Check whether some User matches the presented UserInfo and accept its credentials. |
protected User |
authInternal(UserInfo userInfo)
The authentication dispatcher. |
protected User |
authSSLCertificates(java.lang.String userName,
java.util.Vector certificates)
Attempt authentication based on any SSL certificates the remote client has presented. |
protected User |
authUserPassword(java.lang.String userName,
java.lang.String password)
Attempt authentication based on a user name and password. |
java.security.acl.Acl |
getAcl(java.lang.String name)
Retrieves an Access Control List (Acl) of that name, or null. |
java.security.acl.Acl |
getAcl(java.lang.String name,
char separator)
Retrieves an Access Control List (Acl) with the best matching name, or null. |
java.security.Principal |
getAclOwner(java.lang.Object credential)
Retrieves the owner of all ACLs in a BasicRealm, or null, depending on the validity of the passed credential. |
java.util.Enumeration |
getAcls()
Gets an Enumeration of the Acls in a ListableRealm. |
java.lang.Object |
getDelegator()
Return the object that is delegating to this object. |
java.security.acl.Group |
getGroup(java.lang.String name)
Retrieves a group of that name or null. |
java.util.Hashtable |
getGroupMembers(java.lang.String name)
This is not a public method. |
protected java.util.Hashtable |
getGroupMembersInternal(java.lang.String name)
Obtain the set of members of this group. |
java.util.Enumeration |
getGroups()
Gets an Enumeration of the Groups in a ListableRealm. |
java.lang.String |
getName()
Gets the name of a BasicRealm. |
java.security.acl.Permission |
getPermission(java.lang.String name)
Retrieves a permission object of that name or, if null is passed in, returns null. |
java.util.Enumeration |
getPermissions()
Gets an Enumeration of the Permissions in a ListableRealm. |
User |
getUser(java.lang.String name)
Retrieves a User by the specified name, or null. |
User |
getUser(UserInfo userInfo)
Deprecated. |
java.util.Enumeration |
getUsers()
Gets an Enumeration of the in a ListableRealm. |
void |
init(java.lang.String name,
java.lang.Object ownerCredential)
Initializes a realm implementation. |
void |
load(java.lang.String name,
java.lang.Object credential)
Loads a BasicRealm from some persistent state identified in the name. |
void |
save(java.lang.String name)
Saves the realm to some persistent state identified in the name. |
void |
setDelegator(java.lang.Object obj)
Set the object that is delegating to this object. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
protected AbstractListableRealm(java.lang.String auditName)
auditName
- the name of your realm, to be used when
generating audit log eventsMethod Detail |
public void init(java.lang.String name, java.lang.Object ownerCredential) throws java.security.acl.NotOwnerException
name
- Name of RealmownerCredential
- Credentialed owner of a BasicRealmpublic java.lang.String getName()
public User getUser(java.lang.String name)
User
- namepublic User getUser(UserInfo userInfo)
userInfo
- Credentials to check againstpublic User authenticate(UserInfo userInfo)
By default, this implementation calls the authInternal method, and performs an audit log of the result.
userInfo
- Credentials to check againstauthInternal(UserInfo userInfo)
protected User authInternal(UserInfo userInfo)
userInfo
- authentication informationauthCertificates(java.lang.String, java.util.Vector)
,
authUserPassword(java.lang.String, java.lang.String)
,
authSSLCertificates(java.lang.String, java.util.Vector)
protected User authCertificates(java.lang.String userName, java.util.Vector certificates)
The default implementation of this method calls CertAuthentication.authenticate.
userName
- the name of the usercertificates
- a vector containing X509 objectsCertAuthentication.authenticate(java.lang.String, java.util.Vector, boolean)
,
X509
protected User authSSLCertificates(java.lang.String userName, java.util.Vector certificates)
The default implementation of this method calls CertAuthentication.authenticate.
userName
- the name of the usercertificates
- a vector containing X509 objectsauthCertificates(java.lang.String, java.util.Vector)
,
X509
protected User authUserPassword(java.lang.String userName, java.lang.String password)
The default implementation of this method always returns null.
userName
- the name of the userpassword
- the user's plain text passwordpublic java.security.Principal getAclOwner(java.lang.Object credential)
credential
- Credentials of an ownerpublic java.util.Hashtable getGroupMembers(java.lang.String name)
This method tries to look for a cached Group object that has the given name. If it finds it and the object has a set of members, it returns those members. Otherwise, it calls the getGroupMembersInternal method.
FlatGroup
,
getGroupMembersInternal(String name)
protected java.util.Hashtable getGroupMembersInternal(java.lang.String name)
Principal
public java.security.acl.Group getGroup(java.lang.String name)
name
- Name of grouppublic java.security.acl.Acl getAcl(java.lang.String name)
name
- Name of ACL associated with a BasicRealmpublic java.security.acl.Acl getAcl(java.lang.String name, char separator)
name
- Name of the Acl to retrieveseparator
- Character separatorpublic java.security.acl.Permission getPermission(java.lang.String name)
name
- Name of permission to retrievepublic void load(java.lang.String name, java.lang.Object credential) throws java.lang.ClassNotFoundException, java.io.IOException, java.security.acl.NotOwnerException
name
- Name of BasicRealm to loadcredential
- Credentialed owner of a BasicRealmpublic void save(java.lang.String name) throws java.io.IOException
name
- Name to save underpublic java.util.Enumeration getUsers()
public java.util.Enumeration getGroups()
public java.util.Enumeration getAcls()
public java.util.Enumeration getPermissions()
public void setDelegator(java.lang.Object obj)
public java.lang.Object getDelegator()
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |