You are here

ClientCredentials.php in Simple OAuth (OAuth2) & OpenID Connect 8.2

Same filename and directory in other branches
  1. 8.3 simple_oauth_extras/src/Plugin/Oauth2Grant/ClientCredentials.php

File

simple_oauth_extras/src/Plugin/Oauth2Grant/ClientCredentials.php
View source
<?php

namespace Drupal\simple_oauth_extras\Plugin\Oauth2Grant;

use Drupal\simple_oauth\Plugin\Oauth2GrantBase;
use League\OAuth2\Server\Grant\ClientCredentialsGrant;
use League\OAuth2\Server\Repositories\RefreshTokenRepositoryInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * @Oauth2Grant(
 *   id = "client_credentials",
 *   label = @Translation("Client Credentials")
 * )
 */
class ClientCredentials extends Oauth2GrantBase {

  /**
   * {@inheritdoc}
   */
  public function getGrantType() {
    return new ClientCredentialsGrant();
  }

}

Classes

Namesort descending Description
ClientCredentials Plugin annotation @Oauth2Grant( id = "client_credentials", label = @Translation("Client Credentials") )