How to get all user Claims with tokenOptions

Still Nightmares

Once there was this object - AuthenticationJsonWebToken

May be it is now - @AuthenticationPrincipal OidcUser principal

The example doesn’t give enough logs to understand. I would be nice to write small example, which I think is part of unit testing, as Spring users is one huge community. Lots of ellipses in the example {…}

@DeleteMapping(“/{id}”)
@PreAuthorize(“hasAuthority(‘delete:items’)”) // :sparkles: :point_left: New line :sparkles:
public ResponseEntity delete(@PathVariable(“id”) Long id) {…}

@ExceptionHandler(MethodArgumentNotValidException.class)
public ResponseEntity<Map<String, String>> handleValidationExceptions(
        MethodArgumentNotValidException ex) {...}

Too much forcing like -@EnableGlobalMethodSecurity(prePostEnabled = true) and endpoints @PreAuthorize(“hasAuthority(‘create:items’)”) is unwanted

Can anyone tell me - how can I print the claims using the above example.