Skip to content

Instantly share code, notes, and snippets.

@baso53
Created November 13, 2021 21:29
Show Gist options
  • Save baso53/20a6ba6f050007db0e2df08db45b0db1 to your computer and use it in GitHub Desktop.
Save baso53/20a6ba6f050007db0e2df08db45b0db1 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 List<Permission> requestedClaims
) throws FirebaseAuthException {
userManagementService.setUserClaims(uid, requestedClaims);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment