Metadata-Version: 2.1
Name: opensarlab-backend
Version: 1.0.2
Summary: Backend python modules for OpenSARLab
Home-page: https://github.com/ASFOpenSARlab/opensarlab-backend
Author: Alaska Satellite Facility OpenSARLab Team
Author-email: uaf-jupyterhub-asf@alaska.edu
License: BSD 3-Clause
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Science/Research
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3.9
Description-Content-Type: text/markdown
Requires-Dist: cryptography
Requires-Dist: pyjwt

# opensarlab-backend

## Intro

OpenSARLab is a customized JupyterHub instance running in AWS and operated by the Alaska Satellite Facility (ASF). The purpose of OpenSARLab is make Synthetic Aperture Radar (SAR) data more accessible.

This Python library is for common code used in the backend of OpenSARLab that would be better served in a pip-able package.

It is intended that these code can be found on PyPi: 

```
python3 -m pip install opensarlab-backend
```

## Auth Package

### Module: encryptedjwt

```
from opensarlab.auth import encryptedjwt
```

Take data, encode into a jwt token, and encrypt the token. Also decrypt the token and decode the data.

The encode/encrypt secret is by default found at `/run/secrets/sso_token` or `/usr/local/etc/jupyterhub/existing-secret/sso_token`.

This module safely allows the sharing of JupyterHub user information between separate servers/containers.
