A generalized library for storing native auth tokens
Project description
Fair Research Login
Fair Research Login simplifies the Globus Auth Flow to facilitate application development by providing automatic token management and streamlining the native app grant process. This is useful for writing re-usable scripts and can be used as the foundation for new applications without investing significant resources in authentication code.
For full documentation, see the Read the Docs here.
Installation
Install with pip:
pip install fair-research-login
Getting Started
You’ll need a Client ID from Globus. Follow these instructions from the Globus Auth Developer Guide. Be sure to check the Native App box in the registration form. Note the Client ID assigned by Globus. You’ll need it in your code, as shown in the example below.
Usage looks like this:
from globus_sdk import AuthClient
from fair_research_login.client import NativeClient
# Login
cli = NativeClient(client_id='7414f0b4-7d05-4bb6-bb00-076fa3f17cf5', app_name='My App')
cli.login(requested_scopes=['openid', 'email', 'profile'], refresh_tokens=True)
# Use your tokens
auth_client = AuthClient(authorizer=cli.get_authorizers()['auth.globus.org'])
print(auth_client.oauth2_userinfo())
Support
For any questions or issues using Fair Research Login, please send an email to support@globus.org with “Fair Research Login” in the message header.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file fair-research-login-0.3.1.dev0.tar.gz
.
File metadata
- Download URL: fair-research-login-0.3.1.dev0.tar.gz
- Upload date:
- Size: 26.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8807ae84d6b78446002a604fc3b83fa6030e92908398e24a059f15e8037ead82 |
|
MD5 | 5167dd166ab5ada89b3c769810ddac71 |
|
BLAKE2b-256 | 59eaa261777a6b73cca3f3b9a9b278b8e0ccc5e14599e81b672f0fe54bde13e9 |
Provenance
File details
Details for the file fair_research_login-0.3.1.dev0-py3-none-any.whl
.
File metadata
- Download URL: fair_research_login-0.3.1.dev0-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 429b0ea6c3f5786acb36ed7db9089bd9d617e09eb8ff82451d2c752c68ff9226 |
|
MD5 | f2bfeeeecd1e0e2a2f27fd921876e1e5 |
|
BLAKE2b-256 | b4067dc9c6a0e50597a1aa9405796b12dc3762ed400c0bd0d83a28f29e072045 |