java.lang.Object
info.ejava_student.starter.assignment3.security.identity.IdentityController

@RestController public class IdentityController extends Object
  • Field Details

  • 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

      @RequestMapping(path="/api/authorities", method=GET, produces="text/plain") public org.springframework.http.ResponseEntity<String> hasAuthority(@RequestParam(name="authority") String authority, @AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails userDetails)