Jwt authentication and authorization with enum?

Here i found a way to implement Jwt into spring boot app, https://medium.com/@xoor/jwt-authentication-service-44658409e12c. So, they created a new object called role, and i see this recurring almost everywhere where RBAC is used, how my code differs is that i have a separate enum file in which i have defined all roles, and a field in user class which has one of those values, is it possible with jwt to set authentication and authorization to certain endpoints with the value of those enums instead of role objects preferably in the implementation of the sent example? Thank you