How can we customize the grails siro v1.1.3 plugin?

It’s very difficult for me to find the right method to configure my application to work with the plug, I use grails 1.3.6 and the Shiro 1.1.3 plugin

I installed my application in accordance with the quick start guide for docs plugins on the site, but when I want to configure further, that is, set the login success URL, I find myself on the road signs.

I do not understand that after research, I see 3 ways to configure the parameters.

  • setting explicit options as separate lines in config.groovy, ie security.shiro.redirectUrl = "/ blah"

  • Quite often, I see this type of block on nabble and Stack Overflow, but without a hint where it goes:

    security {syro {filter {successUrl: "/ blah /"}}}

I tried this approach to set successUrl, but it has no effect.

  • I saw links to the SecurityFilters.groovy file, but cannot see where I would put successUrl in this file.

So, if anyone can clean this up, that would be great :-)

Thank,

+3
source share
1 answer

Well, this is a shame, but reading the ShiroFilters source code, it seems that the controller: "auth", the action: "login" is hard-coded. That way, basically, when you click on a secure address, the redirect will fire. After you process the authentication action, you can select any address that you like for your destination using or not the targetUri value that is provided in the parameters.

, . , GrailsApplication, , ".config".

+2

Source: https://habr.com/ru/post/1794524/


All Articles