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/10/31 16:15:29 UTC
svn commit: r1404193 -
/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModule.java
Author: angela
Date: Wed Oct 31 15:15:28 2012
New Revision: 1404193
URL: http://svn.apache.org/viewvc?rev=1404193&view=rev
Log:
OAK-91 - Implement Authentication Support (WIP)
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModule.java
Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModule.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModule.java?rev=1404193&r1=1404192&r2=1404193&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModule.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/security/authentication/AbstractLoginModule.java Wed Oct 31 15:15:28 2012
@@ -284,6 +284,15 @@ public abstract class AbstractLoginModul
}
}
+ /**
+ * Tries to obtain the {@code SecurityProvider} object from the callback
+ * handler using a new SecurityProviderCallback and keeps the value as
+ * private field. If the callback handler isn't able to handle the
+ * SecurityProviderCallback this method returns {@code null}.
+ *
+ * @return The {@code SecurityProvider} associated with this
+ * {@code LoginModule} or {@code null}.
+ */
@CheckForNull
protected SecurityProvider getSecurityProvider() {
if (securityProvider == null && callbackHandler != null) {
@@ -300,6 +309,15 @@ public abstract class AbstractLoginModul
return securityProvider;
}
+ /**
+ * Tries to obtain a {@code Root} object from the callback handler using
+ * a new RepositoryCallback and keeps the value as private field.
+ * If the callback handler isn't able to handle the RepositoryCallback
+ * this method returns {@code null}.
+ *
+ * @return The {@code Root} associated with this {@code LoginModule} or
+ * {@code null}.
+ */
@CheckForNull
protected Root getRoot() {
if (root == null && callbackHandler != null) {
@@ -316,6 +334,13 @@ public abstract class AbstractLoginModul
return root;
}
+ /**
+ * Retrieves the {@link UserManager} that should be used to handle
+ * this authentication. If no user manager has been configure this
+ * method returns {@code null}.
+ *
+ * @return A instance of {@code UserManager} or {@code null}.
+ */
@CheckForNull
protected UserManager getUserManager() {
UserManager userManager = null;
@@ -340,6 +365,13 @@ public abstract class AbstractLoginModul
return userManager;
}
+ /**
+ * Retrieves the {@link PrincipalProvider} that should be used to handle
+ * this authentication. If no principal provider has been configure this
+ * method returns {@code null}.
+ *
+ * @return A instance of {@code PrincipalProvider} or {@code null}.
+ */
@CheckForNull
protected PrincipalProvider getPrincipalProvider() {
PrincipalProvider principalProvider = null;