Grails3MigrationNotes - Arkilog/grails-shiro GitHub Wiki
Grails 3 Migration Notes
During the migration process tracked by #44, several points were addressed in the Grails Shiro plugin. The present page attempts to list them.
Changes
- The projects file structure was changed using the excellent migrate2-grails3 plugin :
- For the main project (the plugin)
- And it's test suite :
- shiro2/test/projects/annotation-test -> shiro3/annotation-test
- shiro2/test/projects/cli-tests -> shiro3/cli-tests
- shiro2/test/projects/default -> shiro3/default
- shiro2/test/projects/native-realm-only -> shiro3/native-realm-only
- shiro2/test/projects/native-session -> shiro3/native-session
- shiro2/test/projects/spring-filter -> shiro3/spring-filter
- shiro2/test/projects/wildcard-realm -> shiro3/wildcard-realm
- Multi project build was enabled in shiro3/settings.gradle
- Web xml configuration is not used anymore which drops support for Ini configuration in favor of a pure bean DSL
- Security Filters are not used anymore in favor of interceptors, using this command
create-security-interceptorshould enable a default interceptor. - Each sample project received a
compile project(":grails-shiro")dependency - Shiro library bumped to 1.2.4
- Travis build .travis.yml :
- Jdk7 and Jdk8 variants
- Firefox setup using Xvfb
- Less verbose builds while providing useful Gradle output (-i option + grep)
- Runs gradle tests on the plugin and the sample projects (integrationTest)
Limitations
- Native session configuration uses
MYSESSIONIDas a cookie name by default, you can revert to JSESSIONID by configuringbeans.shiroSessionIdCookie.name="JSESSIONID". For an unknown reason, usingJSESSIONIDbreaks these tests : - Legacy configuration doesn't work, please check these samples for workarounds :
- The
defaultsample project is disabled since it uses the legacy configuration
Future
Many things could be done in the future, this is a proposal :
- Use traits for
accessControlinstead of dynamic methods - Use
@CompileStaticin interceptors (as a consequence of using traits) - Setup automatic publishing to bintray via Travis CI