Package org.wso2.carbon.ui
Class AbstractCarbonUIAuthenticator
java.lang.Object
org.wso2.carbon.ui.AbstractCarbonUIAuthenticator
- All Implemented Interfaces:
CarbonUIAuthenticator
- Direct Known Subclasses:
BasicAuthUIAuthenticator
An abstract implementation if CarbonUIAuthenticator.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract StringdoAuthentication(Object credentials, boolean isRememberMe, org.apache.axis2.client.ServiceClient client, javax.servlet.http.HttpServletRequest request) In default implementation this will return an empty list.intIn default implementation this will read the priority from authenticator configuration.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 booleanbooleanIn 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) booleanIf 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, waitMethods inherited from interface org.wso2.carbon.ui.CarbonUIAuthenticator
authenticate, authenticateWithCookie, canHandle, getAuthenticatorName, unauthenticate
-
Field Details
-
USERNAME
- See Also:
-
PASSWORD
- See Also:
-
REMEMBER_ME
- See Also:
-
log
protected static final org.apache.commons.logging.Log log
-
-
Constructor Details
-
AbstractCarbonUIAuthenticator
public AbstractCarbonUIAuthenticator()
-
-
Method Details
-
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
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
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-client-request-rememberMe-- 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:
httpServletRequest-serviceClient-- 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
- 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
-