Metadata-Version: 2.1
Name: oidcish
Version: 0.1.1
Summary: 
Author: Erik G. Brandt
Author-email: erik.brandt@shaarpec.com
Requires-Python: >=3.8,<4.0
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Requires-Dist: StrEnum (>=0.4.7,<0.5.0)
Requires-Dist: background (>=0.2.1,<0.3.0)
Requires-Dist: beautifulsoup4 (>=4.11.1,<5.0.0)
Requires-Dist: cryptography (>=36.0.2,<37.0.0)
Requires-Dist: httpx (>=0.23.0,<0.24.0)
Requires-Dist: pendulum (>=2.1.2,<3.0.0)
Requires-Dist: pkce (>=1.0.3,<2.0.0)
Requires-Dist: pydantic (>=1.9.0,<2.0.0)
Requires-Dist: python-dotenv (>=0.20.0,<0.21.0)
Requires-Dist: python-jose (>=3.3.0,<4.0.0)
Description-Content-Type: text/markdown

# oidcish

- "Oh I Don't Care If Something Happens"
- "OIDC Is Definitely Cool If Someone Helps"

## What?

Library to connect to your OIDC provider via:

- Authentication code flow
- Device code flow

## Usage

```python
>>> from oidcish import DeviceFlow, CodeFlow
>>> auth = DeviceFlow(host="https://example.idp.com")
Visit https://idp.example.com/device?userCode=594658190 to complete sign-in.
# Or
# auth = CodeFlow(host="https://example.idp.com")
>>> print(auth.credentials.access_token)
eyJhbGciOiJSU...
```

## Options

Device flow can be used with the following options:

| Option | Default | Description |
|-|-|-|
| client_id | *No default* | The client id. |
| client_secret | *No default* | The client secret. |
| scope | openid profile offline_access | A space separated, case-sensitive list of scopes. |
| audience | *No default* | The access claim was designated for this audience. |

Code flow can be used with the following options:

| Option | Default | Description |
|-|-|-|
| client_id | *No default* | The client id. |
| client_secret | *No default* | The client secret. |
| redirect_uri | http://localhost | Must exactly match one of the allowed redirect URIs for the client. |
| username | *No default* | The user name. |
| password | *No default* | The user password. |
| scope | openid profile offline_access | A space separated, case-sensitive list of scopes. |
| audience | *No default* | The access claim was designated for this audience. |

