Skip to content

Conversation

erichelgeson
Copy link
Contributor

First 1/2 of #246

Shows example of session integration along with spring security core plugin integration.

Browse to http://localhost:8080/test/index for example
Note that the domain-classes are auto generated from https://grails-plugins.github.io/grails-spring-security-core/v3/index.html#s2-quickstart
You can restart the app and will not be logged out.
User: user
Pass: password
@rwinch
Copy link
Member

rwinch commented Mar 25, 2016

@erichelgeson Thanks for submitting this!

I'll wait for the second half before merging/reviewing in detail. One thing we will want to ensure we have is some tests to ensure this is working.

@rwinch rwinch added the status: waiting-for-feedback We need additional information before we can continue label Mar 25, 2016
@erichelgeson
Copy link
Contributor Author

No problem, took a first stab at the docs too (could use a second set of eyes on that as well).

@erichelgeson
Copy link
Contributor Author

@rwinch tests adapted from the spring boot example. Can be run by ./gradlew integrationTest

@rwinch rwinch removed the status: waiting-for-feedback We need additional information before we can continue label Mar 28, 2016
@rwinch rwinch self-assigned this Mar 28, 2016
@rwinch rwinch added this to the 1.2.0.RC2 milestone Mar 28, 2016
@rwinch rwinch added in: docs An issue in Documentation or samples samples type: enhancement A general enhancement labels Mar 28, 2016
@rwinch
Copy link
Member

rwinch commented Mar 29, 2016

@erichelgeson Thanks for the updates!

Some feedback.

  • We should add this project to settings.gradle
include 'samples:grails3'
  • The build is not currently passing. I get the following error:
:integrationTest

sample.HomeSpec > Anonymous page not redirected to login FAILED
    java.lang.IllegalStateException
        Caused by: org.springframework.boot.context.embedded.EmbeddedServletContainerException
            Caused by: java.lang.IllegalStateException
  • Perhaps we can change test/index to be the index at the context root so users don't have an additional step.

@rwinch rwinch added the status: waiting-for-feedback We need additional information before we can continue label Mar 29, 2016
@erichelgeson
Copy link
Contributor Author

The tests are passing, just I didn't have a random port assigned (the boot gradle example didnt work in grails, but i found one that does). the root / is not protected, then /test/ is a protected resource in the tests. I think it's valuable to leave both tests in (anon ok and anon redirect)

Pushed up the changes, let me know!

@rwinch rwinch changed the title Grails 3.1.4 Sample app Add Grails 3 Sample Mar 30, 2016
@rwinch
Copy link
Member

rwinch commented Mar 30, 2016

Thanks for the PR! This is now merged into master. I have applied a bit of polish via 3825a46

@rwinch rwinch closed this Mar 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: docs An issue in Documentation or samples status: waiting-for-feedback We need additional information before we can continue type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants