So here is my configuration
configuration.add(factory.createChain("/abc/*")
.add(factory.anon()).build());
configuration.add(factory.createChain("/pdf/pdfReport/*")
.add(factory.authc()).build());
configuration.add(factory.createChain("/*").add(factory.authc())
.build());
The problem i am facing is /abc is in root path and if i make it anonymous then shiro still redirects it to login page.
I guess /* is overwriting the /abc request and send every root reqyest for authentication because if i comment this code
configuration.add(factory.createChain("/*").add(factory.authc())
.build());
then i can access /abc anonymously.Can anyone please guide how can i keep both and still achieve mu functionality
I figured it out.I just need to give
configuration.add(factory.createChain("/abc")
.add(factory.anon()).build());
instead of /* because /* is alreadu authenticated for every url after / in the chain