public abstract class AuthAction<T>
extends java.lang.Object
Usually LoginAction extends this class.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ALIAS_INDEX |
static java.lang.String |
ALIAS_LOGIN |
static java.lang.String |
J_LOGIN_PATH |
static java.lang.String |
J_LOGOUT_PATH |
static java.lang.String |
PARAM_PASSWORD |
static java.lang.String |
PARAM_USERNAME |
protected javax.servlet.http.HttpServletRequest |
servletRequest |
protected javax.servlet.http.HttpServletResponse |
servletResponse |
protected UserAuth<T> |
userAuth |
| Constructor and Description |
|---|
AuthAction() |
| Modifier and Type | Method and Description |
|---|---|
protected jodd.madvoc.result.JsonResult |
login()
Authenticate user and start user session.
|
protected T |
loginViaBasicAuth(javax.servlet.http.HttpServletRequest servletRequest)
Tries to login user with basic authentication.
|
protected T |
loginViaRequestParams(javax.servlet.http.HttpServletRequest servletRequest)
Tries to login user with form data.
|
protected jodd.madvoc.result.JsonResult |
logout()
Logout hook.
|
protected jodd.madvoc.result.JsonResult |
tokenAsJson(T authToken)
Prepares the JSON payload that carries on the token value.
|
public static final java.lang.String J_LOGIN_PATH
public static final java.lang.String J_LOGOUT_PATH
public static final java.lang.String PARAM_USERNAME
public static final java.lang.String PARAM_PASSWORD
public static final java.lang.String ALIAS_INDEX
public static final java.lang.String ALIAS_LOGIN
@In @Request protected javax.servlet.http.HttpServletRequest servletRequest
@In @Request protected javax.servlet.http.HttpServletResponse servletResponse
protected jodd.madvoc.result.JsonResult login()
protected jodd.madvoc.result.JsonResult tokenAsJson(T authToken)
protected T loginViaRequestParams(javax.servlet.http.HttpServletRequest servletRequest)
null.protected T loginViaBasicAuth(javax.servlet.http.HttpServletRequest servletRequest)
protected jodd.madvoc.result.JsonResult logout()
Copyright © 2003-present Jodd Team