svchost/auth: expose a "NoCredentials" credentials source

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.
This commit is contained in:
Martin Atkins 2017-10-18 08:56:15 -07:00
parent 83b098344b
commit 0db521a281
1 changed files with 4 additions and 0 deletions

View File

@ -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.
//