Removes panic from authShim

This commit is contained in:
Christoph Polcin 2023-06-07 19:28:01 +02:00 committed by Christoph Polcin
parent a4cd839b8a
commit fcd6cac508

View File

@ -136,7 +136,7 @@ func NewEmptyAuth() Authorizer {
// for every request regardless of any `Www-Authenticate` header.
//
// 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
// without any synchronisation!!
@ -273,9 +273,10 @@ func (s *authShim) Close() error {
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 {
panic("Do not Clone the shim, it ends badly. In any case for you.")
return &noAuth{}
}
// String toString