<commit_before><?php namespace GLGeorgiev\LaravelOAuth2Server;

use Illuminate\Support\ServiceProvider;
use Illuminate\Routing\Router;

use League\OAuth2\Server\AuthorizationServer;
use League\OAuth2\Server\ResourceServer;
use League\OAuth2\Server\Grant\AuthCodeGrant;
use League\OAuth2\Server\Grant\RefreshTokenGrant;
use League\OAuth2\Server\Entity\AccessTokenEntity;

use Auth;
use Config;
use Exception;
use Request;

class OAuthServerServiceProvider extends ServiceProvider {

    protected $defer = false;

    public function register()
    {
        //
    }

    public function boot(Router $router)
    {
        $authorizationServer = new AuthorizationServer();
        $authorizationServer->setSessionStorage(new Storage\SessionStorage());
        $authorizationServer->setAccessTokenStorage(new Storage\AccessTokenStorage());
        $authorizationServer->setRefreshTokenStorage(new Storage\RefreshTokenStorage());
        $authorizationServer->setClientStorage(new Storage\ClientStorage());
        $authorizationServer->setScopeStorage(new Storage\ScopeStorage());
        $authorizationServer->setAuthCodeStorage(new Storage\AuthCodeStorage());

        $authCodeGrant = new AuthCodeGrant();
        $authorizationServer->addGrantType($authCodeGrant);

        $refreshTokenGrant = new RefreshTokenGrant();
        $authorizationServer->addGrantType($refreshTokenGrant);

        $resourceServer = new ResourceServer(
            new Storage\SessionStorage(),
            new Storage\AccessTokenStorage(),<commit_msg>forgot the vendor publishing<commit_after><?php namespace GLGeorgiev\LaravelOAuth2Server;

use Illuminate\Support\ServiceProvider;
use Illuminate\Routing\Router;

use League\OAuth2\Server\AuthorizationServer;
use League\OAuth2\Server\ResourceServer;
use League\OAuth2\Server\Grant\AuthCodeGrant;
use League\OAuth2\Server\Grant\RefreshTokenGrant;
use League\OAuth2\Server\Entity\AccessTokenEntity;

use Auth;
use Config;
use Exception;
use Request;

class OAuthServerServiceProvider extends ServiceProvider {

    protected $defer = false;

    public function register()
    {
        $configPath = __DIR__ . '/../config/laravel-oauth2-server.php';
        $this->mergeConfigFrom($configPath, 'laravel-oauth2-server');
    }

    public function boot(Router $router)
    {
        $configPath = __DIR__ . '/../config/laravel-oauth2-server.php';
        $this->publishes([$configPath => config_path('laravel-oauth2-server.php')], 'config');

        $authorizationServer = new AuthorizationServer();
        $authorizationServer->setSessionStorage(new Storage\SessionStorage());
        $authorizationServer->setAccessTokenStorage(new Storage\AccessTokenStorage());
        $authorizationServer->setRefreshTokenStorage(new Storage\RefreshTokenStorage());
        $authorizationServer->setClientStorage(new Storage\ClientStorage());
        $authorizationServer->setScopeStorage(new Storage\ScopeStorage());
        $authorizationServer->setAuthCodeStorage(new Storage\AuthCodeStorage());

        $authCodeGrant = new AuthCodeGrant();
        $authorizationServer->addGrantType($authCodeGrant);

        $refreshTokenGrant = new RefreshTokenGrant();
        $authorizationServer->addGrantType($refreshTokenGrant);

        $resourceServer = new ResourceServer(
            new Storage\SessionStorage(),
            new Storage\AccessTokenStorage(),
{'fraction_non_alphanumeric': 0.10502958579881656, 'fraction_numerical': 0.004733727810650888, 'mean_word_length': 4.375198728139905, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '108959', 'n_tokens_mistral': 909, 'n_tokens_neox': 880, 'n_words': 151}