diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8c127e4 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "C:\\Users\\OR0192682\\AppData\\Local\\Continuum\\anaconda3\\python.exe" +} \ No newline at end of file diff --git a/run_app.cmd b/run_app.cmd new file mode 100644 index 0000000..05fa8bd --- /dev/null +++ b/run_app.cmd @@ -0,0 +1,4 @@ +@echo off +set FLASK_ENV=development +set FLASK_APP=src/claims.py +flask run \ No newline at end of file diff --git a/run_app.sh b/run_app.sh new file mode 100644 index 0000000..9b61c3f --- /dev/null +++ b/run_app.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +FLASK_ENV=development FLASK_APP=src/claims.py flask run \ No newline at end of file diff --git a/src/claims.py b/src/claims.py new file mode 100644 index 0000000..ae6d926 --- /dev/null +++ b/src/claims.py @@ -0,0 +1,41 @@ +#!/usr/bin/env python3 + +import flask +from flask import request +from flask import render_template + +app = flask.Flask(__name__) + +app.config.update({ + 'SECRET_KEY': 'super duper secret', + 'SAML_METADATA_URL': 'http://somemetadata.com', +}) + + +@app.route('/') +def hello_world(): + return "Hello world!" + + +@app.route('/claims/saml/', methods=['POST', 'GET']) +def get_saml_claims(foo): + error = None + if request.method == 'POST': + r = request + pass + if request.method == 'GET': + # + pass + return render_template('claims.html', error=error) + + +@app.route('/claims/oauth/', methods=['POST', 'GET']) +def get_oauth_claims(foo): + error = None + if request.method == 'POST': + # handle claims token + pass + if request.method == 'GET': + # + pass + return render_template('claims.html', error=error) \ No newline at end of file