tokenly / tokenpass-client
A Laravel package for applications that wish to use Tokenly Tokenpass for user authentication.
Installs: 8 380
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 6
Forks: 7
Open Issues: 0
Requires
- php: >=7.0.0
- laravel/socialite: ^3
- tokenly/api-client: ^1.0.6
- tokenly/laravel-event-log: ^3.1
Requires (Dev)
- phpunit/phpunit: ~4
README
A Laravel package for applications that wish to use Tokenpass for user authentication.
Installation
Add the Laravel package via composer
composer require tokenly/tokenpass-client
Configuration
Install the views by running this command:
artisan tokenpass:make-auth
Set the following environment variables. You will need a client id and client secret generated by Tokenpass.
TOKENPASS_CLIENT_ID="123456789"
TOKENPASS_CLIENT_SECRET=Kyours3c4etKeYH3re23mste0xmPdSja36aXLd02
TOKENPASS_PROVIDER_HOST=https://tokenpass.tokenly.com
Additional Installation Steps
- follow the tokenly/laravel-api-provider installation steps
- The application container must resolve the interface
TokenpassUserRespositoryContract
. It defaults toApp\Repositories\UserRepository
. - Add the
Tokenly\TokenpassClient\Concerns\FindsByTokenpassUuid
trait to the UserRepository to implement the lookup by tokenly uuid. - run
artisan migrate
(orartisan migrate --step
) to add the necessary fields to the users table - make sure
config/auth.php
points to the currectUser
model class - your
User
class should implementAPIPermissionedUserContract