[LMPLUGIN-3] Add possibility to pass auth method and token for the npm repository Created: 16/Mar/16  Updated: 19/Apr/16  Resolved: 21/Mar/16

Status: Closed
Project: Magnolia Light Module Maven Plugin
Component/s: None
Affects Version/s: None
Fix Version/s: 1.0

Type: Task Priority: Neutral
Reporter: Espen Jervidalo Assignee: Espen Jervidalo
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
dependency
is depended upon by MTE-78 Integrate light-module-maven-plugin i... Closed
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Sprint: Basel 36
Story Points: 0.5

 Description   

The current implementation uses nexus' user token obtained from ~/.m2/settings.xml to authenticate. When moving to nexus 3 MS7 we realized that this authentication method was not supported (yet). We would still like to use that method as soon as it's implemented, but for now, we will add the possibility to explicitly set the auth-method and the auth-token.

Usage before:

mvn deploy

Additionally you will be able to do:

mvn deploy -Dnpm.repo.url="https://nexustest/repository/npm-internal" -Dnpm.auth.realm="Bearer" -Dnpm.auth.token="a-b-c-d-x"

Known possibilities so far:
Realm: Bearer
Token: obtained by npm login --registry=https://nexustest/repository/npm-internal

Realm: Basic
Token: Base64-encoded "username:password"

Former: Bearer
Token: Base64 encoded "username:password" taken from ~/.m2/settings.xml (nexus' user-token)

References:
https://books.sonatype.com/nexus-book/reference/usertoken.html


Generated at Mon Feb 12 06:00:41 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.