How to use the gear.auth.JWTClient.unsafe_decode function in gear

To help you get started, we’ve selected a few gear examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github hail-is / hail / builder / builder / environment.py View on Github external
import os
import gear.auth as hj

with open(os.environ['HAIL_TOKEN_FILE']) as f:
    userdata = hj.JWTClient.unsafe_decode(f.read())
    BUCKET = f'gs://{userdata["bucket_name"]}'

GCP_PROJECT = os.environ['HAIL_GCP_PROJECT']
DOMAIN = os.environ['HAIL_DOMAIN']
IP = os.environ['HAIL_IP']
BUILDER_UTILS_IMAGE = os.environ['HAIL_BUILDER_UTILS_IMAGE']