We have an API which restricts access based on who you are. For example, some endpoints allow access to the public, some allow access to users, and some allow access to users with higher level roles like administrator. We wish to write tests which confirm that these restrictions are working.
To this end we wish to store permanently tokens which correspond to users, then use those tokens during our integration tests. Is there a way to create permanent tokens for specific test users? If not how is this usually handled?