public class PxtAuthenticationService extends BaseAuthenticationService
Modifier and Type | Field and Description |
---|---|
static long |
MAX_URL_LENGTH |
Modifier | Constructor and Description |
---|---|
protected |
PxtAuthenticationService() |
Modifier and Type | Method and Description |
---|---|
protected java.util.Set |
getLoginURIs() |
protected java.util.Set |
getPostUnprotectedURIs() |
protected java.util.Set |
getUnprotectedURIs() |
void |
invalidate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Invalidates login credentials associated with the given request.
|
void |
redirectTo(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
java.lang.String path)
Redirects the request to a different page
Used in restricted period after grace period has expired to prevent basic satellite
functionality
|
void |
redirectToLogin(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Redirects the request to whatever resource handles logins.
|
void |
setPxtSessionDelegate(PxtSessionDelegate delegate)
"Wires up" the PxtSessionDelegate that this service object will use.
|
boolean |
skipCsfr(javax.servlet.http.HttpServletRequest request)
CSFR check might be skipped for particular POST requests f.e.
|
boolean |
validate(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Validate whatever credentials are associated with the request.
|
requestPostCsfrWhitelist, requestURIdoesLogin, requestURIRequiresAuthentication
public static final long MAX_URL_LENGTH
protected java.util.Set getLoginURIs()
getLoginURIs
in class BaseAuthenticationService
protected java.util.Set getUnprotectedURIs()
getUnprotectedURIs
in class BaseAuthenticationService
protected java.util.Set getPostUnprotectedURIs()
getPostUnprotectedURIs
in class BaseAuthenticationService
public void setPxtSessionDelegate(PxtSessionDelegate delegate)
delegate
- The PxtSessionDelegate to be used.public boolean skipCsfr(javax.servlet.http.HttpServletRequest request)
request
- The current requestpublic boolean validate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- The current requestresponse
- The current responsepublic void redirectToLogin(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws javax.servlet.ServletException
AuthenticationService.validate(HttpServletRequest, HttpServletResponse)
fails. Note that the redirect may be client-side or server-side, and it may be to an
external or an internal resource.request
- the requestresponse
- the responsejavax.servlet.ServletException
- If an unrecoverable error occurspublic void redirectTo(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String path) throws javax.servlet.ServletException
request
- the requestresponse
- the responsepath
- where to redirectjavax.servlet.ServletException
- If an unrecoverable error occurspublic void invalidate(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
request
- The current requestresponse
- The current response