aaronheath/oauth-client

A simple oauth2 client for use in my applications.

v1.0.0 2023-10-01 07:56 UTC

README

Build Status

Introduction

This is a personal package which provides a simple OAuth2 client. The client is issued with a static personal access token.

Installation

This package is installed via Composer.

Before installing, the repository must be added to the repositories section of the host projects composer.json.

"repositories": [
    {
        "type": "vcs",
        "url": "https://github.com/aaronheath/oauth-client"
    }
],

To install, run the following command.

composer require aaronheath/oauth-client

Then, publish the configuration file. A new file will be created at config/oauth-client.php

php artisan vendor:publish

Finally, at minimum you'll want to configure a default OAuth server by updating the projects .env file.

OAUTH_CLIENT_URL=https://example.com/oauth/token
OAUTH_CLIENT_ID=client_id
OAUTH_CLIENT_SECRET=client_secret

Additional OAuth hosts can be configured in the config file.