Class Oauth2Service


  • public final class Oauth2Service
    extends java.lang.Object
    France Connect Service.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Oauth2Service getInstance()
      Gets the instance.
      java.util.List<fr.paris.lutece.plugins.mylutece.business.LuteceUserAttributeDescription> getLuteceUserAttributesProvided​(java.util.Locale locale)  
      void init()
      Inits the service
      Oauth2User processAuthentication​(javax.servlet.http.HttpServletRequest request, java.util.Map<java.lang.String,​java.lang.Object> mapUserInfo, fr.paris.lutece.plugins.oauth2.business.Token token)
      Process the authentication.
      static void processLogout​(javax.servlet.http.HttpServletRequest request)
      Process the logout.
      static void redirect​(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
      redirect after login or logout.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getInstance

        public static Oauth2Service getInstance()
        Gets the instance.
        Returns:
        the instance
      • processAuthentication

        public Oauth2User processAuthentication​(javax.servlet.http.HttpServletRequest request,
                                                java.util.Map<java.lang.String,​java.lang.Object> mapUserInfo,
                                                fr.paris.lutece.plugins.oauth2.business.Token token)
        Process the authentication.
        Parameters:
        request - The HTTP request
        mapUserInfo - the map user info
        token - the token
        Returns:
        the oauth 2 user
      • init

        public void init()
        Inits the service
      • getLuteceUserAttributesProvided

        public java.util.List<fr.paris.lutece.plugins.mylutece.business.LuteceUserAttributeDescription> getLuteceUserAttributesProvided​(java.util.Locale locale)
        Returns:
        the Lutece user Attribute provided by the authentication module
      • processLogout

        public static void processLogout​(javax.servlet.http.HttpServletRequest request)
        Process the logout.
        Parameters:
        request - The HTTP request
      • redirect

        public static void redirect​(javax.servlet.http.HttpServletRequest request,
                                    javax.servlet.http.HttpServletResponse response)
                             throws java.io.IOException
        redirect after login or logout.
        Parameters:
        request - The HTTP request
        response - The HTTP response
        Throws:
        java.io.IOException - if an error occurs