File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change 1616from flask_ldap3_login import LDAP3LoginManager , AuthenticationResponseStatus
1717from flask_ldap3_login .forms import LDAPLoginForm
1818import i18n
19- from qwc_services_core .jwt import jwt_manager
20- from qwc_services_core .auth import GroupNameMapper
19+ from qwc_services_core .auth import auth_manager , GroupNameMapper , optional_auth
2120from qwc_services_core .runtime_config import RuntimeConfig
2221from qwc_services_core .tenant_handler import (
2322 TenantHandler , TenantPrefixMiddleware , TenantSessionInterface )
3231app .config ['JWT_ACCESS_TOKEN_EXPIRES' ] = int (os .environ .get (
3332 'JWT_ACCESS_TOKEN_EXPIRES' , 12 * 3600 ))
3433
35- jwt = jwt_manager (app )
34+ jwt = auth_manager (app )
3635app .secret_key = app .config ['JWT_SECRET_KEY' ]
3736
3837i18n .set ('load_path' , [os .path .join (
@@ -282,7 +281,7 @@ def verify_login():
282281
283282
284283@app .route ('/logout' , methods = ['GET' , 'POST' ])
285- @jwt_required ( optional = True )
284+ @optional_auth
286285def logout ():
287286 target_url = url_path (request .args .get ('url' , '/' ))
288287 resp = make_response (redirect (target_url ))
You can’t perform that action at this time.
0 commit comments