Class Oauth2Service
java.lang.Object
fr.paris.lutece.plugins.mylutece.modules.oauth2.service.Oauth2Service
France Connect Service.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionList<fr.paris.lutece.plugins.mylutece.business.LuteceUserAttributeDescription>voidinit()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 voidprocessLogout(jakarta.servlet.http.HttpServletRequest request) Process the logout.voidredirect(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) redirect after login or logout.
-
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 requestmapUserInfo- the map user infotoken- 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 requestresponse- The HTTP response- Throws:
IOException- if an error occurs
-