Package org.wso2.carbon.ui
Class AbstractCarbonUIAuthenticator
- java.lang.Object
-
- org.wso2.carbon.ui.AbstractCarbonUIAuthenticator
-
- All Implemented Interfaces:
CarbonUIAuthenticator
- Direct Known Subclasses:
BasicAuthUIAuthenticator
public abstract class AbstractCarbonUIAuthenticator extends Object implements CarbonUIAuthenticator
An abstract implementation if CarbonUIAuthenticator.
-
-
Constructor Summary
Constructors Constructor Description AbstractCarbonUIAuthenticator()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract StringdoAuthentication(Object credentials, boolean isRememberMe, org.apache.axis2.client.ServiceClient client, javax.servlet.http.HttpServletRequest request)List<String>getAuthenticationSkippingUrls()In default implementation this will return an empty list.intgetPriority()In default implementation this will read the priority from authenticator configuration.List<String>getSessionValidationSkippingUrls()In default implementation this will return some SSO links to be skipped.protected static StringgetUserNameFromCookie(String cookieValue)abstract voidhandleRememberMe(Map transportHeaders, javax.servlet.http.HttpServletRequest httpServletRequest)voidhandleSecurity(Object credentials, boolean rememberMe, javax.servlet.http.HttpServletRequest request)protected booleanisAdminCookieSet()booleanisDisabled()In default implementation this will read the authenticator configuration and will return true if authenticator is disabled in the configuration.voidonSuccessAdminLogin(javax.servlet.http.HttpServletRequest request, String userName)protected voidsetAdminCookie(javax.servlet.http.HttpSession session, org.apache.axis2.client.ServiceClient serviceClient, String rememberMeCookie)protected voidsetUserInformation(String cookie, String backendServerURL, javax.servlet.http.HttpSession session)booleanskipLoginPage()If Authenticator does not need to have login page - set this to true.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wso2.carbon.ui.CarbonUIAuthenticator
authenticate, authenticateWithCookie, canHandle, getAuthenticatorName, unauthenticate
-
-
-
-
Field Detail
-
USERNAME
public static final String USERNAME
- See Also:
- Constant Field Values
-
PASSWORD
public static final String PASSWORD
- See Also:
- Constant Field Values
-
REMEMBER_ME
public static final String REMEMBER_ME
- See Also:
- Constant Field Values
-
log
protected static final org.apache.commons.logging.Log log
-
-
Method Detail
-
isDisabled
public boolean isDisabled()
In default implementation this will read the authenticator configuration and will return true if authenticator is disabled in the configuration.- Specified by:
isDisabledin interfaceCarbonUIAuthenticator- Returns:
trueif authenticator is disabled, elsefalse.
-
getPriority
public int getPriority()
In default implementation this will read the priority from authenticator configuration.- Specified by:
getPriorityin interfaceCarbonUIAuthenticator- Returns:
- The priority value.
-
getSessionValidationSkippingUrls
public List<String> getSessionValidationSkippingUrls()
In default implementation this will return some SSO links to be skipped. TODO : check whether we can move this t SSO authenticators.- Specified by:
getSessionValidationSkippingUrlsin interfaceCarbonUIAuthenticator- Returns:
- A list with following urls.
-
getAuthenticationSkippingUrls
public List<String> getAuthenticationSkippingUrls()
In default implementation this will return an empty list.- Specified by:
getAuthenticationSkippingUrlsin interfaceCarbonUIAuthenticator- Returns:
- An empty list.
-
doAuthentication
public abstract String doAuthentication(Object credentials, boolean isRememberMe, org.apache.axis2.client.ServiceClient client, javax.servlet.http.HttpServletRequest request) throws org.wso2.carbon.core.common.AuthenticationException
- Parameters:
credentials-rememberMe-client-request-- Throws:
org.wso2.carbon.core.common.AuthenticationException
-
handleRememberMe
public abstract void handleRememberMe(Map transportHeaders, javax.servlet.http.HttpServletRequest httpServletRequest) throws org.wso2.carbon.core.common.AuthenticationException
- Parameters:
serviceClient-httpServletRequest-- Throws:
org.apache.axis2.AxisFaultorg.wso2.carbon.core.common.AuthenticationException
-
isAdminCookieSet
protected boolean isAdminCookieSet()
-
handleSecurity
public void handleSecurity(Object credentials, boolean rememberMe, javax.servlet.http.HttpServletRequest request) throws org.wso2.carbon.core.common.AuthenticationException
- Parameters:
credentials-rememberMe-request-- Throws:
org.apache.axis2.AxisFaultorg.wso2.carbon.core.common.AuthenticationException
-
skipLoginPage
public boolean skipLoginPage()
Description copied from interface:CarbonUIAuthenticatorIf Authenticator does not need to have login page - set this to true.- Specified by:
skipLoginPagein interfaceCarbonUIAuthenticator- Returns:
-
onSuccessAdminLogin
public void onSuccessAdminLogin(javax.servlet.http.HttpServletRequest request, String userName) throws Exception- Parameters:
request-userName-- Throws:
Exception
-
setUserInformation
protected void setUserInformation(String cookie, String backendServerURL, javax.servlet.http.HttpSession session) throws RemoteException
- Parameters:
cookie-backendServerURL-session-- Throws:
RemoteException
-
getUserNameFromCookie
protected static String getUserNameFromCookie(String cookieValue)
- Parameters:
cookieValue-- Returns:
-
setAdminCookie
protected void setAdminCookie(javax.servlet.http.HttpSession session, org.apache.axis2.client.ServiceClient serviceClient, String rememberMeCookie) throws org.apache.axis2.AxisFault- Parameters:
session-serviceClient-rememberMeCookie-- Throws:
org.apache.axis2.AxisFault
-
-