You are here

interface Oauth2RequestPolicyInterface in OAuth2 Server 8

Same name and namespace in other branches
  1. 2.0.x src/PageCache/Oauth2RequestPolicyInterface.php \Drupal\oauth2_server\PageCache\Oauth2RequestPolicyInterface

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 Oauth2RequestPolicyInterface

All classes that implement Oauth2RequestPolicyInterface

See also

\Drupal\oauth2_server\PageCache\DisallowOauth2Requests::check()

\Drupal\oauth2_server\Authentication\Provider\OAuth2DrupalAuthProvider::applies()

File

src/PageCache/Oauth2RequestPolicyInterface.php, line 18

Namespace

Drupal\oauth2_server\PageCache
View source
interface Oauth2RequestPolicyInterface 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
Oauth2RequestPolicyInterface::isOauth2Request public function Returns a state whether the request has an OAuth2 access token. 1
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.