-2

I am trying to protect my Java Spring API with a Token System. The aim is that I can say, if the token has privileges an which (Token xyz is Admin or just a User) In the Controller I'd like to say that only Admins are allowed to call the method.

I hope you understand my problem. Thanks!

1 Answers1

1

You can implement Roles and Privileges with spring security. I hope this tutorial will help you regarding the same. https://www.baeldung.com/role-and-privilege-for-spring-security-registration

Vivek Jain
  • 317
  • 3
  • 12