Quantcast

Grails application with CAS Server Authentication

classic Classic list List threaded Threaded
1 message Options
bsk
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Grails application with CAS Server Authentication

bsk
This post has NOT been accepted by the mailing list yet.
Hi All,

I have configured the CAS server and successfully configured my sample java web application with CAS authentication but now I want to configure the Grails application with CAS authentication.

I am very new to Grails so by following the help doc I have created a grails application by executing the following command.

D:\apps> grails create-app webapp

It create one webapp folder in d:\baji folder then I run the run-app command as follows

D:\apps\webapp>grails run-app

It runs successfully but now I have created a MainController by executing the following command

D:\apps\webapp>grails CreateController main

The MainController code is as follows:

package webapp

class MainController {

def index() { render "Hello"}
}


But now I want configure the CAS server against to my grails application i.e webapp for that I have downloaded grails-cas-client-1.2.zip and I run the install-plugin command as follows

D:\apps\webapp>grails install-plugin d:\ grails-cas-client-1.2.zip

It added successfully and I have added the following properties to the config.groovy file

grails.plugins.springsecurity.cas.loginUri = '/login'
grails.plugins.springsecurity.cas.serviceUrl = 'http://localhost:8080/webapp/j_spring_cas_security_check'
grails.plugins.springsecurity.cas.serverUrlPrefix = 'http://localhost:8081/cas-server'
grails.plugins.springsecurity.cas.proxyCallbackUrl = 'http://localhost:8080/webapp/main'
grails.plugins.springsecurity.cas.proxyReceptorUrl = '/main'


Now I run the application again by run-app command as follows

D:\apps\webapp>grails run-app

It�s up the application on http://localhost:8080/webapp

When I navigated to the http://localhost:8080/webapp/main url in browser it is showing the �hello� on webpage but my question is why it is not redirecting to CAS server for asking credentials?

So could you please help me out how to configure the CAS server authentication for my Grails application?

NOTE: I referred the following links to configure the grails with CAS Server

http://grails.org/plugin/cas-client-plugin

http://burtbeckwith.github.com/grail...20Introduction




Regards,
BSK
Loading...