Class AbstractCarbonUIAuthenticator

    • Constructor Detail

      • AbstractCarbonUIAuthenticator

        public AbstractCarbonUIAuthenticator()
    • 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:
        isDisabled in interface CarbonUIAuthenticator
        Returns:
        true if authenticator is disabled, else false.
      • getPriority

        public int getPriority()
        In default implementation this will read the priority from authenticator configuration.
        Specified by:
        getPriority in interface CarbonUIAuthenticator
        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:
        getSessionValidationSkippingUrls in interface CarbonUIAuthenticator
        Returns:
        A list with following urls.
      • 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.AxisFault
        org.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.AxisFault
        org.wso2.carbon.core.common.AuthenticationException
      • 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