Uploaded image for project: 'Shiro'
  1. Shiro
  2. SHIRO-400

Allow access to AuthenticationInfo when making decision of it's cache key

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 1.2.1
    • None
    • None

    Description

      Currently it is not possible to utilize generated authentication info in it's key generation when it is written to cache.

      I'm unable to override the getAuthenticationInfo and cacheAuthenticationInfoIfPossible due to their private and final nature and therefore I suggest that there would be a protected Object getAuthenticationCacheKey(AuthenticationToken token, AuthenticationInfo info) variant which would fall back to the original implementation by default thus being backwards compliant as well. This variant would be used only when writing to the cache.

      My current workaround options are to mutilate the token itself or duplicate the cache handling at assertCredentialsMatch.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              tuomas_kiviaho Tuomas Kiviaho
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: