not entirely user where it's going from here.

dev
Sean McArdle 2018-11-05 15:43:53 -08:00
parent 2d443328c3
commit 62a54b0cd0
4 changed files with 51 additions and 0 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"python.pythonPath": "C:\\Users\\OR0192682\\AppData\\Local\\Continuum\\anaconda3\\python.exe"
}

4
run_app.cmd Normal file
View File

@ -0,0 +1,4 @@
@echo off
set FLASK_ENV=development
set FLASK_APP=src/claims.py
flask run

3
run_app.sh Normal file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
FLASK_ENV=development FLASK_APP=src/claims.py flask run

41
src/claims.py Normal file
View File

@ -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)