You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by an...@apache.org on 2012/05/31 11:54:37 UTC

svn commit: r1344626 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ImpersonationCredentials.java

Author: angela
Date: Thu May 31 09:54:37 2012
New Revision: 1344626

URL: http://svn.apache.org/viewvc?rev=1344626&view=rev
Log:
 OAK-91 - Implement Authentication Support (WIP)
 
 - javadoc

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ImpersonationCredentials.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ImpersonationCredentials.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ImpersonationCredentials.java?rev=1344626&r1=1344625&r2=1344626&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ImpersonationCredentials.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/ImpersonationCredentials.java Thu May 31 09:54:37 2012
@@ -17,13 +17,12 @@
 package org.apache.jackrabbit.oak.spi.security.authentication;
 
 import org.apache.jackrabbit.oak.api.AuthInfo;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 import javax.jcr.Credentials;
 
 /**
- * ImpersonationCredentials...  TODO
+ * Implementation of the JCR {@code Credentials} interface used to distinguish
+ * a regular login request from {@link javax.jcr.Session#impersonate(javax.jcr.Credentials)}.
  */
 public class ImpersonationCredentials implements Credentials {
 
@@ -35,10 +34,25 @@ public class ImpersonationCredentials im
         this.authInfo = authInfo;
     }
 
+    /**
+     * Returns the {@code Credentials} originally passed to
+     * {@link javax.jcr.Session#impersonate(javax.jcr.Credentials)}.
+     *
+     * @return the {@code Credentials} originally passed to
+     * {@link javax.jcr.Session#impersonate(javax.jcr.Credentials)}.
+     */
     public Credentials getBaseCredentials() {
         return baseCredentials;
     }
 
+    /**
+     * Returns the {@code AuthInfo} present with the editing session that want
+     * to impersonate.
+     *
+     * @return {@code AuthInfo} present with the editing session that want
+     * to impersonate.
+     * @see org.apache.jackrabbit.oak.api.ContentSession#getAuthInfo()
+     */
     public AuthInfo getImpersonatorInfo() {
         return authInfo;
     }