|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.management.NotificationBroadcasterSupport
org.ow2.jonas.lib.reconfig.ReconfigEmitter
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.
| Field Summary |
|---|
| Fields inherited from class org.ow2.jonas.lib.reconfig.ReconfigEmitter |
|---|
RECONFIG_TYPE, SAVE_RECONFIG_TYPE |
| 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 |
|---|
addNotificationListener, 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.reconfig.ReconfigEmitter |
|---|
initLogger, sendReconfigNotification, sendSaveNotification |
| Methods inherited from class javax.management.NotificationBroadcasterSupport |
|---|
getNotificationInfo, handleNotification, removeNotificationListener, removeNotificationListener, sendNotification |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.ow2.jonas.security.internal.realm.factory.JResourceLDAPMBean |
|---|
clearCache |
| Methods inherited from interface org.ow2.jonas.security.internal.realm.factory.JResourceMBean |
|---|
getName, saveConfig |
| Constructor Detail |
|---|
public JResourceLDAP()
throws Exception
Exception - if the super constructor fail| Method Detail |
|---|
public JUser findUser(String username)
throws JResourceException
findUser in interface JResourceusername - the wanted user name
JResourceException - if there is a NamingException
public boolean isValidUser(JUser user,
String credentials)
isValidUser in interface JResourceuser - 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
getArrayListCombinedRoles in interface JResourceuser - the given user
JResourceException - if there is a naming exceptionpublic String toXML()
public String toString()
toString in class Object
public Reference getReference()
throws NamingException
getReference in interface ReferenceablegetReference in interface JResourceNamingException - if a naming exception was encountered while
retrieving the reference.public void setInitialContextFactory(String initialContextFactory)
setInitialContextFactory in interface JResourceLDAPMBeaninitialContextFactory - the initial context factorypublic void setProviderUrl(String providerUrl)
setProviderUrl in interface JResourceLDAPMBeanproviderUrl - Url of the ldap serverpublic void setSecurityAuthentication(String securityAuthentication)
setSecurityAuthentication in interface JResourceLDAPMBeansecurityAuthentication - authentication used during the
authentication to the LDAP serverpublic void setSecurityPrincipal(String securityPrincipal)
setSecurityPrincipal in interface JResourceLDAPMBeansecurityPrincipal - DN of the Principal(username)public void setSecurityCredentials(String securityCredentials)
setSecurityCredentials in interface JResourceLDAPMBeansecurityCredentials - Credential(password) of the principalpublic void setSecurityProtocol(String securityProtocol)
setSecurityProtocol in interface JResourceLDAPMBeansecurityProtocol - security protocol to usepublic void setLanguage(String language)
setLanguage in interface JResourceLDAPMBeanlanguage - preferred language to use with the servicepublic void setReferral(String referral)
setReferral in interface JResourceLDAPMBeanreferral - how referrals encountered by the service provider are to
be processedpublic void setStateFactories(String stateFactories)
setStateFactories in interface JResourceLDAPMBeanstateFactories - list of state factoriespublic void setAuthenticationMode(String authenticationMode)
setAuthenticationMode in interface JResourceLDAPMBeanauthenticationMode - BIND_AUTHENTICATION_MODE or
COMPARE_AUTHENTICATION_MODEpublic void setUserPasswordAttribute(String userPasswordAttribute)
setUserPasswordAttribute in interface JResourceLDAPMBeanuserPasswordAttribute - attribute in order to get the password of
this LDAP realmpublic void setUserRolesAttribute(String userRolesAttribute)
setUserRolesAttribute in interface JResourceLDAPMBeanuserRolesAttribute - attribute in order to get the user role from
the ldap serverpublic void setRoleNameAttribute(String roleNameAttribute)
setRoleNameAttribute in interface JResourceLDAPMBeanroleNameAttribute - role name when performing a lookup on a rolepublic void setBaseDN(String baseDN)
setBaseDN in interface JResourceLDAPMBeanbaseDN - DN used for the lookuppublic void setUserDN(String userDN)
setUserDN in interface JResourceLDAPMBeanuserDN - DN used when searching the user DNpublic void setUserSearchFilter(String userSearchFilter)
setUserSearchFilter in interface JResourceLDAPMBeanuserSearchFilter - filter used when searching the userpublic void setRoleDN(String roleDN)
setRoleDN in interface JResourceLDAPMBeanroleDN - DN used when searching the role DN. Override the baseDN if
it is definedpublic void setRoleSearchFilter(String roleSearchFilter)
setRoleSearchFilter in interface JResourceLDAPMBeanroleSearchFilter - filter used when searching the rolepublic void setAlgorithm(String algorithm)
setAlgorithm in interface JResourceLDAPMBeanalgorithm - algorithm to be usedpublic String getInitialContextFactory()
getInitialContextFactory in interface JResourceLDAPMBeanpublic String getProviderUrl()
getProviderUrl in interface JResourceLDAPMBeanpublic String getSecurityAuthentication()
getSecurityAuthentication in interface JResourceLDAPMBeanpublic String getSecurityPrincipal()
getSecurityPrincipal in interface JResourceLDAPMBeanpublic String getSecurityCredentials()
getSecurityCredentials in interface JResourceLDAPMBeanpublic String getSecurityProtocol()
getSecurityProtocol in interface JResourceLDAPMBeanpublic String getLanguage()
getLanguage in interface JResourceLDAPMBeanpublic String getReferral()
getReferral in interface JResourceLDAPMBeanpublic String getStateFactories()
getStateFactories in interface JResourceLDAPMBeanpublic String getAuthenticationMode()
getAuthenticationMode in interface JResourceLDAPMBeanpublic String getUserPasswordAttribute()
getUserPasswordAttribute in interface JResourceLDAPMBeanpublic String getUserRolesAttribute()
getUserRolesAttribute in interface JResourceLDAPMBeanpublic String getRoleNameAttribute()
getRoleNameAttribute in interface JResourceLDAPMBeanpublic String getBaseDN()
getBaseDN in interface JResourceLDAPMBeanpublic String getUserDN()
getUserDN in interface JResourceLDAPMBeanpublic String getUserSearchFilter()
getUserSearchFilter in interface JResourceLDAPMBeanpublic String getRoleDN()
getRoleDN in interface JResourceLDAPMBeanpublic String getRoleSearchFilter()
getRoleSearchFilter in interface JResourceLDAPMBeanpublic String getAlgorithm()
getAlgorithm in interface JResourceLDAPMBean
protected DirContext getDirContext()
throws NamingException
NamingException - if we can't retrieve a DirContext
public void removeMBeans()
throws JResourceException
removeMBeans in interface JResourceJResourceException - if the MBeans can not be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||