There are a number of contributed modules that add to additional authentication methods. There are modules that allow OAuth2 logins, OAuth bearer tokens, IP matching and JSON Web Tokens. The OAuth and Simple OAuth modules allow you to generate tokens that can be used to simulate a session that can be used to test for roles and permissions.