LDAP ldapAuthProvider

12 views
Skip to first unread message

sirdaiz

unread,
Oct 14, 2019, 7:46:05 AM10/14/19
to grailsEnCastellano
Tengo una aplicación que conectaa con usuarios a la base de datos y ahora quiero que tambien conecté por LDAP

Tengo puesto lo siguiente


               
        def authentication = new UsernamePasswordAuthenticationToken(user, pass)

        if (grails.plugin.springsecurity.ldap.active) { 
SCH.context.authentication = ldapAuthProvider.doAuthentication(authentication) } else {
//AQUI PUEDO HACER LOGIN SIN PROBLEMAS SCH.context.authentication = daoAuthenticationProvider.authenticate(authentication) }

El problema es que el metodo doAuthentication devuelve un DirContextOperations y no puede convertirlo a SCH.context.authentication

sirdaiz

unread,
Oct 14, 2019, 7:47:47 AM10/14/19
to grailsEnCastellano
Perdon devuelve un org.springframework.ldap.core.DirContextAdapter
Reply all
Reply to author
Forward
0 new messages