Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. package com.example.auth.controllers;
  2.  
  3. import org.springframework.security.core.Authentication;
  4. import org.springframework.stereotype.Controller;
  5. import org.springframework.web.bind.annotation.RequestMapping;
  6. import org.springframework.web.bind.annotation.RequestMethod;
  7. import org.springframework.web.bind.annotation.ResponseBody;
  8.  
  9. @Controller
  10. @RequestMapping
  11. public class LoginController {
  12. @RequestMapping(value = "/", method = RequestMethod.GET)
  13. @ResponseBody
  14. public String welcomePage(Authentication authentication) {
  15. return "Bienvenido, tienes permisos de " + authentication.getName();
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement