protected function createAuthorizationServer(Container $container, array $config)
    {
        // TODO: Support scopes

        $authorizationServer = $container->make(AuthorizationServer::class);

        $authorizationServer->setSessionStorage($container->make(SessionInterface::class));
        $authorizationServer->setAccessTokenStorage($container->make(AccessTokenInterface::class));
        $authorizationServer->setRefreshTokenStorage($container->make(RefreshTokenInterface::class));
        $authorizationServer->setClientStorage($container->make(ClientInterface::class));
        $authorizationServer->setScopeStorage($container->make(ScopeInterface::class));
        $authorizationServer->setAuthCodeStorage($container->make(AuthCodeInterface::class));

        $this->configureAuthorizationServer($authorizationServer, $config);

        return $authorizationServer;
    }
protected function createAuthorizationServer(Container $container, array $config)
    {
        // TODO: Support scopes

        $authorizationServer = $container->make(AuthorizationServer::class);

        $authorizationServer->setSessionStorage($container->make(SessionInterface::class));
        $authorizationServer->setAccessTokenStorage($container->make(AccessTokenInterface::class));
        $authorizationServer->setRefreshTokenStorage($container->make(RefreshTokenInterface::class));
        $authorizationServer->setClientStorage($container->make(ClientInterface::class));
        $authorizationServer->setScopeStorage($container->make(ScopeInterface::class));
        $authorizationServer->setAuthCodeStorage($container->make(AuthCodeInterface::class));

        $this->configureAuthorizationServer($authorizationServer, $config);

        return $authorizationServer;
    }
protected function createAuthorizationServer ( Container $ container , array $ config ) { // TODO: Support scopes $ authorizationServer = $ container -> make ( AuthorizationServer :: class ) ; $ authorizationServer -> setSessionStorage ( $ container -> make ( SessionInterface :: class ) ) ; $ authorizationServer -> setAccessTokenStorage ( $ container -> make ( AccessTokenInterface :: class ) ) ; $ authorizationServer -> setRefreshTokenStorage ( $ container -> make ( RefreshTokenInterface :: class ) ) ; $ authorizationServer -> setClientStorage ( $ container -> make ( ClientInterface :: class ) ) ; $ authorizationServer -> setScopeStorage ( $ container -> make ( ScopeInterface :: class ) ) ; $ authorizationServer -> setAuthCodeStorage ( $ container -> make ( AuthCodeInterface :: class ) ) ; $ this -> configureAuthorizationServer ( $ authorizationServer , $ config ) ; return $ authorizationServer ; }
Creates the authorization instance.

@param Container $container
@param array     $config

@return AuthorizationServer
@throws Exception
Creates the authorization instance .