Source of file Authenticator.php
Size: 1,055 Bytes - Last Modified: 2022-02-21T10:00:46+00:00
/var/www/docs.ssmods.com/process/src/src/Services/Authenticator.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344 | <?php /** * Created by PhpStorm. * User: Conrad * Date: 17/11/2017 * Time: 11:23 AM */ namespace AdvancedLearning\Oauth2Server\Services; use AdvancedLearning\Oauth2Server\Exceptions\AuthenticationException; use League\OAuth2\Server\ResourceServer; use SilverStripe\Control\HTTPRequest; interface Authenticator { /** * Authenticate the request. Returns modified request (probably not as SS doesn't support * request attributes). * * @param HTTPRequest $request The SilverStripe request object to be authenticated. * * @return HTTPRequest * @throws AuthenticationException */ public function authenticate(HTTPRequest $request): HTTPRequest; /** * Override the default ResourceServer. * * @param ResourceServer $v The new ResourceServer to use. * * @return $this */ public function setServer(ResourceServer $v): Authenticator; /** * Get the ResourceServer. * * @return ResourceServer */ public function getServer(): ResourceServer; } |