Uploaded image for project: 'Magnolia Light Module Maven Plugin'
  1. Magnolia Light Module Maven Plugin
  2. LMPLUGIN-3

Add possibility to pass auth method and token for the npm repository

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • Neutral
    • 1.0
    • None
    • None
    • Basel 36
    • 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

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                ejervidalo Espen Jervidalo
                ejervidalo Espen Jervidalo
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Task DoR