Class UserInfoController

java.lang.Object
edu.ucsb.cs156.dining.controllers.ApiController
edu.ucsb.cs156.dining.controllers.UserInfoController

@RequestMapping("/api/currentUser") @RestController public class UserInfoController extends ApiController
This is a REST controller for getting information about the current user.
  • Constructor Details

    • UserInfoController

      public UserInfoController()
  • Method Details

    • getCurrentUser

      @PreAuthorize("hasRole(\'ROLE_USER\')") @GetMapping("") public CurrentUser getCurrentUser()
      This method returns the current user.
      Overrides:
      getCurrentUser in class ApiController
      Returns:
      the current user