File tree Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Expand file tree Collapse file tree 3 files changed +8
-7
lines changed Original file line number Diff line number Diff line change 1010from flask import Flask
1111from flask_migrate import Migrate
1212from flask_pyoidc .flask_pyoidc import OIDCAuthentication
13+ from flask_pyoidc .provider_configuration import ProviderConfiguration , ClientMetadata
1314from flask_sqlalchemy import SQLAlchemy
1415
1516app = Flask (__name__ )
3738migrate = Migrate (app , db )
3839app .logger .info ("SQLAlchemy pointed at " + repr (db .engine .url ))
3940
40- auth = OIDCAuthentication ( app , issuer = app .config ["OIDC_ISSUER" ], client_registration_info = {
41- "client_id" : app .config ["OIDC_CLIENT_ID" ],
42- "client_secret" : app .config ["OIDC_CLIENT_SECRET" ],
43- "post_logout_redirect_uris" : "/logout/"
44- } )
41+ APP_CONFIG = ProviderConfiguration ( issuer = app .config ["OIDC_ISSUER" ],
42+ client_metadata = ClientMetadata ( app .config ["OIDC_CLIENT_ID" ],
43+ app .config ["OIDC_CLIENT_SECRET" ]))
44+
45+ auth = OIDCAuthentication ({ 'app' : APP_CONFIG }, app )
4546
4647# LDAP
4748_ldap = csh_ldap .CSHLDAP (app .config ["LDAP_BIND_DN" ], app .config ["LDAP_BIND_PASS" ])
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ def packet_auth(func):
5656 """
5757 Decorator for easily configuring oidc
5858 """
59- @auth .oidc_auth
59+ @auth .oidc_auth ( 'app' )
6060 @wraps (func )
6161 def wrapped_function (* args , ** kwargs ):
6262 if app .config ["REALM" ] == "csh" :
Original file line number Diff line number Diff line change 11Flask == 1.0.2
2- Flask-pyoidc == 1.3 .0
2+ Flask-pyoidc == 2.0 .0
33flask_sqlalchemy == 2.3.2
44psycopg2-binary == 2.7.5
55Flask-Migrate == 2.2.1
You can’t perform that action at this time.
0 commit comments