From a344a320ecea233a8686e37dff44ce15f8852315 Mon Sep 17 00:00:00 2001 From: Ben Word Date: Wed, 11 Mar 2026 12:51:02 -0500 Subject: [PATCH] Add custom-headers Composer authentication type Document the new `custom-headers` auth type for Trellis, which allows private repositories using custom HTTP headers for authentication. Co-Authored-By: Claude Opus 4.6 --- trellis/composer-authentication.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/trellis/composer-authentication.md b/trellis/composer-authentication.md index 33da0704..d9429227 100644 --- a/trellis/composer-authentication.md +++ b/trellis/composer-authentication.md @@ -1,5 +1,5 @@ --- -date_modified: 2026-03-10 12:00 +date_modified: 2026-03-11 12:00 date_published: 2021-09-06 16:48 description: Set up Composer authentication in Trellis to access private packages, commercial plugins, and authenticated repositories during deployment. title: Composer Authentication @@ -38,6 +38,7 @@ Trellis supports authentication for multiple Composer repositories, via the Ansi | `gitlab-oauth` | GitLab OAuth token | | `gitlab-token` | GitLab personal/deploy token | | `bitbucket-oauth` | Bitbucket OAuth consumer key/secret | +| `custom-headers` | Custom HTTP header authentication | ## HTTP Basic @@ -118,6 +119,30 @@ vault_wordpress_sites: - { type: bitbucket-oauth, hostname: bitbucket.org, consumer_key: my-consumer-key, consumer_secret: my-consumer-secret } ``` +## Custom Headers + +For private repositories that use custom HTTP headers for authentication: + +```yaml +# group_vars//vault.yml + +vault_wordpress_sites: + example.com: + composer_authentications: + - { type: custom-headers, hostname: repo.example.org, headers: ["API-TOKEN: my-api-token"] } +``` + +Multiple headers can be specified: + +```yaml +# group_vars//vault.yml + +vault_wordpress_sites: + example.com: + composer_authentications: + - { type: custom-headers, hostname: repo.example.org, headers: ["API-TOKEN: my-api-token", "X-CUSTOM-HEADER: value"] } +``` + ## Multiple repositories Multiple private Composer repositories can be configured together: