bitexpert/composer-authstore-plugin

This package is abandoned and no longer maintained. No replacement package was suggested.

Composer Plugin providing an external auth store for storing your access credentials.

0.2.2 2014-06-29 10:53 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:29:59 UTC


README

Build Status

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.