Package org.wso2.carbon.ui
Class BasicAuthUIAuthenticator
- java.lang.Object
-
- org.wso2.carbon.ui.AbstractCarbonUIAuthenticator
-
- org.wso2.carbon.ui.BasicAuthUIAuthenticator
-
- All Implemented Interfaces:
CarbonUIAuthenticator
- Direct Known Subclasses:
DefaultCarbonAuthenticator
public class BasicAuthUIAuthenticator extends AbstractCarbonUIAuthenticator
-
-
Field Summary
-
Fields inherited from class org.wso2.carbon.ui.AbstractCarbonUIAuthenticator
log, PASSWORD, REMEMBER_ME, USERNAME
-
-
Constructor Summary
Constructors Constructor Description BasicAuthUIAuthenticator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidauthenticate(javax.servlet.http.HttpServletRequest request)Authenticates the given request.voidauthenticateWithCookie(javax.servlet.http.HttpServletRequest request)Handles authentication during a session expiration.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)protected org.wso2.carbon.authenticator.proxy.AuthenticationAdminClientgetAuthenticationAdminCient(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.AbstractCarbonUIAuthenticator
getAuthenticationSkippingUrls, getPriority, getSessionValidationSkippingUrls, getUserNameFromCookie, handleSecurity, isAdminCookieSet, isDisabled, onSuccessAdminLogin, setAdminCookie, setUserInformation, skipLoginPage
-
-
-
-
Method Detail
-
canHandle
public boolean canHandle(javax.servlet.http.HttpServletRequest request)
Description copied from interface:CarbonUIAuthenticatorThis 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.- Returns:
trueif this authenticator can handle the request, elsefalse.
-
authenticate
public void authenticate(javax.servlet.http.HttpServletRequest request) throws org.wso2.carbon.core.common.AuthenticationExceptionDescription copied from interface:CarbonUIAuthenticatorAuthenticates the given request.- Throws:
org.wso2.carbon.core.common.AuthenticationException- If an error occurred during authentication process.
-
authenticateWithCookie
public void authenticateWithCookie(javax.servlet.http.HttpServletRequest request) throws org.wso2.carbon.core.common.AuthenticationExceptionDescription copied from interface:CarbonUIAuthenticatorHandles authentication during a session expiration. Usually the request is a cookie.- Throws:
org.wso2.carbon.core.common.AuthenticationException- If an error occurred during authentication process.
-
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
- Specified by:
doAuthenticationin classAbstractCarbonUIAuthenticator- Throws:
org.wso2.carbon.core.common.AuthenticationException
-
handleRememberMe
public void handleRememberMe(Map transportHeaders, javax.servlet.http.HttpServletRequest httpServletRequest) throws org.wso2.carbon.core.common.AuthenticationException
- Specified by:
handleRememberMein classAbstractCarbonUIAuthenticator- Parameters:
serviceClient-httpServletRequest-- Throws:
org.apache.axis2.AxisFaultorg.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- Parameters:
object- The request to invalidate TODO (?)- Throws:
Exception- If an error occurred during authentication process.
-
getAuthenticationAdminCient
protected org.wso2.carbon.authenticator.proxy.AuthenticationAdminClient getAuthenticationAdminCient(javax.servlet.http.HttpServletRequest request) throws org.apache.axis2.AxisFault- Throws:
org.apache.axis2.AxisFault
-
getAuthenticatorName
public String getAuthenticatorName()
Description copied from interface:CarbonUIAuthenticatorReturns the name of the authenticator.- Returns:
- The name of the authenticator.
-
-