Download the PHP package laragear/multi-auth without Composer
On this page you can find all versions of the php package laragear/multi-auth. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laragear/multi-auth
More information about laragear/multi-auth
Files in laragear/multi-auth
Package multi-auth
Short Description Authenticate multiple Composer packages from the same host using different credentials.
License MIT
Informations about the package multi-auth
Laragear MultiAuth
Authenticate multiple Composer packages from the same host using different credentials.
Why this package?
Composer natively associates authentication credentials (like HTTP Basic, Bearer tokens, GitHub OAuth) with a single domain inside the auth.json file. If you have a private package registry serving multiple packages under the same domain (e.g. keygen.sh or github.com), you cannot easily use different credentials for different packages.
This plugin allows you to define authentication credentials per-package, overriding the default domain-based authentication, plus two useful authentication mechanisms:
Become a sponsor
Your support allows me to keep this package free, up-to-date, and maintainable. Alternatively, you can spread the word!
Requirements
- PHP 8.3 or later.
- Composer 2.0 or later.
Installation
Require this package globally or into your project using Composer:
[!IMPORTANT]
If you require this in your project, the plugin will be active only for a single Composer project.
Usage
Instead of manually editing your auth.json file, use the provided multi-auth:config command. The command accepts the package name, the authentication type, and the required credentials:
Authentication Types
The following authentication types are supported:
HTTP Basic
Standard HTTP Basic authentication.
Bearer Token
Standard Authorization Bearer token.
GitHub / GitLab
Token-based authentication for GitHub or Gitlab.
License Key
Adds a custom Authentication: License <KEY> header.
Custom Query Parameters
You can append custom query parameters to the package download URL. This is especially useful for passing tokens as URL parameters.
This will automatically append ?auth=license:{TOKEN} to the URL when Composer downloads vendor/package, where {TOKEN} is automatically resolved from your environment variables.
Global Configuration
If you want to apply the configuration globally across all your Composer projects, append the --global (or -g) flag.
[!NOTE]
This will only work if Multiauth was installed globally.
Environment Variables
You can use environment variables in any of your credentials too! Prefix the variable name with a $ sign. Append \ to avoid the shell replacing the variable name with an environment value.
When Composer downloads the package, the plugin will automatically resolve $MY_SECRET_TOKEN from your current environment.
Security
If you discover any security-related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see License File for more information.
All versions of multi-auth with dependencies
composer-plugin-api Version ^2.0