You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by an...@apache.org on 2009/03/10 11:48:59 UTC
svn commit: r752054 -
/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/
Author: angela
Date: Tue Mar 10 10:48:59 2009
New Revision: 752054
URL: http://svn.apache.org/viewvc?rev=752054&view=rev
Log:
javadoc
Modified:
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AuthContextProvider.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/Authentication.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/DefaultLoginModule.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/ImpersonationCallback.java
jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/SimpleCredentialsAuthentication.java
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java?rev=752054&r1=752053&r2=752054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AbstractLoginModule.java Tue Mar 10 10:48:59 2009
@@ -403,19 +403,20 @@
}
/**
- *
- * @param principal
- * @param credentials
+ * @param principal Principal used to retrieve the <code>Authentication</code>
+ * object.
+ * @param credentials Credentials used for the authentication.
* @return <code>true</code> if Credentails authenticate,
* <code>false</code> if no <code>Authentication</code> can handle
* the given <code>Credentials</code>
* @throws javax.security.auth.login.FailedLoginException
* if the authentication failed.
+ * @throws RepositoryException If another error occurs.
* @see AbstractLoginModule#getAuthentication(java.security.Principal, javax.jcr.Credentials)
* @see AbstractLoginModule#authenticate(java.security.Principal, javax.jcr.Credentials)
*/
protected boolean authenticate(Principal principal, Credentials credentials)
- throws RepositoryException, FailedLoginException {
+ throws FailedLoginException, RepositoryException {
Authentication auth = getAuthentication(principal, credentials);
if(auth == null) {
@@ -445,22 +446,23 @@
* Current implementation takes {@link User} for the given Principal and
* delegates the check to {@link Impersonation#allows(javax.security.auth.Subject)} }
*
- * @param principal
- * @param credentials
+ * @param principal Principal to impersonate.
+ * @param credentials Credentials used to create the impersonation subject.
* @return false, if there is no User to impersonate,
* true if impersonation is allowed
- * @throws RepositoryException
- * @throws FailedLoginException if credentials don't allow to impersonate to principal
+ * @throws LoginException If credentials don't allow to impersonate to principal.
+ * @throws RepositoryException If another error occurs.
*/
abstract protected boolean impersonate(Principal principal, Credentials credentials)
throws RepositoryException, LoginException;
/**
+ * Retrieve the <code>Authentication</code>.
*
- * @param principal
- * @param creds
- * @return
- * @throws RepositoryException
+ * @param principal A principal.
+ * @param creds The Credentials used for the login.
+ * @return Authentication object for the given principal / credentials.
+ * @throws RepositoryException If an error occurs.
*/
abstract protected Authentication getAuthentication(Principal principal, Credentials creds)
throws RepositoryException;
@@ -600,8 +602,8 @@
/**
* Indicate if the given Credentials are considered to be anonymous.
*
- * @param credentials
- * @return true if is anonymous
+ * @param credentials The Credentials to be tested.
+ * @return <code>true</code> if is anonymous; <code>false</code> otherwise.
*/
protected boolean isAnonymous(Credentials credentials) {
if (credentials instanceof GuestCredentials) {
@@ -619,7 +621,7 @@
* This method resolves the Principal for the given Credentials. If no valid
* Principal can be determined, the LoginModule should be ignored.
*
- * @param credentials
+ * @param credentials Credentials used for to login.
* @return the principal associated with the given credentials or <code>null</code>.
*/
protected abstract Principal getPrincipal(Credentials credentials);
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AuthContextProvider.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AuthContextProvider.java?rev=752054&r1=752053&r2=752054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AuthContextProvider.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/AuthContextProvider.java Tue Mar 10 10:48:59 2009
@@ -79,6 +79,8 @@
* @param subject
* @param session
* @param principalProviderRegistry
+ * @param adminId
+ * @param anonymousId
* @return context of for authentication and log-out
* @throws RepositoryException in case neither an <code>JAASContext</code>
* nor a <code>LocalContext</code> can be successfully created.
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/Authentication.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/Authentication.java?rev=752054&r1=752053&r2=752054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/Authentication.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/Authentication.java Tue Mar 10 10:48:59 2009
@@ -52,7 +52,7 @@
* @param credentials to verify
* @return <code>true</code> if <code>Credentials</code> identify the
* <code>User</code>.
- * @throws RepositoryException
+ * @throws RepositoryException If an error occurs.
*/
boolean authenticate(Credentials credentials) throws RepositoryException;
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/DefaultLoginModule.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/DefaultLoginModule.java?rev=752054&r1=752053&r2=752054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/DefaultLoginModule.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/DefaultLoginModule.java Tue Mar 10 10:48:59 2009
@@ -76,7 +76,7 @@
* If the the userID cannot be resolved to a User or if obtaining the
* principal fail, <code>null</code> is returned.
*
- * @param credentials
+ * @param credentials Credentions to retrieve the principal for.
* @return a user principal or <code>null</code>.
* @see AbstractLoginModule#getPrincipal(Credentials)
*/
@@ -115,8 +115,8 @@
* Current implementation takes {@link User} for the given Principal and
* delegates the check to {@link Impersonation#allows(javax.security.auth.Subject)}
*
- * @param principal
- * @param credentials
+ * @param principal Principal to impersonate.
+ * @param credentials Credentials used to create the impersonation subject.
* @return false, if there is no User to impersonate,
* true if impersonation is allowed
* @throws javax.jcr.RepositoryException
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/ImpersonationCallback.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/ImpersonationCallback.java?rev=752054&r1=752053&r2=752054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/ImpersonationCallback.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/ImpersonationCallback.java Tue Mar 10 10:48:59 2009
@@ -48,6 +48,9 @@
/**
* Returns the impersonator {@link Subject} set on this callback or
* <code>null</code> if not set.
+ *
+ * @return the impersonator {@link Subject} set on this callback or
+ * <code>null</code> if not set.
*/
public Subject getImpersonator() {
return impersonator;
Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/SimpleCredentialsAuthentication.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/SimpleCredentialsAuthentication.java?rev=752054&r1=752053&r2=752054&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/SimpleCredentialsAuthentication.java (original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authentication/SimpleCredentialsAuthentication.java Tue Mar 10 10:48:59 2009
@@ -48,7 +48,7 @@
* Create an Authentication for this User
*
* @param user to create the Authentication for
- * @throws javax.jcr.RepositoryException
+ * @throws javax.jcr.RepositoryException If an error occurs.
*/
SimpleCredentialsAuthentication(User user) throws RepositoryException {
Credentials creds = user.getCredentials();
@@ -89,7 +89,7 @@
* If both, UserID and Password of the credentials are equal, the authentication
* succeded and <code>true</code> is returned;
*
- * @param credentials
+ * @param credentials Credentials to be used for the authentication.
* @return true if the given Credentials' UserID/Password pair match any
* of the credentials attached to the user this SimpleCredentialsAuthentication has
* been built for.