Log authentication errors as soon as possible, use the "warn" level, use the same message whatever the author or protocol.
13 lines
248 B
Go
13 lines
248 B
Go
package auth
|
|
|
|
// Error is an authentication error.
|
|
type Error struct {
|
|
Wrapped error
|
|
AskCredentials bool
|
|
}
|
|
|
|
// Error implements the error interface.
|
|
func (e *Error) Error() string {
|
|
return "failed to authenticate: " + e.Wrapped.Error()
|
|
}
|