Package org.wso2.carbon.ui
Class DefaultCarbonAuthenticator
- java.lang.Object
-
- org.wso2.carbon.ui.AbstractCarbonUIAuthenticator
-
- org.wso2.carbon.ui.BasicAuthUIAuthenticator
-
- org.wso2.carbon.ui.DefaultCarbonAuthenticator
-
- All Implemented Interfaces:
CarbonUIAuthenticator
public class DefaultCarbonAuthenticator extends BasicAuthUIAuthenticator
Default implementation of CarbonUIAuthenticator.
-
-
Field Summary
Fields Modifier and Type Field Description protected static org.apache.commons.logging.Loglog-
Fields inherited from class org.wso2.carbon.ui.AbstractCarbonUIAuthenticator
PASSWORD, REMEMBER_ME, USERNAME
-
-
Constructor Summary
Constructors Constructor Description DefaultCarbonAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanHandle(javax.servlet.http.HttpServletRequest request)This method will check whether given request can be handled by the authenticator.StringdoAuthentication(Object credentials, boolean isRememberMe, org.apache.axis2.client.ServiceClient client, javax.servlet.http.HttpServletRequest request)StringgetAuthenticatorName()Returns the name of the authenticator.voidhandleRememberMe(Map transportHeaders, javax.servlet.http.HttpServletRequest httpServletRequest)voidunauthenticate(Object object)Invalidates the authentication session.-
Methods inherited from class org.wso2.carbon.ui.BasicAuthUIAuthenticator
authenticate, authenticateWithCookie, getAuthenticationAdminCient
-
Methods inherited from class org.wso2.carbon.ui.AbstractCarbonUIAuthenticator
getAuthenticationSkippingUrls, getPriority, getSessionValidationSkippingUrls, getUserNameFromCookie, handleSecurity, isAdminCookieSet, isDisabled, onSuccessAdminLogin, setAdminCookie, setUserInformation, skipLoginPage
-
-
-
-
Method Detail
-
canHandle
public boolean canHandle(javax.servlet.http.HttpServletRequest request)
This method will check whether given request can be handled by the authenticator. If authenticator is capable of handling given request this method will returntrue. Else this will returnfalse.- Specified by:
canHandlein interfaceCarbonUIAuthenticator- Overrides:
canHandlein classBasicAuthUIAuthenticator- Returns:
trueif this authenticator can handle the request, elsefalse.
-
doAuthentication
public String doAuthentication(Object credentials, boolean isRememberMe, org.apache.axis2.client.ServiceClient client, javax.servlet.http.HttpServletRequest request) throws org.wso2.carbon.core.common.AuthenticationException
- Overrides:
doAuthenticationin classBasicAuthUIAuthenticator- Throws:
org.wso2.carbon.core.common.AuthenticationException
-
unauthenticate
public void unauthenticate(Object object) throws Exception
Description copied from interface:CarbonUIAuthenticatorInvalidates the authentication session. TODO why we need this ? An authenticator should not maintain a session- Specified by:
unauthenticatein interfaceCarbonUIAuthenticator- Overrides:
unauthenticatein classBasicAuthUIAuthenticator- Parameters:
object- The request to invalidate TODO (?)- Throws:
Exception- If an error occurred during authentication process.
-
getAuthenticatorName
public String getAuthenticatorName()
Returns the name of the authenticator.- Specified by:
getAuthenticatorNamein interfaceCarbonUIAuthenticator- Overrides:
getAuthenticatorNamein classBasicAuthUIAuthenticator- Returns:
- The name of the authenticator.
-
handleRememberMe
public void handleRememberMe(Map transportHeaders, javax.servlet.http.HttpServletRequest httpServletRequest) throws org.wso2.carbon.core.common.AuthenticationException
- Overrides:
handleRememberMein classBasicAuthUIAuthenticator- Throws:
org.wso2.carbon.core.common.AuthenticationException
-
-