Overview

Namespaces

  • Authoritarian
    • Exception
      • Flow
    • Flow
  • PHP

Classes

  • AbstractFlow
  • AuthorizationCodeFlow
  • ClientCredentialsFlow
  • ResourceOwnerPasswordFlow
  • Overview
  • Namespace
  • Class
  • Tree
 1: <?php
 2: 
 3: namespace Authoritarian\Flow;
 4: 
 5: /**
 6:  * Implementation of Client Credentials Flow
 7:  */
 8: class ClientCredentialsFlow extends AbstractFlow
 9: {
10:     const GRANT_TYPE = 'client_credentials';
11: 
12:     /**
13:      * {@inheritDoc}
14:      */
15:     public function getRequest()
16:     {
17:         parent::getRequest();
18: 
19:         return $this->client->post(
20:             $this->tokenUrl,
21:             null,
22:             $this->removeNullItems(
23:                 array(
24:                     'grant_type' => self::GRANT_TYPE,
25:                     'client_id' => $this->clientId,
26:                     'client_secret' => $this->clientSecret,
27:                 )
28:             )
29:         );
30:     }
31: }
32: 
API documentation generated by ApiGen 2.8.0