41 lines
866 B
Python
41 lines
866 B
Python
#!/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) |