PHPackages                             wg-hyve/cloak-port - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. wg-hyve/cloak-port

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

wg-hyve/cloak-port
==================

Guard; Checks JWTs against different guard types; default keycloak &amp; passport

0.0.12(1y ago)02.5k↓33.3%1MITPHPPHP ^8.2

Since Feb 14Pushed 1y ago1 watchersCompare

[ Source](https://github.com/wg-hyve/cloak-port)[ Packagist](https://packagist.org/packages/wg-hyve/cloak-port)[ Docs](https://github.com/wg-hyve/cloak-port)[ RSS](/packages/wg-hyve-cloak-port/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (17)Used By (0)

CloakPort
=========

[](#cloakport)

- [Requirements and limits](#requirements)
- [Installation](#installation)
- [Usage](#usage)
- [Config](#config)
- [Extending](#extending)

Requirements
------------

[](#requirements)

This package proofs instances of Keycloak, Passport Client and Passport User authorizations with JWT. It needs to track three different authorization mechanics:

- Keycloak
- Passport User
- Passport Client

### Keycloak

[](#keycloak)

Passport Client
---------------

[](#passport-client)

Regular client credentials grant

### Passport User

[](#passport-user)

Passport User is a client login with a determined user. (password grant)

Installation
------------

[](#installation)

Require wg-hyve/cloak-port and add GitHub repository in your `composer.json`.

```
composer require wg-hyve/cloak-port
```

Publish config if you want to overwrite it. `php artisan vendor:publish --tag=cloak-port-config`

Usage
-----

[](#usage)

Install Passport and Keycloak packages. It should work out of the box. 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 &amp; routes

[](#define-cloakport-in-auth-config--routes)

in your `auth.php` file:

```
