Download the PHP package dennisharrison/laravel-auth0 without Composer

On this page you can find all versions of the php package dennisharrison/laravel-auth0. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-auth0

laravel-auth0

Laravel SDK for Auth0 Authentication and Management APIs.

Package Build License

:books: Feedback

Documentation

Getting Started

Requirements

Please review our support policy to learn when language and framework versions will exit support in the future.

Octane support is experimental and not advisable for use in production at this time.

Installation

Add the dependency to your application with Composer:

Configure Auth0

Create a Regular Web Application in the Auth0 Dashboard. Verify that the "Token Endpoint Authentication Method" is set to POST.

Next, configure the callback and logout URLs for your application under the "Application URIs" section of the "Settings" page:

Note the Domain, Client ID, and Client Secret. These values will be used during configuration later.

Publish SDK configuration

Use Laravel's CLI to generate an Auth0 configuration file within your project:

A new file will appear within your project, app/config/auth0.php. You should avoid making changes to this file directly.

Configure your .env file

Open the .env file within your application's directory, and add the following lines appropriate for your application type:

For Stateful Web Applications Provide a sufficiently long, random string for your `AUTH0_COOKIE_SECRET` using `openssl rand -hex 32`.
For Stateless Backend Applications

Setup your Laravel application

Integrating the SDK's Guard requires changes to your config\auth.php file.

To begin, find the defaults section. Set the default guard to auth0, like this:

Next, find the guards section, and add auth0 there:

Next, find the providers section, and add auth0 there as well:

Although it is enabled by default, now is a good time to ensure the StartSession middleware is enabled in your app/Http/Kernel.php file:

Add login to stateful web applications

For regular web applications that provide login and logout, we provide prebuilt route controllers to add to your app/routes/web.php file that will automatically handle your application's authentication flow with Auth0 for you:

Protect routes with middleware

This SDK includes middleware to simplify either authenticating (regular web applications) or authorizing (backend api applications) your Laravel routes, depending on your application type.

Stateful Web Applications These are for traditional applications that handle logging in and out. The `auth0.authenticate` middleware will check for an available user session and redirect any requests without one to the login route: The `auth0.authenticate.optional` middleware will check for an available user session, but won't reject or redirect requests without one, allowing you to treat such requests as "guest" requests: > Note that the `example.user.template` and `example.guest.templates` views are just examples and are not part of the SDK; replace these as appropriate for your application.
Stateless Backend Applications These are applications that accept an a Access Token through the 'Authorization' header of a request. The `auth0.authorize` middleware will resolve a Access Token and reject any request with an invalid token. The `auth0.authorize` middleware also allows you to optionally filter requests for access tokens based on scopes: The `auth0.authorize.optional` middleware will resolve an available Access Token, but won't block requests without one. This is useful when you want to treat tokenless requests as "guests":

Support Policy

Our support windows are determined by the Laravel release support and PHP release support schedules, and support ends when either the Laravel framework or PHP runtime outlined below stop receiving security fixes, whichever may come first.

SDK Version Laravel Version PHP Version Support Ends
7 9 8.1 Feb 2024
8.0 Nov 2023
8 8.1 Jan 2023
8.0 Jan 2023
6 8 8.1 Jan 2023
8.0 Jan 2023

Deprecations of EOL'd language or framework versions are not considered a breaking change, as Composer handles these scenarios elegantly. Legacy applications will stop receiving updates from us, but will continue to function on those unsupported SDK versions. Please ensure your PHP environment and Laravel framework dependencies always remain up to date.

Octane Support

Octane compatibility is currently considered experimental and unsupported.

Although we are working toward ensuring the SDK is fully compatible with this feature, we do not recommend using this with our SDK in production until we have full confidence and announced support. Due to the aggressive changes Octane makes to Laravel's core behavior, there is opportunity for problems we haven't fully identified or resolved yet.

Feedback and bug fix contributions are greatly appreciated as we work toward full. Octane support.

Feedback

Contributing

We appreciate feedback and contribution to this repo! Before you get started, please see the following:

Raise an issue

To provide feedback or report a bug, please raise an issue on our issue tracker.

Vulnerability Reporting

Please do not report security vulnerabilities on the public Github issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.


Auth0 Logo

Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?

This project is licensed under the MIT license. See the LICENSE file for more info.


All versions of laravel-auth0 with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
ext-mbstring Version *
auth0/auth0-php Version ^8.3.4
illuminate/contracts Version ^8.0 || ^9.0 || ^10.0
illuminate/http Version ^8.0 || ^9.0 || ^10.0
illuminate/support Version ^8.0 || ^9.0 || ^10.0
psr/cache Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dennisharrison/laravel-auth0 contains the following files

Loading the files please wait ....