Home spring-security-shiro org.apache.shiro.authc.AccountException: Not logged in or anonymous
Reply: 0

spring-security-shiro org.apache.shiro.authc.AccountException: Not logged in or anonymous

user1838
1#
user1838 Published in July 22, 2018, 8:01 pm

I am in the process of migration my app from grails 2.4.4 to grails 3.2.9.

I am trying to migrate to

compile 'org.grails.plugins:spring-security-shiro:3.0.1' 

When I try to sign in with a user I get the following error:

   org.apache.shiro.authc.AccountException: Not logged in or anonymous
            at grails.plugin.springsecurity.shiro.SpringSecurityRealm.getCurrentUser(SpringSecurityRealm.groovy:76)
            at grails.plugin.springsecurity.shiro.SpringSecurityRealm.doGetAuthenticationInfo(SpringSecurityRealm.groovy:95)
            at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:568)
            at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:180)
            at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:267)
            at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)
            at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)
            at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:270)
            at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:256)
            at org.apache.shiro.subject.Subject$login.call(Unknown Source)

In my application rules I have:

[pattern: '/login/auth/**',      access: ['permitAll']],

In grails 2.4.4 I would be able to debug the dbRealm.groovy file but I cannot do that with the new plugin.

I know the user is not logged in as that is what I am trying to do but why might it think my user is anonymous?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.34335 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO