Class IdentityController
java.lang.Object
info.ejava_student.starter.assignment3.security.identity.IdentityController
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<String> hasAuthority(String authority, org.springframework.security.core.userdetails.UserDetails userDetails) org.springframework.http.ResponseEntity<String> whoAmIGet(org.springframework.security.core.userdetails.UserDetails userDetails) org.springframework.http.ResponseEntity<String>
-
Field Details
-
WHO_AM_I_PATH
- See Also:
-
AUTHORITIES_PATH
- See Also:
-
-
Constructor Details
-
IdentityController
public IdentityController()
-
-
Method Details
-
whoAmIGet
@RequestMapping(path="/api/whoAmI", method=GET, produces="text/plain") public org.springframework.http.ResponseEntity<String> whoAmIGet(@AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails) -
whoAmIPost
@RequestMapping(path="/api/whoAmI", method=POST, produces="text/plain") public org.springframework.http.ResponseEntity<String> whoAmIPost() -
hasAuthority
-