Commits

Sebastian Sdorra committed 4063a91

added some comments

  • Participants
  • Parent commits 087114f
  • Branches apache-shiro

Comments (0)

Files changed (1)

scm-webapp/src/main/java/sonia/scm/security/ScmRealm.java

     this.groupManager = groupManager;
     this.repositoryDAO = repositoryDAO;
     this.authenticator = authenticator;
+
+    // init cache
     this.cache = cacheManager.getCache(String.class, AuthorizationInfo.class,
       CACHE_NAME);
+
+    // set token class
+    setAuthenticationTokenClass(ScmAuthenticationToken.class);
+
+    // use own custom caching
+    setCachingEnabled(false);
+    setAuthenticationCachingEnabled(false);
+    setAuthorizationCachingEnabled(false);
+
+    // set components
     setPermissionResolver(new RepositoryPermissionResolver());
+
+    // add listeners for caching
     userManager.addListener(this);
     repositoryManager.addListener(this);
   }
    *
    * @param token
    *
-   * @return
-   */
-  @Override
-  public boolean supports(AuthenticationToken token)
-  {
-    return token instanceof ScmAuthenticationToken;
-  }
-
-  /**
-   * Method description
-   *
-   *
-   * @param token
-   *
    * @param authToken
    *
    * @return