Skip to content

Handles connections between Laravel and the Truckspace ID service.

License

Notifications You must be signed in to change notification settings

truckspace/laravel-walkway

Repository files navigation

Build Status Total Downloads Latest Stable Version License

Introduction

Laravel Walkway aims to provide a simple and intuitive interface for authenticating with the Truckspace ID OAuth server.

Using Laravel Walkway

Installation

To get started, install Walkway using Composer:

composer require truckspace/laravel-walkway

Next, publish Walkways's resources:

php artisan vendor:publish --provider="Truckspace\Walkway\WalkwayServiceProvider"

This command will publish Walkways's config file and default migrations.

Next, you should migrate your database:

php artisan migrate

Socialite Provider

Laravel Socialite provides a simple way to authenticate with OAuth providers. Walkway provides a Truckspace driver to make authentication as easy as possible.

To use the Truckspace socialite driver, you will need to create an application on the Truckspace ID developers page. These credentails should then be placed in your config/services.php configuration file:

'truckspace' => [
    'client_id' => env('TRUCKSPACE_CLIENT_ID'),
    'client_secret' => env('TRUCKSPACE_CLIENT_SECRET'),
    'redirect' => env('TRUCKSPACE_REDIRECT_URI'),
],

Finally, add the following environment varables:

# Truckspace OAuth
TRUCKSPACE_BASE_URL=
TRUCKSPACE_CLIENT_ID=
TRUCKSPACE_CLIENT_SECRET=
TRUCKSPACE_REDIRECT_URI=

You can now use the Truckspace socialite driver like any other driver:

Socialite::driver('truckspace');

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.

About

Handles connections between Laravel and the Truckspace ID service.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages