Download the PHP package codewiser/socialiteprovider without Composer
On this page you can find all versions of the php package codewiser/socialiteprovider. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download codewiser/socialiteprovider
More information about codewiser/socialiteprovider
Files in codewiser/socialiteprovider
Package socialiteprovider
Short Description Zenit OAuth2 Provider for Laravel Socialite
License MIT
Informations about the package socialiteprovider
Zenit
Installation & Basic Usage
Please see the Base Installation Guide, then follow the provider specific instructions below.
Add configuration to config/services.php
Add provider event listener
Configure the package's listener to listen for SocialiteWasCalled
events.
Add the event to your listen[]
array in app/Providers/EventServiceProvider
.
See the Base Installation Guide for
detailed instructions.
Usage
You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):
Returned User fields
id
nickname
name
email
avatar
Access Token
Access Token is now an object, not just a string.
Error Response
Package provides response error handling compliant to rfc6749.
Token Introspection
Package provides token introspection compliant to rfc7662.
Get user using existing token
Refreshing Token
Client Token
Token by username and password
Token by custom grant
Manage client
Package provides remote client management compliant to rfc7592. It allows to read OAuth client properties...
...and update it programmatically:
Token authorization
Register auth driver, that would authorize incoming requests with bearer tokens, issued by oauth server.
Next, register driver for the guard:
Usually, _accesstoken associated with a user, but
client_credentials
_accesstoken is not. Such _accesstoken associated
with oauth client only.
So, the Authenticatable
may be
as App\User
,
as SocialiteProviders\Zenit\Auth\Client
class.
We expect that User
implements Laravel\Sanctum\Contracts\HasApiTokens
,
as Client
implements it too. If so, the Authenticatable
will be injected
with incoming token (aka current access token).
Current access token implements Laravel\Sanctum\Contracts\HasAbilities
interface, so you may inspect its scopes and abilities.
As current access token looks and behave like Sanctum
token, we may
protect routes with Laravel\Sanctum\Http\Middleware\CheckAbilities
or
Laravel\Sanctum\Http\Middleware\CheckForAnyAbility
middlewares, as
described in
official documentation.
All versions of socialiteprovider with dependencies
ext-json Version *
socialiteproviders/manager Version ~4.0
league/oauth2-client Version ^2.7
laravel/framework Version >=10.0
laravel/sanctum Version >=3.0