Download the PHP package sinema/gate-guardian without Composer
On this page you can find all versions of the php package sinema/gate-guardian. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sinema/gate-guardian
More information about sinema/gate-guardian
Files in sinema/gate-guardian
Package gate-guardian
Short Description Guard; Checks JWTs against different guard types; default is Zitadel
License MIT
Homepage https://github.com/SineMah/gate-guardian.git
Informations about the package gate-guardian
GateGuardian
- Requirements and limits
- Installation
- Usage
- Config
- Extending
Requirements
This package proofs an instance of Zitadel User authorizations with JWT. Make sure you configure Zitadel JWTs as access tokens and pass roles. It needs to track different authorization mechanics:
- Zitadel (PKCE)
- Custom Guards
Installation
Require sinema/gate-guardian and add GitHub repository in your composer.json
.
composer install
Publish config if you want to overwrite it. php artisan vendor:publish --tag=cloak-port-config
Usage
You still can extend the behavior with your own GuardType
. Make sure you implement GuardTypeContract
.
You are able to add your own Guards if you add a new GuardType
.
Define CloakPort in auth config & routes
in your auth.php
file:
in your routes/api.php
:
Config
key_identifier
Identify keycloak JWTs if any of the keys key_identifier
section match in your Bearer token payload.
guards
Loaded guards. The order direction affects the loading order of your guards. Keycloak and Passport User Guards will always have the highest priority since they are the strictest.
factory
Replace GuardType
with your own factory if needed. Keep in mind you still need coverage for keycloak
, passport_user
and passport_client
.
Extending
config
GuardType
TokenGuard
Overwrite any other public method like user
if needed.
All versions of gate-guardian with dependencies
laravel/framework Version ^10.0
sinema/json-api-error-laravel Version ^0.2
firebase/php-jwt Version ^6.4