Skip to content

Instantly share code, notes, and snippets.

@baso53
Created November 14, 2021 12:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baso53/fe9c94252f650717b60ad3d50c61e8ba to your computer and use it in GitHub Desktop.
Save baso53/fe9c94252f650717b60ad3d50c61e8ba to your computer and use it in GitHub Desktop.
@RestController
@RequestMapping("/admin")
@RequiredArgsConstructor
public class AdminController {
private final UserManagementService userManagementService;
@Secured("ROLE_ANONYMOUS")
@PostMapping(path = "/user-claims/{uid}")
public void setUserClaims(
@PathVariable String uid,
@RequestBody Map<EntityType, Map<Long, Set<Permission>>> requestedClaims
) throws FirebaseAuthException {
userManagementService.setTokenClaims(uid, requestedClaims);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment