Commit bf43e52d authored by Gabriel Guardincerri's avatar Gabriel Guardincerri Committed by gguardin

Added comments

git-svn-id: http://svn.igniterealtime.org/svn/repos/openfire/branches@10012 b35dd754-fafc-0310-a699-88a17e54d16e
parent 60ae2d50
......@@ -15,9 +15,14 @@ import static org.jivesoftware.openfire.clearspace.ClearspaceManager.HttpType.GE
import org.jivesoftware.openfire.user.UserNotFoundException;
/**
* @author Daniel Henninger
* The ClearspaceAuthProvider uses the PermissionService web service inside of Clearspace
* to retrieve authenticate users. It current version of Clearspace only supports plain authentication.
*
* @author Gabriel Guardincerri
*/
public class ClearspaceAuthProvider implements AuthProvider {
// Service url prefix
protected static final String URL_PREFIX = "permissionService/";
private ClearspaceManager manager;
......@@ -27,14 +32,32 @@ public class ClearspaceAuthProvider implements AuthProvider {
manager = ClearspaceManager.getInstance();
}
/**
* Clearspace currently supports only plain authentication.
*
* @return true
*/
public boolean isPlainSupported() {
return true;
}
/**
* Clearspace currently doesn't support digest authentication.
*
* @return false
*/
public boolean isDigestSupported() {
return false;
}
/**
* Authenticates the user using the webservicies of Clearspace.
* Throws an UnauthorizedException if the user or password are incorrect.
*
* @param username the username.
* @param password the password.
* @throws UnauthorizedException if the username of password are incorrect.
*/
public void authenticate(String username, String password) throws UnauthorizedException {
try {
String path = URL_PREFIX + "authenticate/" + username + "/" + password;
......@@ -47,18 +70,42 @@ public class ClearspaceAuthProvider implements AuthProvider {
}
}
/**
* This method is not supported.
*
* @param username the username
* @param token the token
* @param digest the digest
* @throws UnauthorizedException never throws it
* @throws UnsupportedOperationException always throws it
*/
public void authenticate(String username, String token, String digest) throws UnauthorizedException {
throw new UnsupportedOperationException("Digest not supported");
}
/**
* This method is not supported.
*
* @throws UnsupportedOperationException always throws it
*/
public String getPassword(String username) throws UserNotFoundException, UnsupportedOperationException {
throw new UnsupportedOperationException("Password retrieval not supported");
}
/**
* This method is not supported.
*
* @throws UnsupportedOperationException always throws it
*/
public void setPassword(String username, String password) throws UserNotFoundException, UnsupportedOperationException {
throw new UnsupportedOperationException("Change Password not supported");
}
/**
* This method is not supported.
*
* @throws UnsupportedOperationException always throws it
*/
public boolean supportsPasswordRetrieval() {
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment