How I can change the default spring-security 2.0 login page in grails app? - grails

I need configurate my web application to login with spring-security using username store in my DBs' app(im using PostgreSQL) from my auth.gsp page. How i performance this? Thanks in advance

Really is very simple, but I didnt know. I create another auth.gsp with my specific css and js, and in field text I named same as in default auth.gsp generate by spring security plugin. My auth.gsp is located in grails-app/view

Related

How to override Login/authenticate method in the Grails spring-security-core plugin?

I am attempting to use the Grails Spring Security Core plugin. I would like to override the login functionality, which is 'login/authenticate'. I searched through the spring-security-core plugin source and wasn't able to find the 'authenticate' method, and its not in the generated LoginController.
https://github.com/grails-plugins/grails-spring-security-core/blob/master/grails-app/controllers/grails/plugin/springsecurity/LoginController.groovy
Any guidance would be most appreciated. Thank you in advance.
Spring security is built around filter chains. The correct way would be to create a new filter. You probably need to download the spring grails security core plugin and look at classes like GrailsUsernamePasswordAuthenticationFilter to get a feel for how to do it. Your way forward might be to copy GrailsUsernamePasswordAuthenticationFilter, install it as your authentication filter, and put logging in there.

Which CMS have Integration with Existing Grails App

I have an existing grails app with multiple forms. I need a CMS which allows me to add existing grails forms to this cms and assign each form different permissions. I need to be able to change site template css from admin page. Something like dotnet nuke where you can add existing asp.net page and assign permissions to this page and add custom theme.
Features requested:
Integration with Active Directory
Integration with MS Exchange
Set up grails form security policy from protal admin ui
change form css theme from portal admin ui
easy integration with portal
I'm not sure exactly what features it supports, but Weceem is a CMS implemented as a Grails plugin, so that's an obvious starting point.
There is Maglev plugin for Magnolia that you can use, but AFAIK it works only with 4.5.x branch, not with the latest version.
Other then that, if your main requirements are security and being able to pull the theme from CMS, you can deploy Magnolia and your grails app in same web app, configure Magnolia to handle all incoming requests (that's by default) and only configure bypass inside of Magnolia for cms subchain for url where your form is available. This way Magnolia will take care of the URL check the security, make context available for you and you can refer from your form to the theme that is selected by editors in your Magnolia installation. While this description sounds probably a bit convoluted, it's actually very simple to do.
HTH, Jan

Custom login page in grails 2.3.4 with spring security core 2.0-RC2

I am using the new grails 2.3.4 with Spring Security Core 2.0-RC2 plugin. I have generated the domain objects and got also a user via the Bootstrap.groovy into the db. However, I am wondering where to specify a custom login for my page?
Is it also possible to do the sign up process via the spring security plugin?
I appreciate your answer!
Create a gsp in the following pattern: grails-app/views/login/auth.gsp.
This way the default template is automatically replaced.

Spring-Security-UI

This is the first time i have attempted to use spring security UI in my Grails application.
I am currently using Spring Security Core and it works fine but I like the ideas of the UI plugin.
I have read through the documentation and I cannot see any single commant to run to set everything up with default values. Keeping in mind I have Spring Security Core already running.
Can anyone please help me out.
Thanks
You just need to override your auth view using
grails s2ui-override auth

Grails - Acegi: Customize Authentication Method

I want to change the authentication process that is used by the Acegi - Plugin. It should be a completely customized process. Custom login form + custom auth method.
Obviously there is only little documentation regarding this topic.
In the book The Definitive Guide to Grails it is described for an older version of grails. There the spring/resources.xml is used.
In the new version is a spring/resources.groovy file, where a DSL is used. I don't know how to configure a new AuthenticationManager.
How can I do this?
In respect to the form, you should have a auth.gsp under /grails-wapp/views/login. In respect to authentication, you probably only need to injet a different AuthenticateService in LoginController, which is under /grails-app/controllers/.

Resources