Table of Contents
    
    Constants
    
            - 
    CACERT
    
         = __DIR__ . '/../cacert.pem'                            
 
            - 
    PROJECT_ROOT
    
         = __DIR__ . '/../../'                            
 
            - 
    TEST_TOKEN
    
         = '{"access_token":"2YotnFZFEjr1zCsicMWpAA","token_type":"example","expires_in":3600,' . '"refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA","example_parameter":"example_value"}'                            
 
    
    Properties
    
            - 
    $provider
    
                         : Mastodon            
 
            - 
    $provider
    
                         : OAuth2Interface            
 
            - 
    $provider
    
                         : OAuthInterface            
 
            - 
    $ENV_IS_CI
    
                         : bool            
 
            - 
    $HTTP_CLIENT_FACTORY
    
                         : string            
 
            - 
    $logger
    
                         : LoggerInterface            
 
            - 
    $options
    
                         : OAuthOptions            
 
            - 
    $provider
    
                         : OAuthInterface            
 
            - 
    $reflection
    
                         : ReflectionClass            
 
            - 
    $storage
    
                         : OAuthStorageInterface            
 
    
    Methods
    
            - 
    arrayBodyProvider()
    
                                 : array<string|int, mixed>    
 
            - 
    requestTargetProvider()
    
                                 : array<string|int, mixed>    
 
            - 
    testCheckCSRFState()
    
                                 : void    
 
            - 
    testCheckCSRFStateEmptyException()
    
                                 : void    
 
            - 
    testCheckCSRFStateInvalidStateException()
    
                                 : void    
 
            - 
    testCheckCSRFStateMismatchException()
    
                                 : void    
 
            - 
    testCheckCSRFStateNotSupportedException()
    
                                 : mixed    
 
            - 
    testClientCredentialsTokenRequest()
    
                                 : void    
 
            - 
    testGetAccessTokenRequestBodyParams()
    
                                 : void    
 
            - 
    testGetAuthURL()
    
                                 : void    
 
            - 
    testGetAuthURLRequestParams()
    
                                 : void    
 
            - 
    testGetClientCredentialsNotSupportedException()
    
                                 : void    
 
            - 
    testGetClientCredentialsTokenRequestBodyParams()
    
                                 : void    
 
            - 
    testGetRefreshAccessTokenRequestBodyParams()
    
                                 : void    
 
            - 
    testGetRequestAuthorization()
    
                                 : void    
 
            - 
    testGetRequestBodyInvalidContentTypeException()
    
                                 : void    
 
            - 
    testGetRequestBodyWithArray()
    
                                 : void    
 
            - 
    testGetRequestBodyWithStreaminterface()
    
                                 : void    
 
            - 
    testGetRequestBodyWithString()
    
                                 : void    
 
            - 
    testGetRequestTarget()
    
                                 : void    
 
            - 
    testGetRequestTargetProviderMismatchException()
    
                                 : void    
 
            - 
    testMagicGet()
    
                                 : void    
 
            - 
    testOAuth2Instance()
    
                                 : void    
 
            - 
    testOAuthInstance()
    
                                 : void    
 
            - 
    testParseTokenResponse()
    
                                 : void    
 
            - 
    testParseTokenResponseErrorException()
    
                                 : void    
 
            - 
    testParseTokenResponseNoDataException()
    
                                 : void    
 
            - 
    testParseTokenResponseNoTokenException()
    
                                 : void    
 
            - 
    testParseTokenResponseWithScopes()
    
                                 : void    
 
            - 
    testProviderInstance()
    
                                 : void    
 
            - 
    testRefreshAccessTokenNoRefreshTokenException()
    
                                 : void    
 
            - 
    testRefreshAccessTokenNotSupportedException()
    
                                 : void    
 
            - 
    testSendAccessTokenRequest()
    
                                 : void    
 
            - 
    testSetCSRFState()
    
                                 : void    
 
            - 
    testSetCSRFStateNotSupportedException()
    
                                 : mixed    
 
            - 
    testSetInvalidInstance()
    
                                 : void    
 
            - 
    testTokenInvalidate()
    
                                 : void    
 
            - 
    getProviderFQCN()
    
                                 : string    
 
            - 
    getReflectionProperty()
    
                                 : mixed    
 
            - 
    initOptions()
    
                                 : OAuthOptions    
 
            - 
    initProvider()
    
                                 : OAuthInterface|OAuth1Interface|OAuth2Interface    
 
            - 
    initStorage()
    
                                 : OAuthStorageInterface    
 
            - 
    invokeReflection()
    
                                 : object    
 
            - 
    invokeReflectionMethod()
    
                                 : mixed    
 
            - 
    setReflectionProperty()
    
                                 : void    
 
            - 
    setUp()
    
                                 : void    
 
    
        
    
        
                    
    
        CACERT
        
    
    
    
    
    protected
        mixed
    CACERT
    = __DIR__ . '/../cacert.pem'
    
    
    
                    
    
        PROJECT_ROOT
        
    
    
    
    
    protected
        mixed
    PROJECT_ROOT
    = __DIR__ . '/../../'
    
    
    
                    
    
        TEST_TOKEN
        
    
    
    
    
    protected
        mixed
    TEST_TOKEN
    = '{"access_token":"2YotnFZFEjr1zCsicMWpAA","token_type":"example","expires_in":3600,' . '"refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA","example_parameter":"example_value"}'
    
    
    
            
        
    
        
                    
    
        $provider
        
        
                                
    
    
    
    
    public
        Mastodon
    $provider
    
    
    
    
                    
    
        $provider
        
        
                                
    
    
    
    
    public
        OAuth2Interface
    $provider
    
    
    
    
                    
    
        $provider
        
        
                                
    
    
    
    
    public
        OAuthInterface
    $provider
    
    
    
    
                    
    
        $ENV_IS_CI
        
        
                                
    
    
    
    
    protected
        bool
    $ENV_IS_CI
    
    
    
    
                    
    
        $HTTP_CLIENT_FACTORY
        
        
                                
    
    
    
    
    protected
        string
    $HTTP_CLIENT_FACTORY
     = \chillerlan\OAuthTest\Providers\ProviderUnitTestHttpClientFactory::class
    
    
    
                    
    
        $logger
        
        
                                
    
    
    
    
    protected
        LoggerInterface
    $logger
    
    
    
    
                    
    
        $options
        
        
                                
    
    
    
    
    protected
        OAuthOptions
    $options
    
    
    
    
                    
    
        $provider
        
        
                                
    
    
    
    
    protected
        OAuthInterface
    $provider
    
    
    
    
                    
    
        $reflection
        
        
                                
    
    
    
    
    protected
        ReflectionClass
    $reflection
    
    
    
    
                    
    
        $storage
        
        
                                
    
    
    
    
    protected
        OAuthStorageInterface
    $storage
    
    
    
    
            
            
        
                    
    
        arrayBodyProvider()
        
    
    
    
    
    public
            static        arrayBodyProvider() : array<string|int, mixed>
    
        
    
    
    
            
        Return values
        array<string|int, mixed>
            
                    
    
        requestTargetProvider()
        
    
    
    
    
    public
            static        requestTargetProvider() : array<string|int, mixed>
    
        
    
    
    
            
        Return values
        array<string|int, mixed>
            
                    
    
        testCheckCSRFState()
        
    
    
    
    
    public
                    testCheckCSRFState() : void
    
        
    
    
    
    
                    
    
        testCheckCSRFStateEmptyException()
        
    
    
    
    
    public
                    testCheckCSRFStateEmptyException() : void
    
        
    
    
    
    
                    
    
        testCheckCSRFStateInvalidStateException()
        
    
    
    
    
    public
                    testCheckCSRFStateInvalidStateException() : void
    
        
    
    
    
    
                    
    
        testCheckCSRFStateMismatchException()
        
    
    
    
    
    public
                    testCheckCSRFStateMismatchException() : void
    
        
    
    
    
    
                    
    
        testCheckCSRFStateNotSupportedException()
        
    
    
    
    
    public
                    testCheckCSRFStateNotSupportedException() : mixed
    
        
    
    
    
    
                    
    
        testClientCredentialsTokenRequest()
        
    
    
    
    
    public
                    testClientCredentialsTokenRequest() : void
    
        
    
    
    
    
                    
    
        testGetAccessTokenRequestBodyParams()
        
    
    
    
    
    public
                    testGetAccessTokenRequestBodyParams() : void
    
        
    
    
    
    
                    
    
        testGetAuthURL()
        
    
    
    
    
    public
                    testGetAuthURL() : void
    
        
    
    
    
    
                    
    
        testGetAuthURLRequestParams()
        
    
    
    
    
    public
                    testGetAuthURLRequestParams() : void
    
        
    
    
    
    
                    
    
        testGetClientCredentialsNotSupportedException()
        
    
    
    
    
    public
                    testGetClientCredentialsNotSupportedException() : void
    
        
    
    
    
    
                    
    
        testGetClientCredentialsTokenRequestBodyParams()
        
    
    
    
    
    public
                    testGetClientCredentialsTokenRequestBodyParams() : void
    
        
    
    
    
    
                    
    
        testGetRefreshAccessTokenRequestBodyParams()
        
    
    
    
    
    public
                    testGetRefreshAccessTokenRequestBodyParams() : void
    
        
    
    
    
    
                    
    
        testGetRequestAuthorization()
        
    
    
    
    
    public
                    testGetRequestAuthorization() : void
    
        
    
    
    
    
                    
    
        testGetRequestBodyInvalidContentTypeException()
        
    
    
    
    
    public
                    testGetRequestBodyInvalidContentTypeException() : void
    
        
    
    
    
    
                    
    
        testGetRequestBodyWithArray()
        
    
    
    
    
    public
                    testGetRequestBodyWithArray(array<string|int, mixed> $body, string $contentType, string $expected) : void
    
        
    
        Parameters
    
                    - 
                $body
                : array<string|int, mixed>
                            
 
            - 
                
            
 
                    - 
                $contentType
                : string
                            
 
            - 
                
            
 
                    - 
                $expected
                : string
                            
 
            - 
                
            
 
            
    
    
                    
    
        testGetRequestBodyWithStreaminterface()
        
    
    
    
    
    public
                    testGetRequestBodyWithStreaminterface() : void
    
        
    
    
    
    
                    
    
        testGetRequestBodyWithString()
        
    
    
    
    
    public
                    testGetRequestBodyWithString() : void
    
        
    
    
    
    
                    
    
        testGetRequestTarget()
        
    
    
    
    
    public
                    testGetRequestTarget(string $path, string $expected) : void
    
        
    
        Parameters
    
                    - 
                $path
                : string
                            
 
            - 
                
            
 
                    - 
                $expected
                : string
                            
 
            - 
                
            
 
            
    
    
                    
    
        testGetRequestTargetProviderMismatchException()
        
    
    
    
    
    public
                    testGetRequestTargetProviderMismatchException() : void
    
        
    
    
    
    
                    
    
        testMagicGet()
        
    
    
    
    
    public
                    testMagicGet() : void
    
        
    
    
    
    
                    
    
        testOAuth2Instance()
        
    
    
    
    
    public
                    testOAuth2Instance() : void
    
        
    
    
    
    
                    
    
        testOAuthInstance()
        
    
    
    
    
    public
                    testOAuthInstance() : void
    
        
    
    
    
    
                    
    
        testParseTokenResponse()
        
    
    
    
    
    public
                    testParseTokenResponse() : void
    
        
    
    
    
    
                    
    
        testParseTokenResponseErrorException()
        
    
    
    
    
    public
                    testParseTokenResponseErrorException() : void
    
        
    
    
    
    
                    
    
        testParseTokenResponseNoDataException()
        
    
    
    
    
    public
                    testParseTokenResponseNoDataException() : void
    
        
    
    
    
    
                    
    
        testParseTokenResponseNoTokenException()
        
    
    
    
    
    public
                    testParseTokenResponseNoTokenException() : void
    
        
    
    
    
    
                    
    
        testParseTokenResponseWithScopes()
        
    
    
    
    
    public
                    testParseTokenResponseWithScopes() : void
    
        
    
    
    
    
                    
    
        testProviderInstance()
        
    
    
    
    
    public
                    testProviderInstance() : void
    
        
    
    
    
    
                    
    
        testRefreshAccessTokenNoRefreshTokenException()
        
    
    
    
    
    public
                    testRefreshAccessTokenNoRefreshTokenException() : void
    
        
    
    
    
    
                    
    
        testRefreshAccessTokenNotSupportedException()
        
    
    
    
    
    public
                    testRefreshAccessTokenNotSupportedException() : void
    
        
    
    
    
    
                    
    
        testSendAccessTokenRequest()
        
    
    
    
    
    public
                    testSendAccessTokenRequest() : void
    
        
    
    
    
    
                    
    
        testSetCSRFState()
        
    
    
    
    
    public
                    testSetCSRFState() : void
    
        
    
    
    
    
                    
    
        testSetCSRFStateNotSupportedException()
        
    
    
    
    
    public
                    testSetCSRFStateNotSupportedException() : mixed
    
        
    
    
    
    
                    
    
        testSetInvalidInstance()
        
    
    
    
    
    public
                    testSetInvalidInstance() : void
    
        
    
    
    
    
                    
    
        testTokenInvalidate()
        
    
    
    
    
    public
                    testTokenInvalidate() : void
    
        
    
    
    
    
                    
    
        getProviderFQCN()
        
    
    
    
    
    protected
                    getProviderFQCN() : string
    
        
    
    
    
            
                    
    
        getReflectionProperty()
        
    
    
    
    
    protected
        final            getReflectionProperty(string $property) : mixed
    
        
    
        Parameters
    
                    - 
                $property
                : string
                            
 
            - 
                
            
 
            
    
    
                    
    
        initOptions()
        
    
    
    
    
    protected
                    initOptions() : OAuthOptions
    
        
    
    
    
            
                    
    
        initProvider()
        
    
    
    
    
    protected
                    initProvider(string $FQCN) : OAuthInterface|OAuth1Interface|OAuth2Interface
    
        
    
        Parameters
    
                    - 
                $FQCN
                : string
                            
 
            - 
                
            
 
            
    
            
                    
    
        initStorage()
        
    
    
    
    
    protected
                    initStorage(OAuthOptions $options) : OAuthStorageInterface
    
        
    
        Parameters
    
                    - 
                $options
                : OAuthOptions
                            
 
            - 
                
            
 
            
    
            
                    
    
        invokeReflection()
        
    
    
    
    
    protected
        final            invokeReflection(string $FQCN[, array<string|int, mixed> $args = [] ]) : object
    
        
    
        Parameters
    
                    - 
                $FQCN
                : string
                            
 
            - 
                
            
 
                    - 
                $args
                : array<string|int, mixed>
                 = []            
 
            - 
                
            
 
            
    
            
                    
    
        invokeReflectionMethod()
        
    
    
    
    
    protected
        final            invokeReflectionMethod(string $method[, array<string|int, mixed> $args = [] ]) : mixed
    
        
    
        Parameters
    
                    - 
                $method
                : string
                            
 
            - 
                
            
 
                    - 
                $args
                : array<string|int, mixed>
                 = []            
 
            - 
                
            
 
            
    
    
                    
    
        setReflectionProperty()
        
    
    
    
    
    protected
        final            setReflectionProperty(string $property, mixed $value) : void
    
        
    
        Parameters
    
                    - 
                $property
                : string
                            
 
            - 
                
            
 
                    - 
                $value
                : mixed
                            
 
            - 
                
            
 
            
    
    
                    
    
        setUp()
        
    
    
    
    
    protected
                    setUp() : void