npm

package
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var REALM = identity.REALM

Functions

func Authorize

func Authorize(req *http.Request, ctx cpi.ContextProvider, repoUrl string, pkgName string)

Authorize the given request with the bearer token for the given repository URL and package name. If the token is empty (login failed or credentials not found), it will not be set.

func BearerToken

func BearerToken(ctx cpi.ContextProvider, repoUrl string, pkgName string) (string, error)

BearerToken retrieves the bearer token for the given repository URL and package name. Either it's setup in the credentials or it will login to the registry and retrieve it.

func Login

func Login(registry string, username string, password string, email string) (string, error)

Login to npm registry (URL) and retrieve bearer token.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL