Skip to content
This repository has been archived by the owner on Oct 1, 2020. It is now read-only.

Commit

Permalink
Modified logg messages in kitin.py
Browse files Browse the repository at this point in the history
  • Loading branch information
sweco-semhul committed Jan 29, 2015
1 parent 9bf9dd0 commit 655e57f
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions kitin.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,6 @@ def global_view_variables():

@login_manager.user_loader
def _load_user(uid):
app.logger.debug("Loading user %s " % uid)
#app.logger.debug("Sigel in session %s" % session.get('sigel'))
if not 'sigel' in session:
return None
return User(uid, sigel=session.get('sigel'))
Expand Down Expand Up @@ -126,10 +124,11 @@ def authorized():
verify_response = requests_oauth.get(app.config['OAUTH_VERIFY_URL']).json()
verify_user = verify_response['user']
sigel = verify_user['authorization'][0]['sigel']
app.logger.debug("User received from verify %s " % jsonify(verify_user))
username = verify_user['username']
app.logger.debug("User received from verify %s, %s, %s " % (username, sigel, jsonify(verify_user)))

# Create Flask User and login
user = User(verify_user['username'], sigel=sigel, token=session['oauth_token'])
user = User(username, sigel=sigel, token=session['oauth_token'])
session['sigel'] = sigel
login_user(user, True)

Expand Down

0 comments on commit 655e57f

Please sign in to comment.