|
|
Problem in SpringLdap 1.3.0 Authentication
I have a problem with getContext(userDN,password) method when i pass the valid userDn and password also it showing some error like the implementation is not supported
i have used the context.xml like this
lt;bean id=quot;contextSourcequot; class=quot;org..ldap.pool.factory.Pooli ngContextSourcequot;gt;
lt;property name=quot;contextSourcequot; ref=quot;contextSourceTargetquot; /gt;
lt;/beangt;
lt;bean id=quot;contextSourceTargetquot; class=quot;org..ldap.core.support.LdapC ontextSourcequot;gt;
lt;property name=quot;uclquot; value=quot;uclquot; /gt;
lt;property name=quot;basequot; value=quot;dc=xxx,dc=comquot; /gt;
lt;property name=quot;userDnquot; value=quot;uid=bind,ou=System,dc=xxx,dc=comquot; /gt;
lt;property name=quot;passwordquot; value=quot;bindquot; /gt;
lt;property name=quot;pooledquot; value=quot;truequot;gt;lt;/propertygt;
lt;/beangt;
lt;bean id=quot;ldapTemplatequot; class=quot;org..ldap.core.LdapTemplatequot; gt;
lt;constructor-arg ref=quot;contextSourcequot; /gt;
lt;/beangt;
lt;bean id=quot;springLDAPServicequot; class=quot;com.service.serviceimplquot; depends-on=quot;ldapConstantsquot;gt;
lt;property name=quot;ldapTemplatequot; ref=quot;ldapTemplatequot; /gt;
lt;property name=quot;contextSourcequot; ref=quot;contextSourcequot;gt;lt;/propertygt;
lt;property name=quot;userValidationContextSourcequot; ref=quot;userValidationContextSourcequot;/gt;
lt;/beangt;
after this the context source i am injecting in the serviceimpl class and calling the method like
ctx=contextSource.getContext(userDn, password);
when i use the contextSource of PoolingContextSource it is throwing exception
but when i use the LDAPContextSource it is executing but the problem is the
LdapUtils.closeContext(ctx); is not working means context object is not closing in this like the above one
any help will be appritiated pls help it is very urgent |
|