Class UserController


  • @RestController
    @RequestMapping("/users")
    @ExposesResourceFor(User.class)
    public class UserController
    extends Object
    This class is a @RestController that handles endpoints for communication between the client side and the serverside for the User.
    • Constructor Detail

      • UserController

        public UserController​(UserService userService)
        This Constructor creates a UserService object.
        Parameters:
        userService - calls on UserService class.
    • Method Detail

      • me

        @GetMapping(value="/me",
                    produces="application/json")
        public User me​(org.springframework.security.core.Authentication auth)
        This is a get method that returns the current authenticated user.
        Parameters:
        auth - is an authentication object.
        Returns:
        Returns the current authenticated user.