Download the PHP package rs/socialite-healthcare-authenticator without Composer
On this page you can find all versions of the php package rs/socialite-healthcare-authenticator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rs/socialite-healthcare-authenticator
More information about rs/socialite-healthcare-authenticator
Files in rs/socialite-healthcare-authenticator
Package socialite-healthcare-authenticator
Short Description Socialite Healthcare Authenticator
License MIT
Homepage https://github.com/rs/socialite-healthcare-authenticator
Informations about the package socialite-healthcare-authenticator
Healthcare Authenticator
Allows for web portals for HCPs to seamlessly implement and maintain sign-on, authentication, and/or verification through integration with one of the world’s largest and most accurate sources of HCP data.
Installation
You can install the package via composer:
Installation & Basic Usage
Please see the Base Installation Guide, then follow the provider specific instructions below.
Add configuration to config/services.php
Add the API key for user consents and magic links.
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):
Can provide the locale using the with method.
Available methods for the returned user.
Professional Code
You can also retrieve the user's professional code using the getProfessionalCode
method.
This returns back a ProfessionalCode object. The professional code has a method for each professional code type.
``
The code is sourced from Onekey data. If unavailable, it defaults to the code provided during the signup process.
Consents
You can also retrieve the user's consents using the consents
method.
This returns back a Laravel collection.
Handling errors
When calling the user
method, the following exceptions may be thrown:
\RedSnapper\SocialiteProviders\HealthCareAuthenticator\UserNotFoundException
This exception is thrown when a user is not found in the Healthcare Authenticator system (404 response). It provides access to the user ID and response body.
\RedSnapper\SocialiteProviders\HealthCareAuthenticator\HealthCareAuthenticatorRequestException
This exception is thrown if the user cancels the sign-up process or fails to verify as an HCP.
\Laravel\Socialite\Two\InvalidStateException
This exception is thrown if the state returned by the HCA service does not match the state stored in the session.
\Illuminate\Http\Client\RequestException
This exception is thrown for other HTTP errors (500, 503, etc.).
Example exception handling:
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Param Dhaliwal
- All Contributors
License
The MIT License (MIT). Please see License File for more information.