Skip to content

Commit

Permalink
rename access_token to access_token_info
Browse files Browse the repository at this point in the history
  • Loading branch information
VJalili committed Aug 14, 2017
1 parent 7c0cc5e commit 9dc0403
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/galaxy/authnz/oidc_idp_google.py
Expand Up @@ -124,12 +124,12 @@ def callback( self, state_token, authz_code, trans ):
# The credentials object holds refresh and access tokens
# that authorize access to a single user's data.
credentials = flow.step2_exchange( authz_code )
access_token = credentials.get_access_token()
access_token_info = credentials.get_access_token()
user_oauth_record = query_result.first()
user_oauth_record.id_token = credentials.id_token_jwt
user_oauth_record.refresh_token = credentials.refresh_token
user_oauth_record.expiration_date = datetime.now() + timedelta( seconds = access_token.expires_in )
user_oauth_record.access_token = access_token.access_token
user_oauth_record.expiration_date = datetime.now() + timedelta( seconds = access_token_info.expires_in )
user_oauth_record.access_token = access_token_info.access_token
trans.sa_session.flush()
log.debug( "User `{}` authentication against `Google` identity provider, is successfully saved."
.format( trans.user.username ) )
Expand Down

0 comments on commit 9dc0403

Please sign in to comment.