public function RestfulAuthenticationToken::applies in RESTful 7
Determines if the request can be checked for authentication. For example, when authenticating with HTTP header, return FALSE if the header values do not exist.
Parameters
array $request: The request.
string $method: The HTTP method. Defaults to "get".
Return value
bool TRUE if the request can be checked for authentication, FALSE otherwise.
Overrides RestfulAuthenticationBase::applies
File
- modules/
restful_token_auth/ plugins/ authentication/ RestfulAuthenticationToken.class.php, line 46 - Contains RestfulAuthenticationToken.
Class
- RestfulAuthenticationToken
- @file Contains RestfulAuthenticationToken.
Code
public function applies(array $request = array(), $method = \RestfulInterface::GET) {
$options = $this
->getPluginKey('options');
return $this
->extractTokenFromRequest($request, $options['param_name']);
}