grails-plugin

Grails Spring Security Plugin Migrate User Passwords from 1.2.7.3 to 2.0

梦想的初衷 提交于 2019-12-06 11:57:15
I am using Grails 2.3.2 and am trying to upgrade my Spring Security Core Plugin from 1.2.7.3 to 2.0. I made all the import changes and got my app to start, but I was unable to login. One of the changes in 2.0 is that it uses the bcrypt algorithm for passwords, making all my old passwords useless. So, I went through the password reset process in my app and sure enough after that I could log in just fine. But, I want to keep my old passwords for all my users, so I went and found the documentation for the 1.2.7.3 version of the plugin and looked up what algorithm it used: http://grails-plugins

Using BCrypt password hashing with Spring Security Grails plugin

和自甴很熟 提交于 2019-12-06 10:32:53
问题 I'm trying to use the BCrypt password hashing in my Grails app that's using the Spring Security plugin. I've enabled BCrypt by adding the following to Config.groovy grails.plugins.springsecurity.password.algorithm = 'bcrypt' And I've defined the following codec to simplify using BCrypt to encode paswords: public class PasswordCodec { // it doesn't seem to be possible to dependency-inject codecs, so lookup the bean ourselves @Lazy private static PasswordEncoder passwordEncoder = Holders

Custom Plugin transitive Dependency resolution in BuildConfig.groovy Grails 2.2.3

爱⌒轻易说出口 提交于 2019-12-06 06:42:32
问题 tl;dr version Dependencies of my custom grails plugin weren't getting inherited and resolved by projects I installed the plugin to. Install the latest version of the release plugin to your plugin (fixes the issue for jar dependencies) Clear out any references to plugins that might exist in your BuildConfig.groovy file (fixes the issue for plugin dependencies) grails maven-install to make the plugin available in the mavenLocal() source Long version So, I've been trying to create a custom

Grails and charting?

半腔热情 提交于 2019-12-06 06:08:41
问题 I am wondering about the best current charting solution for Grails to include charts in my pages. Looking at the Flex plugin, it doesnt look like it has been touched in a couple of years. There are google charts (and eastwood) plugins but they are a bit too simple for what I am looking for. Just checking if I am missing something. 回答1: There are a number of Grails plugins that deal with charting and allow integrating with well-respected methods of generating charts and graphs. From just a

Grails client side validation

巧了我就是萌 提交于 2019-12-06 01:31:10
问题 How do you (if you) manage client side validation with grails ? Do you use a plugin or do you mirror your constraints using a javascript framework ? Cheers 回答1: I haven't used them personally but these two plugins might help you out: http://grails.org/plugin/javascript-validator http://www.grails.org/plugin/remote-constraints 回答2: On Grails projects that I've been a part of, We haven't used a plugin but rather a mashup of javascript plugins and custom validators (jQuery plugins, Prototype,

How do I implement a custom FilterSecurityInterceptor using grails 1.3.2 and the plugin spring-security-core 1?

允我心安 提交于 2019-12-06 00:54:45
I'm writing a grails 1.3.2 application and implementing security with spring-security-core 1.0. For reasons outside the scope of this question, I'm implementing a custom FilterSecurityInterceptor in addition to the out of the box interceptors. I've started with a blog entry on the topic and attempted to adjust it for Spring Security 3 without much success. Loosely following the blog (since it is based on an older version of Spring Security), I've created the following classes: A org.springframework.security.authentication.AbstractAuthenticationToken subclass to hold my credentials. A org

Property date must be a valid Date error, when using jquery UI plugin

£可爱£侵袭症+ 提交于 2019-12-05 23:56:16
I have a tasks class, which has a date field. In my view file, I have this line of code : <g:textField name="date" value="${tasksInstance?.date}" id="datePicker" /> And using the jquery ui plugin, I added this code to my <head> tag : <g:javascript> $(document).ready(function() { $("#datePicker").datepicker({dateFormat: 'mm/dd/yy'}); }) </g:javascript> But when I save the date field, I get the following error: Property date must be a valid Date error Edit: Tasks.groovy package mnm.schedule class Tasks { static belongsTo = [ user : User, project: Project ] String reason boolean completed String

Grails spring security login issue: /auth?login_error=1

爱⌒轻易说出口 提交于 2019-12-05 21:42:24
I installed SpringSecurity Successfully, Upon user registration and verifying the user using Spring Security UI' RegisterController closures, I can see the user is successfully logged in using the springSecurityService.reauthenticate. However if I logout and try logging in using the auth screen provided by the spring security I always get the http://:port/spoofsecurity/login/auth?login_error=1 I can see in the database that the user is there and unlocked, and enabled. Appreciate any thoughts as why I get that login failure. Thanks My Config.groovy entry grails.plugins.springsecurity.userLookup

Grails : getting assets local storage path inside the controller

独自空忆成欢 提交于 2019-12-05 20:01:10
I need to extract the assets folder physical path in order to write a file from my controller. Any short way of achieving the file persistency from the controller? Eduardo Cuomo Complete example: class ExampleService { def assetResourceLocator def someMethod() { Resource res = assetResourceLocator.findAssetForURI('test.css') String url = res.getURL() String uri = res.getURI() } } Source: https://stackoverflow.com/a/39642278/717267 Look at the AssetProcessorService inside the plugin. There are different function to get the path like getAssetPath or getResolvedAssetPath . This might help you. 来源

Grails ehcache plugin - Another unnamed CacheManager already exists in the same VM

戏子无情 提交于 2019-12-05 10:43:32
I run my Grails application using ehcache for my 2nd level Cache and it works. I installed the ehcache plugin + cache plugin and then it doesn't. I tried almost all solutions from the internet and found no solution I keep getting Another unnamed CacheManager already exists in the same VM . One of the possible solutions is to set p:shared=true in the EhCacheManagerFactoryBean , this works if I use an old plugin "springcache plugin from grails" but with the new plugin they use a modified version of this manager and the property shared is not available. I tried defining a new ehcache.xml file but