@must_be_logged_in
def personal_access_token_detail(auth, **kwargs):
 _id = kwargs.get('_id')
 try:
  record = ApiOAuth2PersonalToken.find_one(Q('_id', 'eq', _id))
 except NoResultsFound:
  raise HTTPError(http.NOT_FOUND)
 if (record.owner != auth.user):
  raise HTTPError(http.FORBIDDEN)
 if (record.is_active is False):
  raise HTTPError(http.GONE)
 token_detail_url = api_v2_url('tokens/{}/'.format(_id))
 return {'token_list_url': '', 'token_detail_url': token_detail_url, 'scope_options': get_available_scopes()}

@ must_be_logged_in def personal_access_token_detail ( auth , ** kwargs ) : _id = kwargs . get ( '_id' ) try : record = ApiOAuth2PersonalToken . find_one ( Q ( '_id' , 'eq' , _id ) ) except NoResultsFound : raise HTTPError ( http . NOT_FOUND ) if ( record . owner != auth . user ) : raise HTTPError ( http . FORBIDDEN ) if ( record . is_active is False ) : raise HTTPError ( http . GONE ) token_detail_url = api_v2_url ( 'tokens/{}/' . format ( _id ) ) return { 'token_list_url' : '' , 'token_detail_url' : token_detail_url , 'scope_options' : get_available_scopes ( ) }
show detail for a single personal access token .