This project has retired. For details please refer to its
Attic page .
AbstractShiroLogin (Apache Cocoon 3: Parent 3.0.0-beta-1-SNAPSHOT API)
org.apache.cocoon.shiro.rest
Class AbstractShiroLogin
java.lang.Object
org.apache.cocoon.shiro.rest.AbstractShiroLogin
All Implemented Interfaces: Get , Post
Direct Known Subclasses: LoginUser
public abstract class AbstractShiroLogin extends Object implements Post , Get
Methods inherited from class java.lang.Object
clone , equals , finalize , getClass , hashCode , notify , notifyAll , toString , wait , wait , wait
LOGIN_ATTEMPTS_EXCEEDED
protected final String LOGIN_ATTEMPTS_EXCEEDED
See Also: Constant Field Values
LOGIN_ATTEMPTS_COUNTER
protected final String LOGIN_ATTEMPTS_COUNTER
See Also: Constant Field Values
to
protected String to
LOG
protected static final org.slf4j.Logger LOG
AbstractShiroLogin
public AbstractShiroLogin ()
getErrorLogin
protected abstract String getErrorLogin ()
getDefaultTo
protected abstract String getDefaultTo ()
getLoginPage
protected abstract RestResponse getLoginPage (Map <String ,Object > data)
throws Exception
Throws:
Exception
doPost
public RestResponse doPost ()
throws Exception
Specified by: doPost
in interface Post
Throws:
Exception
isAttemptsExceeded
protected boolean isAttemptsExceeded (org.apache.shiro.subject.Subject subject)
Checks if login attempts exceeded allowed wrong attempts.
Parameters: subject
- the shiro subject
Returns: true, if login attempts exceeded
getAllowedWrongAttempts
protected Integer getAllowedWrongAttempts ()
Gets the number of maximum allowed wrong login attempts.
Returns: the allowed wrong attempts count
validatePreLogin
protected Map <String ,Object > validatePreLogin ()
A validation method that is invoked before initiating login. If this
method returns a non-empty map, then login is skipped and map data is
added to UrlResponse. It can be overridden in extending classes to
perform validations before login like captcha.
Returns: the data map that will be passed to error URL Rest response
getSuccessResponse
protected RestResponse getSuccessResponse ()
getErrorResponse
protected RestResponse getErrorResponse (Map <String ,Object > data)
throws MalformedURLException
Throws:
MalformedURLException
doGet
public RestResponse doGet ()
throws Exception
Specified by: doGet
in interface Get
Throws:
Exception
getTo
protected String getTo ()
Copyright © 2008-2012 The Apache Software Foundation . All Rights Reserved.