Skip to content

Commit

Permalink
svchost/auth: expose a "NoCredentials" credentials source
Browse files Browse the repository at this point in the history
For situations where no credentials are needed but where a working
CredentialsSource is still required, this variable provides a convenient
way to get a fully-functional-but-empty credentials source.
  • Loading branch information
apparentlymart committed Oct 19, 2017
1 parent 83b0983 commit 0db521a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions svchost/auth/credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import (
// there is no good reason to do so.
type Credentials []CredentialsSource

// NoCredentials is an empty CredentialsSource that always returns nil
// when asked for credentials.
var NoCredentials CredentialsSource = Credentials{}

// A CredentialsSource is an object that may be able to provide credentials
// for a given host.
//
Expand Down

0 comments on commit 0db521a

Please sign in to comment.