Download the PHP package jeffersongoncalves/laravel-oidc without Composer

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

![Laravel OIDC](https://raw.githubusercontent.com/jeffersongoncalves/laravel-oidc/master/art/jeffersongoncalves-laravel-oidc.png)

Laravel OIDC

Latest Version on Packagist Total Downloads GitHub Tests Action Status GitHub Code Style Action Status

Laravel OIDC adds first-class OpenID Connect support to Laravel by registering a custom Laravel Socialite driver named oidc. Unlike vanilla Socialite — which covers OAuth 2.0 but stops at the userinfo step — this package implements the OIDC pieces Socialite leaves out: discovery (/.well-known/openid-configuration), JWKS-based id_token validation, nonce-based replay protection, and PKCE.

It is designed for multi-tenant SaaS: configuration is supplied at runtime, so each tenant can connect its own Azure AD, Okta, Auth0, Google Workspace, Keycloak, or any other spec-compliant OpenID Provider.

Compatibility

Package Laravel PHP
1.x 11.x, 12.x, 13.x 8.2, 8.3, 8.4

Why?

Laravel Socialite ships drivers for fixed providers (GitHub, Google, etc.) and a small set of OAuth 2.0 helpers. It does not:

This package adds those pieces while staying inside the Socialite mental model: you still call Socialite::driver('oidc')->redirect() and ->user().

Installation

Optionally publish the config file:

Configuration

The package works out of the box. For single-tenant apps, set the default IdP in .env:

For multi-tenant apps, leave the default block empty and supply an OidcConfig at runtime (see below).

Usage

Single-tenant (config from .env)

Multi-tenant (runtime config)

On callback:

HasOidcConfig trait for tenant models

If you store IdP configuration on a model (a typical multi-tenant pattern), drop in the trait. It expects columns issuer_url, client_id, client_secret (cast to encrypted), redirect_uri, and an optional scopes JSON column.

Discovery without Socialite

Supported Identity Providers

Any IdP that publishes a .well-known/openid-configuration discovery document and signs id_tokens with one of the allowed algorithms (RS256, RS384, RS512, ES256, ES384) will work. Examples:

IdP Issuer URL example
Azure AD / Entra ID https://login.microsoftonline.com/{tenant-id}/v2.0
Google Workspace https://accounts.google.com
Okta https://{your-org}.okta.com
Auth0 https://{your-tenant}.auth0.com/
Keycloak https://{host}/realms/{realm}
Ping Identity https://{environment}.pingone.com/{environment-id}/as

Security

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Pull requests are welcome. Please make sure tests, PHPStan and Pint all pass before opening a PR:

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-oidc with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
firebase/php-jwt Version ^6.10|^7.0
guzzlehttp/guzzle Version ^7.8
illuminate/contracts Version ^11.0|^12.0|^13.0
illuminate/support Version ^11.0|^12.0|^13.0
laravel/socialite Version ^5.10
spatie/laravel-package-tools Version ^1.16
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 jeffersongoncalves/laravel-oidc contains the following files

Loading the files please wait ...