diff --git a/scm-webapp/src/main/java/sonia/scm/api/rest/resources/AuthenticationResource.java b/scm-webapp/src/main/java/sonia/scm/api/rest/resources/AuthenticationResource.java
index 05e22a52aa..c170bd1f59 100644
--- a/scm-webapp/src/main/java/sonia/scm/api/rest/resources/AuthenticationResource.java
+++ b/scm-webapp/src/main/java/sonia/scm/api/rest/resources/AuthenticationResource.java
@@ -39,6 +39,7 @@ import com.google.inject.Inject;
import com.google.inject.Provider;
import com.google.inject.Singleton;
+import org.codehaus.enunciate.jaxrs.TypeHint;
import org.codehaus.enunciate.modules.jersey.SpringManagedLifecycle;
import org.slf4j.Logger;
@@ -109,18 +110,24 @@ public class AuthenticationResource
//~--- methods --------------------------------------------------------------
/**
- * Method description
+ * Authenticate a user and return the state of the application.
+ *
+ *
+ * - 200 success
+ * - 401 unauthorized, the specified username or password is wrong
+ * - 500 internal server error
+ *
*
- *
- * @param request
- * @param response
- * @param username
- * @param password
+ * @param request the current http request
+ * @param response the current http response
+ * @param username the username for the authentication
+ * @param password the password for the authentication
*
* @return
*/
@POST
@Path("login")
+ @TypeHint(ScmState.class)
public ScmState authenticate(@Context HttpServletRequest request,
@Context HttpServletResponse response,
@FormParam("username") String username,
@@ -144,16 +151,22 @@ public class AuthenticationResource
}
/**
- * Method description
+ * Logout the current user. Returns the current state of the application,
+ * if public access is enabled.
+ *
+ *
+ * - 200 success
+ * - 500 internal server error
+ *
*
- *
- * @param request
- * @param response
+ * @param request the current http request
+ * @param response the current http response
*
* @return
*/
@GET
@Path("logout")
+ @TypeHint(ScmState.class)
public Response logout(@Context HttpServletRequest request,
@Context HttpServletResponse response)
{
@@ -181,14 +194,20 @@ public class AuthenticationResource
//~--- get methods ----------------------------------------------------------
/**
- * Method description
+ * Returns the current state of the application.
+ *
+ *
+ * - 200 success
+ * - 401 unauthorized, user is not authenticated and public access is disabled.
+ * - 500 internal server error
+ *
*
- *
- * @param request
+ * @param request the current http request
*
* @return
*/
@GET
+ @TypeHint(ScmState.class)
public Response getState(@Context HttpServletRequest request)
{
Response response = null;