Fixed comments.

This commit is contained in:
Michael Jumper
2012-03-22 23:40:45 -07:00
parent 697c4601da
commit 7f027a71f2
2 changed files with 32 additions and 9 deletions

View File

@@ -14,7 +14,7 @@ package net.sourceforge.guacamole.net.auth;
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is guacamole-common-auth. * The Original Code is guacamole-auth.
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* Michael Jumper. * Michael Jumper.

View File

@@ -16,7 +16,7 @@ import javax.servlet.http.HttpSession;
* for the specific language governing rights and limitations under the * for the specific language governing rights and limitations under the
* License. * License.
* *
* The Original Code is guacamole-common-auth. * The Original Code is guacamole-auth.
* *
* The Initial Developer of the Original Code is * The Initial Developer of the Original Code is
* Michael Jumper. * Michael Jumper.
@@ -40,9 +40,12 @@ import javax.servlet.http.HttpSession;
* ***** END LICENSE BLOCK ***** */ * ***** END LICENSE BLOCK ***** */
/** /**
* Simple class containing username and password Strings. This class can be * Simple arbitrary set of credentials, including a username/password pair,
* used along with AuthenticationProvider to provide username/password * the HttpServletRequest associated with the request for authorization
* authentication. * (if any) and the HttpSession associated with that request.
*
* This class is used along with AuthenticationProvider to provide arbitrary
* HTTP-based authentication for Guacamole.
* *
* @author Michael Jumper * @author Michael Jumper
*/ */
@@ -69,7 +72,7 @@ public class Credentials {
private HttpSession session; private HttpSession session;
/** /**
* Returns the password associated with this username/password pair. * Returns the password associated with this set of credentials.
* @return The password associated with this username/password pair, or * @return The password associated with this username/password pair, or
* null if no password has been set. * null if no password has been set.
*/ */
@@ -78,7 +81,7 @@ public class Credentials {
} }
/** /**
* Sets the password associated with this username/password pair. * Sets the password associated with this set of credentials.
* @param password The password to associate with this username/password * @param password The password to associate with this username/password
* pair. * pair.
*/ */
@@ -87,7 +90,7 @@ public class Credentials {
} }
/** /**
* Returns the username associated with this username/password pair. * Returns the username associated with this set of credentials.
* @return The username associated with this username/password pair, or * @return The username associated with this username/password pair, or
* null if no username has been set. * null if no username has been set.
*/ */
@@ -96,7 +99,7 @@ public class Credentials {
} }
/** /**
* Sets the username associated with this username/password pair. * Sets the username associated with this set of credentials.
* @param username The username to associate with this username/password * @param username The username to associate with this username/password
* pair. * pair.
*/ */
@@ -104,18 +107,38 @@ public class Credentials {
this.username = username; this.username = username;
} }
/**
* Returns the HttpServletRequest associated with this set of credentials.
* @return The HttpServletRequest associated with this set of credentials,
* or null if no such request exists.
*/
public HttpServletRequest getRequest() { public HttpServletRequest getRequest() {
return request; return request;
} }
/**
* Sets the HttpServletRequest associated with this set of credentials.
* @param request The HttpServletRequest to associated with this set of
* credentials.
*/
public void setRequest(HttpServletRequest request) { public void setRequest(HttpServletRequest request) {
this.request = request; this.request = request;
} }
/**
* Returns the HttpSession associated with this set of credentials.
* @return The HttpSession associated with this set of credentials, or null
* if no such request exists.
*/
public HttpSession getSession() { public HttpSession getSession() {
return session; return session;
} }
/**
* Sets the HttpSession associated with this set of credentials.
* @param session The HttpSession to associated with this set of
* credentials.
*/
public void setSession(HttpSession session) { public void setSession(HttpSession session) {
this.session = session; this.session = session;
} }