
org.pac4j.springframework.web.CallbackController Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of spring-webmvc-pac4j Show documentation
Show all versions of spring-webmvc-pac4j Show documentation
Security library for Spring Web MVC based on pac4j
package org.pac4j.springframework.web;
import org.pac4j.core.config.Config;
import org.pac4j.core.context.J2EContext;
import org.pac4j.core.engine.CallbackLogic;
import org.pac4j.core.engine.J2ERenewSessionCallbackLogic;
import org.pac4j.core.http.J2ENopHttpActionAdapter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import static org.pac4j.core.util.CommonHelper.assertNotNull;
/**
* This filter finishes the login process for an indirect client, based on the {@link #callbackLogic}.
*
* The configuration can be defined via property keys: pac4j.callback.defaultUrl
(default url after login if none was requested),
* pac4j.callback.multiProfile
(whether multiple profiles should be kept) and
* pac4j.callback.renewSession
(whether the session must be renewed after login).
* Or it can be defined via setter methods: {@link #setDefaultUrl(String)}, {@link #setMultiProfile(Boolean)} and ({@link #setRenewSession(Boolean)}.
*
* @author Jerome Leleu
* @since 1.0.0
*/
@Controller
public class CallbackController {
private CallbackLogic
© 2015 - 2025 Weber Informatics LLC | Privacy Policy