Skip to content

Commit

Permalink
working ?
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTheGeek committed Dec 7, 2023
1 parent d34e723 commit 793324b
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
import back_openstack as openstack
from flask_cors import CORS
import requests
from cas import CASClient



################
Expand All @@ -26,6 +28,10 @@
app.config['TOKEN_SECRET_KEY'] = 'your_token_secret_key'
app.config['SESSION_COOKIE_DOMAIN'] = 'insa-cvl.com'

cas_server_url = "https://cas.insa-cvl.fr/cas"
service_url = "https://api.insa-cvl.com"
cas = CASClient(cas_server_url, service_url)

db = SQLAlchemy(app)
login_manager = LoginManager(app)
#login_manager.login_view = 'login'
Expand Down Expand Up @@ -134,6 +140,9 @@ def logincas():
ticket_id = request.args.get('ticket')
# data = request.get_json()
print(ticket_id)
# Get user information
user_info = cas.get_user()
print("User Info:", user_info)
# print(data)
return jsonify({'message': 'Login successful'+ticket_id}), 200

Expand Down

0 comments on commit 793324b

Please sign in to comment.