robsontenorio / laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel
MIT License
434 stars 141 forks source link

feat: support token via query param or input key #64

Closed AubreyHewes closed 2 years ago

AubreyHewes commented 2 years ago

Hi, I could not find if this issue has been discussed before.

Synopsis

Currently this project only supports sending the access token via authorization header (bearer token). I have a use case where we also need to support sending the access token via query param / form input.

Solution

This PR allows sending the access token via a get query param or from the input data. The solution is based on the default Laravel TokenGuard.

The api_token param can be set via the configuration using the key input_key.

Could have

Possibly can be enhanced to allow disabling (or opt in) via config.


Fixes #63

robsontenorio commented 2 years ago

Resolved by #77