public function OAuthDrupalProvider::applies in OAuth 1.0 8.2
Same name and namespace in other branches
- 8 src/Authentication/Provider/OAuthDrupalProvider.php \Drupal\oauth\Authentication\Provider\OAuthDrupalProvider::applies()
Checks whether suitable authentication credentials are on the request.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The request object.
Return value
bool TRUE if authentication credentials suitable for this provider are on the request, FALSE otherwise.
Overrides AuthenticationProviderInterface::applies
File
- src/
Authentication/ Provider/ OAuthDrupalProvider.php, line 60 - Contains \Drupal\oauth\Authentication\Provider\OAuthProvider.
Class
- OAuthDrupalProvider
- Oauth authentication provider.
Namespace
Drupal\oauth\Authentication\ProviderCode
public function applies(Request $request) {
// Only check requests with the 'authorization' header starting with OAuth.
return preg_match('/^OAuth/', $request->headers
->get('authorization'));
}