All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ulisesbocchio.security.saml.spring.mvc.HomeController Maven / Gradle / Ivy

There is a newer version: 1.1
Show newest version
package com.ulisesbocchio.security.saml.spring.mvc;

/**
 * @author Ulises Bocchio
 */

import com.ulisesbocchio.security.saml.spring.security.SAMLUserDetails;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class HomeController {

    @RequestMapping("/home")
    public ModelAndView home(@SAMLUser SAMLUserDetails user) {
        ModelAndView homeView = new ModelAndView("home");
        homeView.addObject("userId", user.getUsername());
        homeView.addObject("samlAttributes", user.getAttributes());
        return homeView;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy