java.lang.Object
fr.paris.lutece.plugins.mylutece.modules.oauth2.service.Oauth2Service

@ApplicationScoped public class Oauth2Service extends Object
France Connect Service.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor for CDI
  • Method Summary

    Modifier and Type
    Method
    Description
    List<fr.paris.lutece.plugins.mylutece.business.LuteceUserAttributeDescription>
     
    void
    Initialization method called after construction.
    processAuthentication(jakarta.servlet.http.HttpServletRequest request, Map<String,Object> mapUserInfo, fr.paris.lutece.plugins.oauth2.business.Token token)
    Process the authentication.
    static void
    processLogout(jakarta.servlet.http.HttpServletRequest request)
    Process the logout.
    void
    redirect(jakarta.servlet.http.HttpServletRequest request, jakarta.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
  • Constructor Details

    • Oauth2Service

      public Oauth2Service()
      Default constructor for CDI
  • Method Details

    • init

      @PostConstruct public void init()
      Initialization method called after construction.
    • processAuthentication

      public Oauth2User processAuthentication(jakarta.servlet.http.HttpServletRequest request, Map<String,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
    • getLuteceUserAttributesProvided

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

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

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