All Examples Security Examples
This example allows you to delegate authentication and authorization calls to other realm classes. To use the example, you need two or more alternate realms, such as the LDAPRealm, NTRealm, UnixRealm, RDBMSRealm, or your own custom realm. (If you are using the WebLogic properties file and one other realm, you do not need this example.)
DelegatingRealm lets you choose which realms supply which type of information by setting properties in a delegating.properties file. The property name is a method defined by one of the weblogic.security.acl.Realm interfaces, such as getUser or authenticate. The property value is the class and method to call for that method, for example examples.security.RDBMSRealm.getUser or weblogic.security.unixrealm.UnixRealm.authenticate.
To delegate to more than one realm, add a suffix ".n" to each
instance of the property name, where n is an integer, starting
You can delegate the following realm methods to any realm class:
If you do not delegate a particular method, WebLogic Server falls back on the WLPropertyRealm.
$ javac -d %SERVER_CLASSES% ../util/RealmProperties.java
$ javac -d %SERVER_CLASSES% *.java
$ copy delegating.properties %WL_HOME%
For more information about WebLogic security realm architecture and development see Using WebLogic Realms and Acls.