-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAuthenticationMethod.php
More file actions
51 lines (43 loc) · 1.77 KB
/
Copy pathAuthenticationMethod.php
File metadata and controls
51 lines (43 loc) · 1.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types=1);
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2019 Spomky-Labs
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE file for details.
*/
namespace OAuth2Framework\Component\ResourceServerAuthentication;
use OAuth2Framework\Component\Core\ResourceServer\ResourceServer;
use OAuth2Framework\Component\Core\ResourceServer\ResourceServerId;
use Psr\Http\Message\ServerRequestInterface;
interface AuthenticationMethod
{
/**
* @return string[]
*/
public function getSupportedMethods(): array;
/**
* Find a ResourceServer using the request.
* If the ResourceServer is confidential, the ResourceServer credentials must be checked.
*
* @param ServerRequestInterface $request The request
* @param mixed $resourceServerCredentials The resource server credentials found in the request
*
* @return null|ResourceServerId Return the resource server public ID if found else null. If credentials have are needed to authenticate the ResourceServer, they are set to the variable $resourceServerCredentials
*/
public function findResourceServerIdAndCredentials(ServerRequestInterface $request, &$resourceServerCredentials = null): ?ResourceServerId;
/**
* This method verifies the ResourceServer credentials in the request.
*
* @param mixed $resourceServerCredentials
*
* @return bool Returns true if the resource server is authenticated, else false
*/
public function isResourceServerAuthenticated(ResourceServer $resourceServer, $resourceServerCredentials, ServerRequestInterface $request): bool;
/**
* @return string[]
*/
public function getSchemesParameters(): array;
}