# `NPM.Registry.Token`
[🔗](https://github.com/elixir-volt/npm_ex/blob/v0.7.4/lib/npm/registry/token.ex#L1)

Manages npm authentication tokens.

Handles reading, validating, and masking auth tokens used
for private registry access.

# `auth_header`

```elixir
@spec auth_header(String.t()) :: String.t()
```

Returns the auth header value for the given token.

# `configured?`

```elixir
@spec configured?() :: boolean()
```

Checks if a valid auth token is configured.

# `mask`

```elixir
@spec mask(String.t()) :: String.t()
```

Masks a token for safe display.

Shows only the first and last 4 characters.

# `parse_npmrc`

```elixir
@spec parse_npmrc(String.t()) :: String.t() | nil
```

Reads token from an .npmrc file content.

# `read`

```elixir
@spec read() :: String.t() | nil
```

Reads the auth token from environment or .npmrc.

# `valid_format?`

```elixir
@spec valid_format?(String.t()) :: boolean()
```

Validates token format.

npm tokens are typically UUIDs or base64-encoded strings.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
