Skip to main content

A generalized library for storing native auth tokens

Project description

https://github.com/fair-research/native-login/actions/workflows/tests.yml/badge.svg https://img.shields.io/pypi/v/fair-research-login.svg https://img.shields.io/pypi/wheel/fair-research-login.svg License

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fair-research-login-0.3.1.tar.gz (26.5 kB view details)

Uploaded Source

Built Distribution

fair_research_login-0.3.1-py3-none-any.whl (39.2 kB view details)

Uploaded Python 3

File details

Details for the file fair-research-login-0.3.1.tar.gz.

File metadata

  • Download URL: fair-research-login-0.3.1.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

Hashes for fair-research-login-0.3.1.tar.gz
Algorithm Hash digest
SHA256 eeccc8c77e509fa18e3940fa12c09822aaa68bae6dae9f481426ed3d4f469cc0
MD5 1b5a17bdad0662a2e781dcdbe52cadd6
BLAKE2b-256 80db45958653676b5e2d4f3923266c569496b8768639c12c58d74b87d97f68cd

See more details on using hashes here.

Provenance

File details

Details for the file fair_research_login-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for fair_research_login-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ca315cda321908736600752cb4564d7e9e560ec7e7145b4b3e74a766307942ec
MD5 3e949a6fe0772d0d556cb859a7c4129b
BLAKE2b-256 80ca46515d117f7c5de1606735016d82333aaebd2980216656b3dc3a4d4e417d

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page