composer require chillrend/pnj-socialite-provider
Please see the Base Installation Guide, then follow the provider specific instructions below.
'pnj' => [
'client_id' => env('CLIENT_ID'),
'client_secret' => env('CLIENT_SECRET'),
'redirect' => env('REDIRECT_URI')
],
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.
protected $listen = [
\SocialiteProviders\Manager\SocialiteWasCalled::class => [
// ... other providers
'SocialiteProviders\\PNJ\\PNJExtendSocialite@handle',
],
];
You should now be able to use the provider like you would regularly use Socialite (assuming you have the facade installed):
return Socialite::driver('pnj')->redirect();
sub
the system internal ID of a userident
the user's internal identification number (can be a NIP (Nomor Induk Pegawai) or NIM (Nomor Induk Mahasiswa) depends on the access level of the user)name
the user's full nameemail
the user's email addressaddress
the user's home addressdate_of_birth
the user's date of birthdepartment_and_level
the user's access level and the user's department (in array)access_level
the user's access level in a departmentaccess_level_name
the 'human readable' representation of the access leveldepartment
the user's departmentdepartment_short_name
the department short abbreviation or name
JSON Representative of the user fields
{
"address": "187 Justen Point Suite 090\nWest Shania, TX 99746-9546",
"date_of_birth": "1979-03-14",
"department_and_level": [
{
"access_level": 99,
"access_level_name": "Admin",
"department": "Teknik Informatika dan Komputer",
"department_short_name": "TIK"
}
],
"email": "[email protected]",
"iat": 1622287930,
"ident": 80779,
"name": "Prof. Ivory Ferry",
"sub": "4"
}