You are here

class DisallowSimpleOauthRequests in Simple OAuth (OAuth2) & OpenID Connect 8

Same name and namespace in other branches
  1. 8.4 src/PageCache/DisallowSimpleOauthRequests.php \Drupal\simple_oauth\PageCache\DisallowSimpleOauthRequests
  2. 8.2 src/PageCache/DisallowSimpleOauthRequests.php \Drupal\simple_oauth\PageCache\DisallowSimpleOauthRequests
  3. 8.3 src/PageCache/DisallowSimpleOauthRequests.php \Drupal\simple_oauth\PageCache\DisallowSimpleOauthRequests
  4. 5.x src/PageCache/DisallowSimpleOauthRequests.php \Drupal\simple_oauth\PageCache\DisallowSimpleOauthRequests

Class DisallowSimpleOauthRequests.

@package Drupal\simple_oauth\PageCache

Hierarchy

Expanded class hierarchy of DisallowSimpleOauthRequests

1 string reference to 'DisallowSimpleOauthRequests'
simple_oauth.services.yml in ./simple_oauth.services.yml
simple_oauth.services.yml
1 service uses DisallowSimpleOauthRequests
simple_oauth.page_cache_request_policy.disallow_access_token_requests in ./simple_oauth.services.yml
Drupal\simple_oauth\PageCache\DisallowSimpleOauthRequests

File

src/PageCache/DisallowSimpleOauthRequests.php, line 14

Namespace

Drupal\simple_oauth\PageCache
View source
class DisallowSimpleOauthRequests implements RequestPolicyInterface {

  /**
   * {@inheritdoc}
   */
  public function check(Request $request) {
    return SimpleOauthAuthenticationProvider::getTokenValue($request) ? self::DENY : NULL;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
DisallowSimpleOauthRequests::check public function Determines whether delivery of a cached page should be attempted. Overrides RequestPolicyInterface::check
RequestPolicyInterface::ALLOW constant Allow delivery of cached pages.
RequestPolicyInterface::DENY constant Deny delivery of cached pages.