Skip to content

Commit de1d657

Browse files
Clarify API host authentication behavior
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
1 parent 50ccff8 commit de1d657

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

pkg/api/client_options.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,13 @@ type ClientOptions struct {
2424
// whether set here or read from gh config, is not a bare hostname.
2525
//
2626
// If AuthToken is not provided, the Host will be used for token lookup,
27-
// and requests to APIHost will be allowed to include that token.
27+
// and requests to APIHost will be allowed to include that token. APIHost
28+
// must therefore be a trusted endpoint. When APIHost is configured, the
29+
// token is not sent to Host or its subdomains.
2830
//
2931
// Absolute URLs passed to RESTClient methods are requested as given
30-
// and are never rewritten to APIHost.
32+
// and are never rewritten to APIHost. They are authenticated only when
33+
// they target APIHost.
3134
APIHost string
3235

3336
// AuthToken is the authorization token that will be used

0 commit comments

Comments
 (0)