Methods

Source

LineCode
1
<?php
2
3
/**
4
    The client credentials (or other forms of client authentication) can
5
    be used as an authorization grant when the authorization scope is
6
    limited to the protected resources under the control of the client,
7
    or to protected resources previously arranged with the authorization
8
    server.  Client credentials are used as an authorization grant
9
    typically when the client is acting on its own behalf (the client is
10
    also the resource owner) or is requesting access to protected
11
    resources based on an authorization previously arranged with the
12
    authorization server.
13
 */
14
15
namespace AuthStack\OAuth2\Model\Protocol\Grant;
16
17
use AuthStack\OAuth2\Model\Protocol\Request\ClientCredentials\GrantRequest;
18
use AuthStack\OAuth2\Model\Protocol\Response\ClientCredentials\GrantResponse;
19
20
class ClientCredentials implements GrantInterface
21
{
22
    public function grantRequest(): GrantRequest
23
    {
24
        return new GrantRequest();
25
    }
26
27
    public function grantResponse(): GrantResponse
28
    {
29
        return new GrantResponse();
30
    }
31
}