Skip to content

Commit

Permalink
Auto merge of #12714 - arlosi:cred-typos, r=weihanglo
Browse files Browse the repository at this point in the history
fix: typos in registry authentication documentation

r? `@weihanglo`
  • Loading branch information
bors committed Sep 20, 2023
2 parents 2607058 + 3401b89 commit d00b19d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/doc/src/reference/credential-provider-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Not a message by itself. Included in all messages sent by Cargo as the `registry
}
```

If the `token` field is set, than the credential provider should use the token provided. If
If the `token` field is set, then the credential provider should use the token provided. If
the `token` is not set, then the credential provider should prompt the user for a token.

In addition to the arguments that may be passed to the credential provider in
Expand Down Expand Up @@ -134,7 +134,7 @@ in the `args` field after any args from Cargo configuration.
The `token` will be sent to the registry as the value of the `Authorization` HTTP header.

`operation_independent` indicates whether the token can be cached across different
operations (such as publishing or fetching). In general this should be `true` unless
operations (such as publishing or fetching). In general, this should be `true` unless
the provider wants to generate tokens that are scoped to specific operations.

### Login success response
Expand Down Expand Up @@ -166,7 +166,7 @@ the provider wants to generate tokens that are scoped to specific operations.
}}
```
Sent if the credential provider is designed
to only handle specific registry URLs, and the given URL
to only handle specific registry URLs and the given URL
is not supported. Cargo will attempt another provider if
available.

Expand Down
8 changes: 4 additions & 4 deletions src/doc/src/reference/registry-authentication.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Registry Authentication
Cargo authenticates to registries with through credential providers. These
Cargo authenticates to registries with credential providers. These
credential providers are external executables or built-in providers that Cargo
uses to store and retrieve credentials.

Using alternative registries with authentication *requires* a credential provider to be configured
to avoid unknowningly storing unecrypted credentials on disk. For historical reasons, public
(non-authenticated) registres do not require credential provider configuration and the `cargo:token`
to avoid unknowingly storing unencrypted credentials on disk. For historical reasons, public
(non-authenticated) registries do not require credential provider configuration, and the `cargo:token`
provider is used if no providers are configured.

Cargo also includes platform-specific providers that use the operating system to securely store
Expand Down Expand Up @@ -106,6 +106,6 @@ In the config, add to (or create) `registry.global-credential-providers`:
global-credential-providers = ["cargo:token", "cargo-credential-1password --email you@example.com"]
```

The values in `global-credential-providers` are split on spaces to into path and command-line arguments. To
The values in `global-credential-providers` are split on spaces into path and command-line arguments. To
define a global credential provider where the path or arguments contain spaces, use
the [`[credential-alias]` table](config.md#credential-alias).

0 comments on commit d00b19d

Please sign in to comment.