Interface WebAuthenticationPlugin<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods Default Methods 
      Modifier and Type Method Description
      AuthenticationResult<T> doHandleCallback​(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)
      Handle the callback request after login on the sso
      default io.vertigo.core.lang.Tuple<AuthenticationResult<T>,​javax.servlet.http.HttpServletRequest> doInterceptRequest​(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)  
      boolean doLogout​(javax.servlet.http.HttpServletRequest httpRequest, javax.servlet.http.HttpServletResponse httpResponse)  
      void doRedirectToSso​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      Handle the redirect to the sso login page
      String getCallbackUrl()
      Returns the url for callback
      Optional<String> getExternalUrlOptional()
      Return an optional external url of the application (if it is behind a firewall or a proxy)
      String getLogoutUrl()
      Returns the url for logout
      Optional<String> getRequestedUri​(javax.servlet.http.HttpServletRequest httpRequest)
      Return the original request a user wanted before beeing redirected to the sso
      String getUrlHandlerPrefix()
      Url prefix of request directly handled by the plugin
      Map<String,​BiFunction<javax.servlet.http.HttpServletRequest,​javax.servlet.http.HttpServletResponse,​io.vertigo.core.lang.Tuple<Boolean,​javax.servlet.http.HttpServletRequest>>> getUrlHandlers()
      Register additionnal handler for specific request necessary for the plugin
      String getUrlPrefix()
      Url prefix of urls that are protected with this authentication plugin
    • Method Detail

      • getCallbackUrl

        String getCallbackUrl()
        Returns the url for callback
        Returns:
        url for callback
      • getLogoutUrl

        String getLogoutUrl()
        Returns the url for logout
        Returns:
        url for logout
      • doRedirectToSso

        void doRedirectToSso​(javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response)
        Handle the redirect to the sso login page
        Parameters:
        request - the request
        response - the response to consume
      • doHandleCallback

        AuthenticationResult<T> doHandleCallback​(javax.servlet.http.HttpServletRequest httpRequest,
                                                 javax.servlet.http.HttpServletResponse httpResponse)
        Handle the callback request after login on the sso
        Parameters:
        httpRequest - the request
        httpResponse - the response to consume
        Returns:
        result of login challenge, providing info of the logged in user
      • getUrlHandlers

        Map<String,​BiFunction<javax.servlet.http.HttpServletRequest,​javax.servlet.http.HttpServletResponse,​io.vertigo.core.lang.Tuple<Boolean,​javax.servlet.http.HttpServletRequest>>> getUrlHandlers()
        Register additionnal handler for specific request necessary for the plugin
        Returns:
        le map of specific handlers
      • getUrlPrefix

        String getUrlPrefix()
        Url prefix of urls that are protected with this authentication plugin
        Returns:
        the prefix
      • getUrlHandlerPrefix

        String getUrlHandlerPrefix()
        Url prefix of request directly handled by the plugin
        Returns:
        the prefix
      • getRequestedUri

        Optional<String> getRequestedUri​(javax.servlet.http.HttpServletRequest httpRequest)
        Return the original request a user wanted before beeing redirected to the sso
        Parameters:
        httpRequest - the request
        Returns:
        the uri
      • getExternalUrlOptional

        Optional<String> getExternalUrlOptional()
        Return an optional external url of the application (if it is behind a firewall or a proxy)
        Returns:
        the external url of the app : as seen by the end user
      • doInterceptRequest

        default io.vertigo.core.lang.Tuple<AuthenticationResult<T>,​javax.servlet.http.HttpServletRequest> doInterceptRequest​(javax.servlet.http.HttpServletRequest httpRequest,
                                                                                                                                   javax.servlet.http.HttpServletResponse httpResponse)
      • doLogout

        boolean doLogout​(javax.servlet.http.HttpServletRequest httpRequest,
                         javax.servlet.http.HttpServletResponse httpResponse)