You are here

interface SimpleOauthRequestPolicyInterface in Simple OAuth (OAuth2) & OpenID Connect 5.x

Same name and namespace in other branches
  1. 8.4 src/PageCache/SimpleOauthRequestPolicyInterface.php \Drupal\simple_oauth\PageCache\SimpleOauthRequestPolicyInterface
  2. 8.3 src/PageCache/SimpleOauthRequestPolicyInterface.php \Drupal\simple_oauth\PageCache\SimpleOauthRequestPolicyInterface

The interface for determining the requests with OAuth data.

The service that implements the interface is used to determine whether the page should be served from cache and also if the request contains an access token to proceed to the authentication.

Hierarchy

Expanded class hierarchy of SimpleOauthRequestPolicyInterface

All classes that implement SimpleOauthRequestPolicyInterface

See also

\Drupal\simple_oauth\PageCache\DisallowSimpleOauthRequests::check()

\Drupal\simple_oauth\Authentication\Provider\SimpleOauthAuthenticationProvider::applies()

1 file declares its use of SimpleOauthRequestPolicyInterface
SimpleOauthAuthenticationProvider.php in src/Authentication/Provider/SimpleOauthAuthenticationProvider.php

File

src/PageCache/SimpleOauthRequestPolicyInterface.php, line 18

Namespace

Drupal\simple_oauth\PageCache
View source
interface SimpleOauthRequestPolicyInterface extends RequestPolicyInterface {

  /**
   * Returns a state whether the request has an OAuth2 access token.
   *
   * @param \Symfony\Component\HttpFoundation\Request $request
   *   The incoming request object.
   *
   * @return bool
   *   A state whether the request has an OAuth2 access token.
   */
  public function isOauth2Request(Request $request);

}

Members

Namesort descending Modifiers Type Description Overrides
RequestPolicyInterface::ALLOW constant Allow delivery of cached pages.
RequestPolicyInterface::check public function Determines whether delivery of a cached page should be attempted. 6
RequestPolicyInterface::DENY constant Deny delivery of cached pages.
SimpleOauthRequestPolicyInterface::isOauth2Request public function Returns a state whether the request has an OAuth2 access token. 1