You are here

private function LTIToolProvider::validateOauthRequest in LTI Tool Provider 2.x

Same name and namespace in other branches
  1. 8 src/Authentication/Provider/LTIToolProvider.php \Drupal\lti_tool_provider\Authentication\Provider\LTIToolProvider::validateOauthRequest()

Validate the OAuth request.

1 call to LTIToolProvider::validateOauthRequest()
LTIToolProvider::authenticate in src/Authentication/Provider/LTIToolProvider.php
Authenticates the user.

File

src/Authentication/Provider/LTIToolProvider.php, line 187

Class

LTIToolProvider
Oauth authentication provider for LTI Tool Provider.

Namespace

Drupal\lti_tool_provider\Authentication\Provider

Code

private function validateOauthRequest() {
  $provider = new OAuthProvider([
    "oauth_signature_method" => OAUTH_SIG_METHOD_HMACSHA1,
  ]);
  $provider
    ->consumerHandler([
    $this,
    'consumerHandler',
  ]);
  $provider
    ->timestampNonceHandler([
    $this,
    'timestampNonceHandler',
  ]);
  $provider
    ->isRequestTokenEndpoint(FALSE);
  $provider
    ->is2LeggedEndpoint(TRUE);
  $provider
    ->checkOAuthRequest();
}