<commit_before># Pinterest OAuth2 Provider for Laravel Socialite

## Documentation

Full documentation for using this provider can be found on Github
# Pinterest-Socialite

coucou<commit_msg>Add documentation<commit_after># Pinterest OAuth2 Provider for Laravel Socialite

## INSTALLATION

### 1. COMPOSER

// This assumes that you have composer installed globally
composer require mashuble/pinterest-socialite

### 2. SERVICE PROVIDER

Remove Laravel\Socialite\SocialiteServiceProvider from your providers[] array in config\app.php if you have added it already.

Add SocialiteProviders\Manager\ServiceProvider to your providers[] array in config\app.php.

For example:

'providers' => [
    // a whole bunch of providers
    // remove 'Laravel\Socialite\SocialiteServiceProvider',
    'SocialiteProviders\Manager\ServiceProvider', // add
];

Note: If you would like to use the Socialite Facade, you need to install it.
http://laravel.com/docs/5.0/authentication#social-authentication

### 3. ADD THE EVENT AND LISTENERS

Add SocialiteProviders\Manager\SocialiteWasCalled event to your listen[] array in <app_name>/Providers/EventServiceProvider.

Add your listeners (i.e. the ones from the providers) to the SocialiteProviders\Manager\SocialiteWasCalled[] that you just created.

The listener that you add for this provider is 'SocialiteProviders\WeixinWeb\PinterestExtendSocialite@handle',.

Note: You do not need to add anything for the built-in socialite providers unless you override them with your own providers.

For example:

/**
 * The event handler mappings for the application.
 *
 * @var array
 */
protected $listen = [
    `SocialiteProviders\Manager\SocialiteWasCalled` => [
        // add your listeners (aka providers) here
    ],
];

### 4. SERVICES ARRAY AND .ENV

Add to config/services.php.

'weixinweb' => [
    'client_id' => env('PINTEREST_KEY'),
    'client_secret' => env('PINTEREST_SECRET'),
    'redirect' => env('PINTEREST_REDIRECT_URI'),
],

Append provider values to your .env file

// other values above
PINTEREST_KEY=yourkeyfortheservice
PINTEREST_SECRET=yoursecretfortheservice
PINTEREST_REDIRECT_URI=https://example.com/login
{'fraction_non_alphanumeric': 0.08846688281611857, 'fraction_numerical': 0.0037054191755442334, 'mean_word_length': 4.729442970822281, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 10, 'https://': 1, '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': '2030412', 'n_tokens_mistral': 647, 'n_tokens_neox': 623, 'n_words': 205}