Flask-pyoidc
This Flask extension provides simple OpenID Connect authentication, backed by pyoidc.
"Authorization Code Flow", "Implicit Flow", "Hybrid Flow", "Client Credentials Flow" are supported.
Getting started
Read the documentation or have a look at the example Flask app for a full example of how to use this extension.
Below is a basic example of how to get started:
app = Flask(__name__)
app.config.update(
OIDC_REDIRECT_URI = 'https://example.com/redirect_uri',
SECRET_KEY = ...
)
# Static Client Registration
client_metadata = ClientMetadata(
client_id='client1',
client_secret='secret1',
post_logout_redirect_uris=['https://example.com/logout'])
provider_config = ProviderConfiguration(issuer='<issuer URL of provider>',
client_metadata=client_metadata)
auth = OIDCAuthentication({'default': provider_config}, app)
@app.route('/')
@auth.oidc_auth('default') # endpoint will require login
def index():
user_session = UserSession(flask.session)
return jsonify(access_token=user_session.access_token,
id_token=user_session.id_token,
userinfo=user_session.userinfo)
Metadata
Release files for Flask-pyoidc 3.14.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| Flask-pyoidc-3.14.3.tar.gz | 31.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| Flask_pyoidc-3.14.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 53.1 kB
Release files / Flask-pyoidc-3.14.3.tar.gz
| Download URL | Flask-pyoidc-3.14.3.tar.gz |
|---|---|
| Size | 31.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4a42589f76733c3968ac5f99595c1525a682754916c34f7c029acee6c8ce3bb7
|
|
BLAKE2b-256 checksum How to use checksums |
100beafc37666076dd31f9ef6de174c2b31bf2315ca73872fdc6bde61b75555d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|
Release files / Flask_pyoidc-3.14.3-py3-none-any.whl
| Download URL | Flask_pyoidc-3.14.3-py3-none-any.whl |
|---|---|
| Size | 21.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a29b7c7660aed9e7b602bfe3cf1d2e5b4e5bc52448cb58babffe2ed10a74cac5
|
|
BLAKE2b-256 checksum How to use checksums |
2eb00bee9c23c23fcc33cb248a7629524bdf0d4d04928908adc825a0aff486d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.6
|