Download the PHP package auth0/symfony without Composer

On this page you can find all versions of the php package auth0/symfony. 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 symfony

auth0/symfony

Symfony SDK for Auth0 Authentication and Management APIs.

:books: Feedback

Documentation

Getting Started

Requirements

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

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 later.

Configure the SDK

After installation, you should find a new file in your application, config/packages/auth0.yaml. If this file isn't present, please create it manually.

The following is an example configuration that will use environment variables to assign values. You should avoid storing sensitive credentials directly in this file, as it will often be committed to version control.

Configure your .env file

Create or open a .env.local file within your application directory, and add the following lines:

Please ensure this .env.local file is included in your .gitignore. It should never be committed to version control.

Configure your security.yaml file

Open your application's config/packages/security.yaml file, and update it based on the following example:

Update your config/bundle.php

The SDK bundle should be automatically detected and registered by Symfony Flex projects, but you may need to add the Auth0Bundle to your application's bundle registry. Either way, it's a good idea to register the bundle anyway, just to be safe.

Optional: Add Authentication helper routes

The SDK includes a number of pre-built HTTP controllers that can be used to handle authentication. These controllers are not required, but can be helpful in getting started. In many cases, these may provide all the functionality you need to integrate Auth0 into your application, providing a plug-and-play solution.

To use these, open your application's config/routes.yaml file, and add the following lines:

Recommended: Configure caching

The SDK provides two caching properties in it's configuration: token_cache and management_token_cache. These are compatible with any PSR-6 cache implementation, of which Symfony offers several out of the box.

These are used to store JSON Web Key Sets (JWKS) results for validating access token signatures and generated management API tokens, respectively. We recommended configuring this feature to improve your application's performance by reducing the number of network requests the SDK needs to make. It will also greatly help in avoiding hitting rate-limiting conditions, if you're making frequent Management API requests.

The following is an example config/packages/cache.yaml file that would configure the SDK to use a Redis backend for caching:

Please review the Symfony cache documentation for adapter-specific configuration options. Please note that the SDK does not currently support Symfony's "Cache Contract" adapter type.

Example: Retrieving the User

The following example shows how to retrieve the authenticated user within a controller. For this example, we'll create a mock ExampleController class that is accessible from a route at /private.

Add a route to your application's config/routes.yaml file:

Now update or create a src/Controller/ExampleController.php class to include the following code:

If you visit the /private route in your browser, you should see the authenticated user's details. If you are not already authenticated, you will be redirected to the /login route to login, and then back to /private afterward.

Support Policy

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

SDK Version Symfony Version PHP Version Support Ends
5.3 7.0* 8.2 Jul 31 2024
5 6.2 8.2 Jul 31 2023
8.1 Jul 31 2023
6.1 8.2 Jan 31 2023
8.1 Jan 31 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.

Note: We do not currently support Symfony LTS versions, but anticipate adding support for this when Symfony's 6.x branch enters it's LTS window.

Note: Symfony 7 support is community-contributed, and currently considered experimental.

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 symfony with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
ext-json Version *
ext-mbstring Version *
ext-openssl Version *
auth0/auth0-php Version ^8.11
symfony/cache Version ^6.4 || ^7.0
symfony/framework-bundle Version ^6.4 || ^7.0
symfony/security-bundle Version ^6.4 || ^7.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 auth0/symfony contains the following files

Loading the files please wait ....