Download the PHP package lanos/laravel-auth0-multi-tenancy-management without Composer
On this page you can find all versions of the php package lanos/laravel-auth0-multi-tenancy-management. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lanos/laravel-auth0-multi-tenancy-management
More information about lanos/laravel-auth0-multi-tenancy-management
Files in lanos/laravel-auth0-multi-tenancy-management
Package laravel-auth0-multi-tenancy-management
Short Description Offers a collection of elegant interface classes to Auth0 Management API
License MIT
Informations about the package laravel-auth0-multi-tenancy-management
Laravel Auth0 Multi Tenancy Management
This is deprecated now as since first creating this Auth0 improved their SDK to include comprheensive Admin API support.
Intro
This package was built to sit alongside the main auth0 package. Unfortunately that package has limited management API capabilities / facades. This package aims to remedy that.
Progress
So far the following items are working:
- Authentication
- User Management
- Branding Management
- Organization Management
As I complete other modules, they will be listed above. If anyone from Auth0 wishes to merge this extra functionality into the main package, please feel free to fork and extract what you need, all I ask is to be credited.
Documentation Notes
More comprehensive documentation will be written eventually, I'm working on this in my spare time, so you'll need ot bare with me.
For now i'll explain the simple premise. I've essentially created static functions for each endpoint on the API documentation.
Data Formatting
Unless specified otherwise, all POST endpoints that require body data should be posted exactly as outlined in the corresponding documentation (you can post it as an associated array and the package will convert it to JSON). The same goes for query parameters, all is exactly as the documentation
Authentication Setup
You will need a machine to machine application (client) set up within your auth0 tenant that has management api access. Ideally you should use an application that only accesses the management API, that way any tokens generated from these interactions will not eat into your M2M quote.
You can just set these in .env as follows:
`
The reason for the slightly different env variables is that you may wish to use a separate application to authenticate your users and act as your API. Which is recommended as stated above due to token quotas.
Examples
Once you have added the .env variables you should be good to go. When you make your first request, the package will automatically get a token using the above credentials and store it in cache. Any subsequent requests will not require this unless of course the token has expired, then the package will get a new token.
Each of the endpoint entities is available as an importable class. Given the generic nature of the class naming conventions, it seemed controversial to create these as pre-imported facades as they may conflict with other packages.
Once I have more time I will explore this, for now it's no harm to import the class.
Get Users
`
Get User Organizations
Gets the tenants / organizations a user belongs to. Handy for multi tenant applications. Again, has the same pagination query param options.
`
Add Users To An Organization
`
License
Please refer to LICENSE.md for this project's license.
All versions of laravel-auth0-multi-tenancy-management with dependencies
guzzlehttp/guzzle Version ^7.0.1
illuminate/console Version ^8.37|^9.0
illuminate/contracts Version ^8.37|^9.0
illuminate/database Version ^8.37|^9.0
laravel/framework Version ^8.37|^9.0
illuminate/http Version ^8.37|^9.0
illuminate/log Version ^8.37|^9.0
illuminate/notifications Version ^8.37|^9.0
illuminate/routing Version ^8.37|^9.0
illuminate/support Version ^8.37|^9.0
illuminate/view Version ^8.37|^9.0