Download the PHP package aysnc/composer-env-auth without Composer

On this page you can find all versions of the php package aysnc/composer-env-auth. 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 composer-env-auth

Composer Environment Authentication Plugin

Maintenance

Streamline your Composer authentication with environment variables

Are you managing separate .env files alongside auth.json files for your Composer authentication? This plugin eliminates that redundancy by bringing industry-standard environment variable support directly to Composer's authentication system.

While we await native environment variable support in Composer core, this plugin bridges the gap by allowing you to store all your authentication credentials securely in environment variables — just like every other modern development tool.

Features

Installation

Install the plugin as a development dependency in your project. Do this before installing any plugins:

Quick Start

  1. Add authentication configuration to your composer.json:

  2. Set your credentials in your .env file:

  3. Run Composer commands as usual:

The plugin automatically applies your environment-based authentication!

Configuration Examples

HTTP Basic Authentication (Generic)

GitHub Personal Access Token

GitLab Private Token

Multiple Repositories

How It Works

  1. Plugin Activation: Automatically activated when Composer initializes
  2. Configuration Discovery: Scans composer.json for repositories with aysnc/env-auth options
  3. Environment Resolution: Resolves variables from system environment and .env files
  4. Authentication Configuration: Dynamically configures Composer's authentication system
  5. Seamless Integration: Standard Composer commands operate with authenticated access

CI/CD Pipeline Integration

The plugin seamlessly integrates with CI/CD environments where .env files may not be present:

System environment variables are automatically detected and utilized without requiring local .env files.

Environment Variable Priority

The plugin resolves environment variables in the following order of precedence:

  1. System environment variables ($_ENV, $_SERVER) - highest priority
  2. Variables from .env file in your project root - fallback

This hierarchy ensures that system-level configuration (such as CI/CD pipeline variables) takes precedence over local development settings, while maintaining backwards compatibility with existing .env file workflows.

Supported Authentication Types

Service Configuration Environment Variable Format
Generic {"username": "USER_VAR", "password": "PASS_VAR"} Username/Password or Token
GitHub "GITHUB_TOKEN" Personal Access Token
GitLab "GITLAB_TOKEN" Private Token

Why This Plugin?

The Challenge: Traditional Composer authentication requires maintaining separate auth.json files alongside application .env configurations, resulting in:

Our Solution: This plugin aligns Composer with industry-standard practices by implementing comprehensive environment variable support for authentication workflows.

Looking Forward: While we anticipate eventual native environment variable support in Composer core, this plugin provides an immediate, production-ready solution that standardizes authentication practices across modern development workflows.


All versions of composer-env-auth with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
composer-plugin-api Version ^2.0
vlucas/phpdotenv Version ^5.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 aysnc/composer-env-auth contains the following files

Loading the files please wait ...