bitexpert / composer-authstore-plugin
Composer Plugin providing an external auth store for storing your access credentials.
Installs: 20 768
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 12
Forks: 2
Open Issues: 0
Type:composer-plugin
Requires
- composer-plugin-api: 1.0.0
Requires (Dev)
- composer/composer: 1.*@dev
- mikey179/vfsstream: v1.2.0
- phpunit/phpunit: 4.0.*@stable
This package is not auto-updated.
Last update: 2022-02-01 12:29:59 UTC
README
Note: The plugin is deprecated! Use the built-in functionality in Composer instead!
What is the AuthStore Plugin?
The AuthStore plugin gives you the ability to store the credentials in a separate file. That way you do not need to enter your credentials every time you run composer.
Last year I was working on a PR for Composer which up to now is not merged in master. Kudos to Manuel Lemos from phpclasses.org for pointing out that the new Plugin API of Composer might help to apply the PR without patching Composer. As a result this plugin came alive.
How to use it?
Just add an auth.json
file in your project root (aside to your main composer.json
), which should look like this:
{ "config": { "basic-auth": { "satis.loc": { "username": "my_username", "password": "my_password" } } } }
Alternatively, you can store your auth.json
in COMPOSER_HOME
, so that authentication settings is available
for all your projects.
Note: Local
auth.json
always has precedence if a host is defined both locally and globally.
The composer.json of your root project all you need is to require the AuthStore plugin as a dependency:
{ "name": "my/mywebproject", "require": { "bitexpert/composer-authstore-plugin": "*" } }
You can also install the plugin globally which might be the better alternative as globally installed plugins are loaded before local project plugins are loaded.