Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _store_config(token_response):
"""
Store the tokens on disk.
Args:
token_response (OAuthTokenResponse): Response from a token request
"""
tkn = token_response.by_resource_server
funcx_at = tkn['funcx_service']['access_token']
funcx_rt = tkn['funcx_service']['refresh_token']
funcx_at_expires = tkn['funcx_service']['expires_at_seconds']
write_option(FUNCX_RT_OPTNAME, funcx_rt)
write_option(FUNCX_AT_OPTNAME, funcx_at)
write_option(FUNCX_AT_EXPIRES_OPTNAME, funcx_at_expires)
def _store_config(token_response):
"""
Store the tokens on disk.
Args:
token_response (OAuthTokenResponse): Response from a token request
"""
tkn = token_response.by_resource_server
funcx_at = tkn['funcx_service']['access_token']
funcx_rt = tkn['funcx_service']['refresh_token']
funcx_at_expires = tkn['funcx_service']['expires_at_seconds']
write_option(FUNCX_RT_OPTNAME, funcx_rt)
write_option(FUNCX_AT_OPTNAME, funcx_at)
write_option(FUNCX_AT_EXPIRES_OPTNAME, funcx_at_expires)
def _store_config(token_response):
"""
Store the tokens on disk.
Args:
token_response (OAuthTokenResponse): Response from a token request
"""
tkn = token_response.by_resource_server
funcx_at = tkn['funcx_service']['access_token']
funcx_rt = tkn['funcx_service']['refresh_token']
funcx_at_expires = tkn['funcx_service']['expires_at_seconds']
write_option(FUNCX_RT_OPTNAME, funcx_rt)
write_option(FUNCX_AT_OPTNAME, funcx_at)
write_option(FUNCX_AT_EXPIRES_OPTNAME, funcx_at_expires)