|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.ow2.jonas.lib.management.javaee.ManagedObject
org.ow2.jonas.security.internal.realm.factory.AbstractJResource
org.ow2.jonas.security.internal.realm.factory.JResourceLDAP
public class JResourceLDAP
This class extends the JResource class for the LDAP implementation.
| Constructor Summary | |
|---|---|
JResourceLDAP()
Constructor : use the super constructor |
|
| Method Summary | |
|---|---|
JUser |
findUser(String username)
Check if a user is found and return it |
String |
getAlgorithm()
Get the default algorithm |
ArrayList |
getArrayListCombinedRoles(JUser user)
Get all the roles (from the roles and from the groups) of the given user |
String |
getAuthenticationMode()
Get the mode for validate the authentication of this LDAP realm |
String |
getBaseDN()
Get the DN used for the lookup of this LDAP realm |
protected DirContext |
getDirContext()
Return a dircontext for this LDAP server |
String |
getInitialContextFactory()
Return the initial context factory of this LDAP realm |
String |
getLanguage()
Get the preferred language to use with the service of this LDAP realm |
String |
getProviderUrl()
Get the Url of the ldap server of this LDAP realm |
Reference |
getReference()
Retrieves the Reference of the object. |
String |
getReferral()
Get how referrals encountered by the service provider are to be processed |
String |
getRoleDN()
Get the DN used when searching the role DN. |
String |
getRoleNameAttribute()
Get the role name when performing a lookup on a role |
String |
getRoleSearchFilter()
Get the filter used when searching the role |
String |
getSecurityAuthentication()
Get the authentication used during the authentication to the LDAP server of this LDAP realm |
String |
getSecurityCredentials()
Get the Credential(password) of the principal of this LDAP realm |
String |
getSecurityPrincipal()
Get the DN of the Principal(username) of this LDAP realm |
String |
getSecurityProtocol()
Get the security protocol to use of this LDAP realm |
String |
getStateFactories()
Get the the list of state factories of this LDAP realm |
String |
getUserDN()
Get the DN used when searching the user DN. |
String |
getUserPasswordAttribute()
Get the attribute in order to get the password of this LDAP realm |
String |
getUserRolesAttribute()
Get the attribute in order to get the user role from the ldap server |
String |
getUserSearchFilter()
Get the filter used when searching the user |
boolean |
isValidUser(JUser user,
String credentials)
Check if the given user with the given credential is a valid user |
boolean |
isValidUserBind(JUser user,
String credentials)
Check if the given user with the given credential is a valid user. |
boolean |
isValidUserCompare(JUser user,
String credentials)
Check if the given user with the given credential is a valid user. |
void |
removeMBeans()
Remove all the Mbeans used by this resource |
void |
setAlgorithm(String algorithm)
Set the default algorithm to use |
void |
setAuthenticationMode(String authenticationMode)
Set the mode for validate the authentication of this LDAP realm |
void |
setBaseDN(String baseDN)
Set the DN used for the lookup of this LDAP realm |
void |
setInitialContextFactory(String initialContextFactory)
Set the initial context factory of this LDAP realm |
void |
setLanguage(String language)
Set the preferred language to use with the service of this LDAP realm |
void |
setProviderUrl(String providerUrl)
Set the Url of the ldap server of this LDAP realm |
void |
setReferral(String referral)
Set how referrals encountered by the service provider are to be processed |
void |
setRoleDN(String roleDN)
Set the DN used when searching the role DN. |
void |
setRoleNameAttribute(String roleNameAttribute)
Set the role name when performing a lookup on a role |
void |
setRoleSearchFilter(String roleSearchFilter)
Set the filter used when searching the role |
void |
setSecurityAuthentication(String securityAuthentication)
Set the authentication used during the authentication to the LDAP server of this LDAP realm |
void |
setSecurityCredentials(String securityCredentials)
Set the Credential(password) of the principal of this LDAP realm |
void |
setSecurityPrincipal(String securityPrincipal)
Set the DN of the Principal(username) of this LDAP realm |
void |
setSecurityProtocol(String securityProtocol)
Set the security protocol to use of this LDAP realm |
void |
setStateFactories(String stateFactories)
Set the the list of state factories of this LDAP realm |
void |
setUserDN(String userDN)
Set the DN used when searching the user DN. |
void |
setUserPasswordAttribute(String userPasswordAttribute)
Set the attribute in order to get the password of this LDAP realm |
void |
setUserRolesAttribute(String userRolesAttribute)
Set the attribute in order to get the user role from the ldap server |
void |
setUserSearchFilter(String userSearchFilter)
Set the filter used when searching the user |
String |
toString()
The string representation of this object is an XML value |
String |
toXML()
String representation of the LDAP realm |
| Methods inherited from class org.ow2.jonas.security.internal.realm.factory.AbstractJResource |
|---|
clearCache, getLogger, getName, getSequenceNumber, getUsers, registerGroupMBean, registerRoleMBean, registerUserMBean, saveConfig, setDomainName, setJmxService, setLogger, setName, setSecurityService, setUsers, unregisterGroupMBean, unregisterRoleMBean, unregisterUserMBean |
| Methods inherited from class org.ow2.jonas.lib.management.javaee.ManagedObject |
|---|
getModelMBean, sendNotification, sendReconfigNotification, sendSaveNotification, setModelMBean |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public JResourceLDAP()
throws Exception
Exception - if the super constructor fail| Method Detail |
|---|
public JUser findUser(String username)
throws JResourceException
username - the wanted user name
JResourceException - if there is a NamingException
public boolean isValidUser(JUser user,
String credentials)
user - the given usercredentials - credential of the user
public boolean isValidUserBind(JUser user,
String credentials)
user - the given usercredentials - credential of the user
public boolean isValidUserCompare(JUser user,
String credentials)
user - the given usercredentials - credential of the user
public ArrayList getArrayListCombinedRoles(JUser user)
throws JResourceException
user - the given user
JResourceException - if there is a naming exceptionpublic String toXML()
public String toString()
toString in class Object
public Reference getReference()
throws NamingException
NamingException - if a naming exception was encountered while
retrieving the reference.public void setInitialContextFactory(String initialContextFactory)
initialContextFactory - the initial context factorypublic void setProviderUrl(String providerUrl)
providerUrl - Url of the ldap serverpublic void setSecurityAuthentication(String securityAuthentication)
securityAuthentication - authentication used during the
authentication to the LDAP serverpublic void setSecurityPrincipal(String securityPrincipal)
securityPrincipal - DN of the Principal(username)public void setSecurityCredentials(String securityCredentials)
securityCredentials - Credential(password) of the principalpublic void setSecurityProtocol(String securityProtocol)
securityProtocol - security protocol to usepublic void setLanguage(String language)
language - preferred language to use with the servicepublic void setReferral(String referral)
referral - how referrals encountered by the service provider are to
be processedpublic void setStateFactories(String stateFactories)
stateFactories - list of state factoriespublic void setAuthenticationMode(String authenticationMode)
authenticationMode - BIND_AUTHENTICATION_MODE or
COMPARE_AUTHENTICATION_MODEpublic void setUserPasswordAttribute(String userPasswordAttribute)
userPasswordAttribute - attribute in order to get the password of
this LDAP realmpublic void setUserRolesAttribute(String userRolesAttribute)
userRolesAttribute - attribute in order to get the user role from
the ldap serverpublic void setRoleNameAttribute(String roleNameAttribute)
roleNameAttribute - role name when performing a lookup on a rolepublic void setBaseDN(String baseDN)
baseDN - DN used for the lookuppublic void setUserDN(String userDN)
userDN - DN used when searching the user DNpublic void setUserSearchFilter(String userSearchFilter)
userSearchFilter - filter used when searching the userpublic void setRoleDN(String roleDN)
roleDN - DN used when searching the role DN. Override the baseDN if
it is definedpublic void setRoleSearchFilter(String roleSearchFilter)
roleSearchFilter - filter used when searching the rolepublic void setAlgorithm(String algorithm)
algorithm - algorithm to be usedpublic String getInitialContextFactory()
public String getProviderUrl()
public String getSecurityAuthentication()
public String getSecurityPrincipal()
public String getSecurityCredentials()
public String getSecurityProtocol()
public String getLanguage()
public String getReferral()
public String getStateFactories()
public String getAuthenticationMode()
public String getUserPasswordAttribute()
public String getUserRolesAttribute()
public String getRoleNameAttribute()
public String getBaseDN()
public String getUserDN()
public String getUserSearchFilter()
public String getRoleDN()
public String getRoleSearchFilter()
public String getAlgorithm()
protected DirContext getDirContext()
throws NamingException
NamingException - if we can't retrieve a DirContext
public void removeMBeans()
throws JResourceException
JResourceException - if the MBeans can not be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||