All Examples This Package All Security Examples
java.lang.Object | +----examples.security.delegatingrealm.DelegatingRealm
To use this class, set its name as the value of your weblogic.security.realmClass property, and create a delegating.properties file. The file uses standard Java properties file syntax, and should contain entries such as the following:
getUser = weblogic.security.ldaprealm.LDAPRealm.getUser getGroup = weblogic.security.ldaprealm.LDAPRealm.getGroup authenticate.1 = weblogic.security.ldaprealm.LDAPRealm.authenticate authenticate.2 = examples.security.rdbmsrealm.RDBMSRealm.authenticate getAcl = examples.security.rdbmsrealm.RDBMSRealm.getAclThe above properties delegate user and group calls to the LDAP realm. The LDAP realm is the primary authentication delegate and the RDBMS realm is the secondary authentication delegate, which is consulted if the primary returns null. ACL-related methods are delegated to the RDBMS realm.
You should examine the source of this class before using it, to make sure it behaves as you expect. It should be easy to tailor to your exact needs.
public DelegatingRealm()
public void init(String name, Object ownerCredential) throws NotOwnerExceptionload
public void load(String name, Object credential) throws ClassNotFoundException, IOException, NotOwnerExceptionsave
public void save(String name) throws IOExceptiongetName
public String getName()setDebug
public void setDebug(boolean enable)getUser
public User getUser(String name)getUser
public User getUser(UserInfo userInfo)authenticate
public User authenticate(UserInfo userInfo)getGroup
public Group getGroup(String name)getAclOwner
public Principal getAclOwner(Object credential)getAcl
public Acl getAcl(String name)getAcl
public Acl getAcl(String name, char separator)getPermission
public Permission getPermission(String name)getUsers
public Enumeration getUsers()getGroups
public Enumeration getGroups()getAcls
public Enumeration getAcls()getPermissions
public Enumeration getPermissions()newUser
public User newUser(String name, Object credential, Object constraints) throws SecurityExceptionnewGroup
public Group newGroup(String name) throws SecurityExceptionnewAcl
public Acl newAcl(Principal owner, String name) throws SecurityExceptionnewPermission
public Permission newPermission(String name) throws SecurityExceptiondeleteUser
public void deleteUser(User user) throws SecurityException
For this and other methods that have return type void, if you specify multiple delegates in the properties file, only the first will be called. To change this behavior, edit the methods you are interested in so that they call callProxies instead.
public void deleteGroup(Group group) throws SecurityExceptiondeleteAcl
public void deleteAcl(Principal owner, Acl acl) throws SecurityExceptionsetPermission
public void setPermission(Acl acl, Principal principal, Permission permission, boolean allow)getDebugLog
public LogOutputStream getDebugLog()setDelegator
public void setDelegator(Object obj)
public Object getDelegator()
All Examples This Package All Security Examples