protected function createServer(): ResourceServer
    {
        // Init our repositories
        $accessTokenRepository = new AccessTokenRepository(); // instance of AccessTokenRepositoryInterface

        // Path to authorization server's public key
        $publicKeyPath = Environment::getEnv('OAUTH_PUBLIC_KEY_PATH');

        // Relative paths to the web root
        $publicKeyPath = str_replace('{BASE_DIR}', Director::baseFolder(), $publicKeyPath);

        // Setup the authorization server
        return new ResourceServer(
            $accessTokenRepository,
            $publicKeyPath
        );
    }
protected function createServer(): ResourceServer
    {
        // Init our repositories
        $accessTokenRepository = new AccessTokenRepository(); // instance of AccessTokenRepositoryInterface

        // Path to authorization server's public key
        $publicKeyPath = Environment::getEnv('OAUTH_PUBLIC_KEY_PATH');

        // Relative paths to the web root
        $publicKeyPath = str_replace('{BASE_DIR}', Director::baseFolder(), $publicKeyPath);

        // Setup the authorization server
        return new ResourceServer(
            $accessTokenRepository,
            $publicKeyPath
        );
    }
protected function createServer ( ) : ResourceServer { // Init our repositories $ accessTokenRepository = new AccessTokenRepository ( ) ; // instance of AccessTokenRepositoryInterface // Path to authorization server's public key $ publicKeyPath = Environment :: getEnv ( 'OAUTH_PUBLIC_KEY_PATH' ) ; // Relative paths to the web root $ publicKeyPath = str_replace ( '{BASE_DIR}' , Director :: baseFolder ( ) , $ publicKeyPath ) ; // Setup the authorization server return new ResourceServer ( $ accessTokenRepository , $ publicKeyPath ) ; }
Create a default ResourceServer. Used if one isn't provided.

@return ResourceServer
Create a default ResourceServer . Used if one isn t provided .