def fxa_identify(code, config=None):
 try:
  with statsd.timer('accounts.fxa.identify.all'):
   token = get_fxa_token(code, config)['access_token']
   profile = get_fxa_profile(token, config)
 except:
  statsd.incr('accounts.fxa.identify.all.fail')
  raise
 else:
  statsd.incr('accounts.fxa.identify.all.success')
  return profile

def fxa_identify ( code , config = None ) : try : with statsd . timer ( 'accounts.fxa.identify.all' ) : token = get_fxa_token ( code , config ) [ 'access_token' ] profile = get_fxa_profile ( token , config ) except : statsd . incr ( 'accounts.fxa.identify.all.fail' ) raise else : statsd . incr ( 'accounts.fxa.identify.all.success' ) return profile
get an fxa profile for an access token .