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 NotOwnerException
public void load(String name, Object credential) throws ClassNotFoundException, IOException, NotOwnerException
public void save(String name) throws IOException
public String getName()
public void setDebug(boolean enable)
public User getUser(String name)
public User getUser(UserInfo userInfo)
public User authenticate(UserInfo userInfo)
public Group getGroup(String name)
public Principal getAclOwner(Object credential)
public Acl getAcl(String name)
public Acl getAcl(String name, char separator)
public Permission getPermission(String name)
public Enumeration getUsers()
public Enumeration getGroups()
public Enumeration getAcls()
public Enumeration getPermissions()
public User newUser(String name, Object credential, Object constraints) throws SecurityException
public Group newGroup(String name) throws SecurityException
public Acl newAcl(Principal owner, String name) throws SecurityException
public Permission newPermission(String name) throws SecurityException
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 SecurityException
public void deleteAcl(Principal owner, Acl acl) throws SecurityException
public void setPermission(Acl acl, Principal principal, Permission permission, boolean allow)
public LogOutputStream getDebugLog()
public void setDelegator(Object obj)
public Object getDelegator()
All Examples This Package All Security Examples