public function TokenAuthenticationBase::publicFields in RESTful 7.2
Overrides ResourceEntity::publicFields().
Overrides ResourceEntity::publicFields
See also
http://tools.ietf.org/html/rfc6750#section-4
File
- modules/
restful_token_auth/ src/ Plugin/ resource/ TokenAuthenticationBase.php, line 20 - Contains Drupal\restful_token_auth\Plugin\resource\TokenAuthenticationBase.
Class
Namespace
Drupal\restful_token_auth\Plugin\resourceCode
public function publicFields() {
$public_fields = parent::publicFields();
unset($public_fields['label']);
unset($public_fields['self']);
$public_fields['id']['methods'] = array();
$public_fields['access_token'] = array(
'property' => 'token',
);
$public_fields['type'] = array(
'callback' => array(
'\\Drupal\\restful\\RestfulManager::echoMessage',
array(
'Bearer',
),
),
);
$public_fields['expires_in'] = array(
'property' => 'expire',
'process_callbacks' => array(
'\\Drupal\\restful_token_auth\\Plugin\\resource\\TokenAuthenticationBase::intervalInSeconds',
),
);
$public_fields['refresh_token'] = array(
'property' => 'refresh_token_reference',
'process_callbacks' => array(
'\\Drupal\\restful_token_auth\\Plugin\\resource\\TokenAuthenticationBase::getTokenFromEntity',
),
);
return $public_fields;
}