Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsErrBadCredentials ¶ added in v0.12.4
IsErrBadCredentials returns true if the underlying error has the type ErrBadCredentials.
Types ¶
type ErrBadCredentials ¶ added in v0.12.4
func (ErrBadCredentials) Error ¶ added in v0.12.4
func (err ErrBadCredentials) Error() string
func (ErrBadCredentials) NotFound ¶ added in v0.12.4
func (ErrBadCredentials) NotFound() bool
type ExternalAccount ¶ added in v0.12.4
type ExternalAccount struct { // REQUIRED: The login to be used for authenticating against the provider. Login string // REQUIRED: The username of the account. Name string // The full name of the account. FullName string // The email address of the account. Email string // The location of the account. Location string // The website of the account. Website string // Whether the user should be prompted as a site admin. Admin bool }
ExternalAccount contains queried information returned by an authenticate provider for an external account.
type Provider ¶ added in v0.12.4
type Provider interface { // Authenticate performs authentication against an external identity provider // using given credentials and returns queried information of the external account. Authenticate(login, password string) (*ExternalAccount, error) // Config returns the underlying configuration of the authenticate provider. Config() any // HasTLS returns true if the authenticate provider supports TLS. HasTLS() bool // UseTLS returns true if the authenticate provider is configured to use TLS. UseTLS() bool // SkipTLSVerify returns true if the authenticate provider is configured to skip TLS verify. SkipTLSVerify() bool }
Provider defines an authenticate provider which provides ability to authentication against an external identity provider and query external account information.
Click to show internal directories.
Click to hide internal directories.