Class UserController
java.lang.Object
edu.cnm.deepdive.teamassignments.controller.UserController
User controller class
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionme(Authentication auth)
get mapping for the User making the request.post(User user, Authentication auth)
Post mapping for User object.
-
Constructor Details
-
UserController
-
-
Method Details
-
me
get mapping for the User making the request.- Parameters:
auth
- token for an authenticated principal once the request has been processed by the AuthenticationManager.authenticate(Authentication) method.- Returns:
- User object casted from auth token.
-
post
@PostMapping(consumes="application/json", produces="application/json") public ResponseEntity<User> post(@RequestBody User user, Authentication auth)Post mapping for User object.- Parameters:
user
- User object from user entity class.auth
- token for an authenticated principal once the request has been processed by the AuthenticationManager.authenticate(Authentication) method.- Returns:
- User object via Json.
-