[](https://travis-ci.org/Regner/eveauth) [](https://pypi.python.org/pypi/eveauth/)
A simple library for verifying authorization tokens provided against the EVE
Online SSO. Helper methods and decorators are provided for simplysimplifying the
ability to restrict access based on scopes or a character ID.
## Using
```python
from eveauth import authenticate
# Just get the token information back
token = authenticate(request)
# Require a specific scope
token = authenticate(request, ['character'])
# By default using the authenticate method directly will raise either a
# eveauth.Unauthorized or eveauth.Forbidden exception if something goes wrong or
# missing a scope.
# Decorate a flask view
from eveauth.contrib.flask import authenticate
@authenticate()
@app.route('/v1/<int:character_id>/')
def get_char_stats(character_id):
if request.token['character_id'] != character_id:
abort(403)
# The flask decorator will abort with a 401 or 403 if the eveauth package raises
# one if its exceptions. You only need to handle making sure the character the
# token is for is allowed the resource they are requesting.
```
## Environment Variables
* __EVEAUTH_URL:__ Defaults to 'https://login.eveonline.com/oauth/verify/'. The
URL which will be used to validate the authorization token.
* __EVEAUTH_CACHE_TIME:__ Defaults to 300. How long, in seconds, to cache the
response from the SSO server for.
* __AUTH_TESTING:__
* __TEST_TOKEN_DATA:__
Metadata
Release files for eveauth 0.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| eveauth-0.0.3.tar.gz | 3.0 kB | Without provenance | Details for eveauth-0.0.3.tar.gz |
Release files / eveauth-0.0.3.tar.gz
| Download URL | eveauth-0.0.3.tar.gz |
|---|---|
| Size | 3.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7ab1a552e76affffc95ca585a93bd4b4c8bd8cf104e30a384ea5224ff52dd75a
|
|
BLAKE2b-256 checksum How to use checksums |
27b9a9ac15e61e496415d20ee1ed734e3ba2df6fe6071c575d41d856a75b9b6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for eveauth 0.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.