class DisallowOauth2Requests in OAuth2 Server 8
Same name and namespace in other branches
- 2.0.x src/PageCache/DisallowOauth2Requests.php \Drupal\oauth2_server\PageCache\DisallowOauth2Requests
Class Disallow Oauth2 Requests.
@package Drupal\oauth2_server\PageCache
Hierarchy
- class \Drupal\oauth2_server\PageCache\DisallowOauth2Requests implements Oauth2RequestPolicyInterface
Expanded class hierarchy of DisallowOauth2Requests
1 string reference to 'DisallowOauth2Requests'
1 service uses DisallowOauth2Requests
File
- src/
PageCache/ DisallowOauth2Requests.php, line 13
Namespace
Drupal\oauth2_server\PageCacheView source
class DisallowOauth2Requests implements Oauth2RequestPolicyInterface {
/**
* The authentication provider.
*
* @var \Drupal\oauth2_server\Authentication\Provider\OAuth2DrupalAuthProvider
*/
private $authProvider;
/**
* DisallowOauth2Requests constructor.
*
* @param \Drupal\oauth2_server\Authentication\Provider\OAuth2DrupalAuthProvider $auth_provider
* The authentication provider.
*/
public function __construct(OAuth2DrupalAuthProvider $auth_provider) {
$this->authProvider = $auth_provider;
}
/**
* {@inheritdoc}
*/
public function isOauth2Request(Request $request) {
return $this->authProvider
->applies($request);
}
/**
* {@inheritdoc}
*/
public function check(Request $request) {
return $this
->isOauth2Request($request) ? static::DENY : NULL;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DisallowOauth2Requests:: |
private | property | The authentication provider. | |
DisallowOauth2Requests:: |
public | function |
Determines whether delivery of a cached page should be attempted. Overrides RequestPolicyInterface:: |
|
DisallowOauth2Requests:: |
public | function |
Returns a state whether the request has an OAuth2 access token. Overrides Oauth2RequestPolicyInterface:: |
|
DisallowOauth2Requests:: |
public | function | DisallowOauth2Requests constructor. | |
RequestPolicyInterface:: |
constant | Allow delivery of cached pages. | ||
RequestPolicyInterface:: |
constant | Deny delivery of cached pages. |