Skip to content

Commit

Permalink
🚧 (src/routes): add get request to Vault logout
Browse files Browse the repository at this point in the history
Added a GET request after the flask cleaning session function.
This should force Vault to logout user.
  • Loading branch information
ncvescera committed Nov 14, 2024
1 parent e09cf0c commit 01465dc
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/routes.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from flask import url_for, session, request, render_template, redirect

Check failure on line 1 in src/routes.py

View workflow job for this annotation

GitHub Actions / Pylint

src/routes.py#L1

Missing module docstring (missing-module-docstring, C0114)
from .app import app, dbms, oauth, socketio
import requests


@app.route('/', methods=['GET', 'POST', 'DELETE'])
Expand Down Expand Up @@ -96,6 +97,9 @@ def logout():
def on_session_close():

Check failure on line 97 in src/routes.py

View workflow job for this annotation

GitHub Actions / Pylint

src/routes.py#L97

Missing function or method docstring (missing-function-docstring, C0116)
logout()

app.logger.debug('Calling Vault to Logout')
_ = requests.get(url="https://vault.unipg.it/ui/vault/logout")

@app.route('/info')
def info():
return render_template('info.html')
Expand Down

0 comments on commit 01465dc

Please sign in to comment.