I'm really confused about this.
Sometimes it runs, sometimes not. Can someone provide insight into the conditions under which doGetAuthorizationInfo
will be called?
Thanks
In the Shiro Docs:
This implementation obtains the actual AuthorizationInfo object from the subclass's implementation of doGetAuthorizationInfo, and then caches it for efficient reuse if caching is enabled
The function, as to my experience, is only called when the authorization info is actually needed. If Shiro is configured to use a cache it will not call it every time e.g. roles are checked.
Whenever the method hasRole or isPermitted is called by the Shiro Subject this method is invoked.