Class UserAuthorisationCacheImpl

java.lang.Object
com.atlassian.crowd.cache.UserAuthorisationCacheImpl
All Implemented Interfaces:
UserAuthorisationCache

public class UserAuthorisationCacheImpl extends Object implements UserAuthorisationCache
Default implementation of UserAuthorisationCache in Crowd.
Since:
v2.2
  • Constructor Details

    • UserAuthorisationCacheImpl

      public UserAuthorisationCacheImpl(com.atlassian.cache.Cache<String,Boolean> cache)
  • Method Details

    • setPermitted

      public void setPermitted(User user, String applicationName, boolean permitted)
      Description copied from interface: UserAuthorisationCache
      Sets whether the user is permitted to authenticate with the application.
      Specified by:
      setPermitted in interface UserAuthorisationCache
      Parameters:
      user - the user to cache fore
      applicationName - name of the application to authenticate
      permitted - set to true if the user is allowed to authenticate with the application, otherwise false.
    • isPermitted

      public Boolean isPermitted(User user, String applicationName)
      Description copied from interface: UserAuthorisationCache
      Returns whether the user is permitted to authenticate with the application.
      Specified by:
      isPermitted in interface UserAuthorisationCache
      Parameters:
      user - the user to check for
      applicationName - name of the application the user is authenticating against
      Returns:
      true</tt> if the user is permitted to authenticate with the application, <tt>false if the user is not permitted to authenticate, and null if the result is not in the cache.
    • clear

      public void clear()
      Description copied from interface: UserAuthorisationCache
      Clears the user authorisation cache.
      Specified by:
      clear in interface UserAuthorisationCache