Rename route for SSO authorization
This commit is contained in:
parent
ea6aa37131
commit
0dc2563b31
|
@ -46,10 +46,10 @@ def init_app(app):
|
||||||
|
|
||||||
@app.route('/login')
|
@app.route('/login')
|
||||||
def login():
|
def login():
|
||||||
return oauth.azure.authorize_redirect(flask.url_for('auth', _external=True))
|
return oauth.azure.authorize_redirect(flask.url_for('authorize', _external=True))
|
||||||
|
|
||||||
@app.route('/auth')
|
@app.route('/authorize')
|
||||||
def auth():
|
def authorize():
|
||||||
token = oauth.azure.authorize_access_token()
|
token = oauth.azure.authorize_access_token()
|
||||||
user = users[user.username] = User(token.get('userinfo', {}))
|
user = users[user.username] = User(token.get('userinfo', {}))
|
||||||
flask_login.login_user(user)
|
flask_login.login_user(user)
|
||||||
|
|
Loading…
Reference in a new issue