Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.example.auth.controllers;
- import org.springframework.security.core.Authentication;
- import org.springframework.stereotype.Controller;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.ResponseBody;
- @Controller
- @RequestMapping
- public class LoginController {
- @RequestMapping(value = "/", method = RequestMethod.GET)
- @ResponseBody
- public String welcomePage(Authentication authentication) {
- return "Bienvenido, tienes permisos de " + authentication.getName();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement