AdvancedLearning\Oauth2Server\Tests\OAuthServerTest
Synopsis
class OAuthServerTest
extends SapphireTest
{
- // members
- protected static string $fixture_file = 'tests/OAuthFixture.yml';
- protected static string $privateKeyFile = 'private.key';
- protected static string $publicKeyFile = 'public.key';
- // methods
- public void setUp()
- public void testClientGrant()
- public void testPasswordGrant()
- public void testMiddleware()
- public void testAuthoriseController()
- public void testUserEntity()
- public void testGraphQLClient()
- public void testGraphQLMember()
- public void testAuthenticationException()
- protected AuthorizationServer getAuthorisationServer()
- protected ResourceServer getResourceServer()
- protected string getPrivateKeyPath()
- protected string getPublicKeyPath()
- protected void tearDown()
- protected ResponseInterface generateClientAccessToken()
- protected ServerRequest getClientRequest()
Hierarchy
Extends
- SilverStripe\Dev\SapphireTest
Uses
- League\OAuth2\Server\CryptTrait
Members
protected
- $fixture_file
- $privateKeyFile
- $publicKeyFile
Methods
protected
- generateClientAccessToken() — Generates a response with an access token using the client grant.
- getAuthorisationServer() — Setup the Authorization Server.
- getClientRequest() — Get PSR7 request object to be used for a client grant.
- getPrivateKeyPath() — Get the full path the private key.
- getPublicKeyPath() — Get the full path the public key.
- getResourceServer() — Get the resource server.
- tearDown() — Cleanup test environment.
public
- setUp() — Setup test environment.
- testAuthenticationException()
- testAuthoriseController()
- testClientGrant() — Test a client grant.
- testGraphQLClient()
- testGraphQLMember()
- testMiddleware()
- testPasswordGrant()
- testUserEntity()