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!