Removes panic from authShim
This commit is contained in:
parent
a4cd839b8a
commit
fcd6cac508
7
auth.go
7
auth.go
@ -136,7 +136,7 @@ func NewEmptyAuth() Authorizer {
|
|||||||
// for every request regardless of any `Www-Authenticate` header.
|
// for every request regardless of any `Www-Authenticate` header.
|
||||||
//
|
//
|
||||||
// It may only have one authentication method,
|
// It may only have one authentication method,
|
||||||
// so calling `AddAuthenticator` will panic!
|
// so calling `AddAuthenticator` **will panic**!
|
||||||
//
|
//
|
||||||
// Look out!! This offers the skinniest and slickest implementation
|
// Look out!! This offers the skinniest and slickest implementation
|
||||||
// without any synchronisation!!
|
// without any synchronisation!!
|
||||||
@ -273,9 +273,10 @@ func (s *authShim) Close() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do not Clone the shim, it ends badly. In any case for you.
|
// It's not intend to Clone the shim
|
||||||
|
// therefore it returns a noAuth instance
|
||||||
func (s *authShim) Clone() Authenticator {
|
func (s *authShim) Clone() Authenticator {
|
||||||
panic("Do not Clone the shim, it ends badly. In any case for you.")
|
return &noAuth{}
|
||||||
}
|
}
|
||||||
|
|
||||||
// String toString
|
// String toString
|
||||||
|
Loading…
Reference in New Issue
Block a user