Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Groovy
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Ron McLeod
Paul Clapham
Tim Cooke
Devaka Cooray
Sheriffs:
Liutauras Vilda
paul wheaton
Rob Spoor
Saloon Keepers:
Tim Moores
Stephan van Hulst
Tim Holloway
Piet Souris
Mikalai Zaikin
Bartenders:
Carey Brown
Roland Mueller
Forum:
Groovy
LDAP with Grails
Srinivasa Kadiyala
Ranch Hand
Posts: 237
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I am trying to authenticate using LDAP. I have tried to implement the way it is described in GRAILS.
http://grails.org/plugin/ldap
It is not working for me.
Appreciate inputs.
Srini
Gregg Bolinger
Ranch Hand
Posts: 15304
6
I like...
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Srinivasa Kadiyala wrote:
It is not working for me
http://faq.javaranch.com/java/ItDoesntWorkIsUseless
Srinivasa Kadiyala
Ranch Hand
Posts: 237
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Dear All
First of all regret for lack of information to the experts trying to help me.
Files BootStrap.grrovy in config folder:
import java.security.MessageDigest import gldapo.Gldapo import org.codehaus.groovy.grails.commons.ConfigurationHolder class BootStrap { def init = { servletContext -> } def destroy = { } def ldapConfiguration = {ctx -> println "LDAP SERVICE INITIALIZATION..." Gldapo.initialize(application.config.ldap3) println "Gldapo.instance.directories: ${Gldapo.instance.directories}" println "Gldapo.instance.schemas: ${Gldapo.instance.schemas}" } }
Config.groovy in Config folder:
// locations to search for config files that get merged into the main config // config files can either be Java properties files or ConfigSlurper scripts // grails.config.locations = [ "classpath:${appName}-config.properties", // "classpath:${appName}-config.groovy", // "file:${userHome}/.grails/${appName}-config.properties", // "file:${userHome}/.grails/${appName}-config.groovy"] // if(System.properties["${appName}.config.location"]) { // grails.config.locations << "file:" + System.properties["${appName}.config.location"] // } grails.mime.file.extensions = true // enables the parsing of file extensions from URLs into the request format grails.mime.use.accept.header = false grails.mime.types = [ html: ['text/html','application/xhtml+xml'], xml: ['text/xml', 'application/xml'], text: 'text/plain', js: 'text/javascript', rss: 'application/rss+xml', atom: 'application/atom+xml', css: 'text/css', csv: 'text/csv', all: '*/*', json: ['application/json','text/json'], form: 'application/x-www-form-urlencoded', multipartForm: 'multipart/form-data' ] // The default codec used to encode data with ${} grails.views.default.codec="none" // none, html, base64 grails.views.gsp.encoding="UTF-8" grails.converters.encoding="UTF-8" // enabled native2ascii conversion of i18n properties files grails.enable.native2ascii = true // set per-environment serverURL stem for creating absolute links environments { production { grails.serverURL = "http://www.changeme.com" } development { grails.serverURL = "http://localhost:8080/${appName}" } test { grails.serverURL = "http://localhost:8080/${appName}" } } // log4j configuration log4j = { // Example of changing the log pattern for the default console // appender: // //appenders { // console name:'stdout', layout:pattern(conversionPattern: '%c{2} %m%n') //} error 'org.codehaus.groovy.grails.web.servlet', // controllers 'org.codehaus.groovy.grails.web.pages', // GSP 'org.codehaus.groovy.grails.web.sitemesh', // layouts 'org.codehaus.groovy.grails.web.mapping.filter', // URL mapping 'org.codehaus.groovy.grails.web.mapping', // URL mapping 'org.codehaus.groovy.grails.commons', // core / classloading 'org.codehaus.groovy.grails.plugins', // plugins 'org.codehaus.groovy.grails.orm.hibernate', // hibernate integration 'org.springframework', 'org.hibernate' warn 'org.mortbay.log' } //log4j.logger.org.springframework.security='off,stdout' ldap { directories { directory1 { url = "ldaps://xxx.yyy.zzz.com:389" base = "DC=abc,DC=def,DC=com" userDn = "CN=aaaa,OU=bbbb,OU=ccccc,OU=Corporate,DC=cccc,DC=cccccc,DC=com" password = "$$$$$$$$" searchControls { countLimit = 40 timeLimit = 600 searchScope = "subtree" } } } //typemappings = [ my.app.MyTypeMappings ] - I do not know what to do here and I have commented. Appreciate some info here too. what to write and //where to place that mappings file. I mean which folder. }
SecurtiyConfig.groovy in config directory:
import gldapo.Gldapo; security { // see DefaultSecurityConfig.groovy for all settable/overridable properties active = true loginUserDomainClass = "User" authorityDomainClass = "Role" requestMapClass = "Requestmap" Gldapo.initialize(new URL('file:/Config.groovy')); }
Srini
Srinivasa Kadiyala
Ranch Hand
Posts: 237
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
FYI....I am using Grails 1.1.1 / Groovy 1.6 with Netbeans 6.7
IDE
Srini
Srinivasa Kadiyala
Ranch Hand
Posts: 237
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Dear All
Appreciate some help.
Thanks
Srini
Dave Klein
author
Posts: 77
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I know this isn't much help, but you might want to post this question on the Grails mailing list
http://www.grails.org/Mailing+lists
The guy who created Gldapo, Luke Daley is pretty active there.
Dave
Author of Grails: A Quick-Start Guide
Srinivasa Kadiyala
Ranch Hand
Posts: 237
posted 15 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks Dave. I have sent an e-mail to user mailing list giving a link to
Java
Ranch forum.
Hoping to get some help.
Thanks
Srini
Wanna see my flashlight? How about this tiny ad?
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Errors upon trying to use ActiveMQ
I looooove GroovyConsole
LDAP
Retrieve values from a bean in JSP
Choosing web application framework
More...