Skip to content

skit-ai/skit-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

skit-auth

This is a simple authentication library for Skit's platform.

  • Provides JWTs in exchange for IAM credentials.
  • Provides specific tokens for organizations associated with Skit.

Installation

The library uses python=^3.9.

pip install skit-auth
skit-auth -h

Usage

❯ skit-auth -h
usage: skit-auth [-h] [--url URL] --email EMAIL [-p] [--org-id ORG_ID]

skit.ai's authorization library.

optional arguments:
  -h, --help       show this help message and exit
  --url URL        The URL of the API Gateway. [Default=https://apigateway.skit.ai]
  --email EMAIL    The email address of the user or IAM.
  -p, --password   The password of the user or IAM. We can also read it from the
                   SKIT_API_GATEWAY_PASSWORD environment variable. *DON'T* provide a value
                   e.g. -p <password> or --password <password> will fail.
  --org-id ORG_ID  The ID of the organization.

The default url is the production api gateway endpoint.

Example

Sharing a few invocation examples:

A default token is generated by the following. May not help for interacting with other organizations on the platform.

skit-auth --email [email protected] -p

To obtain a token for a particular organization we use the --org-id flag.

skit-auth --email [email protected] --password --org-id 2

These commands also save a session in ${HOME}/.skit/token for other skit programs to use. Other skit packages expect a token at the same path and read the token if present.

About

Authorization for skit.ai's platform.

Resources

License

Stars

Watchers

Forks

Packages

No packages published