def extract_auth_sub_token_from_url(url, 
    scopes_param_prefix='auth_sub_scopes', rsa_key=None):
  if isinstance(url, (str, unicode)):
    url = atom.url.parse_url(url)
  if 'token' not in url.params:
    return None
  scopes = []
  if scopes_param_prefix in url.params:
    scopes = url.params[scopes_param_prefix].split(' ')
  token_value = url.params['token']
  if rsa_key:
    token = SecureAuthSubToken(rsa_key, scopes=scopes)
  else:
    token = AuthSubToken(scopes=scopes)
  token.set_token_string(token_value)
  return token
Creates an AuthSubToken and sets the token value and scopes from the URL.
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/attic/PicasaSnap/gdata/auth.py/extract_auth_sub_token_from_url