mirror of
https://gitlab.crans.org/nounous/ghostream.git
synced 2025-06-29 22:41:06 +02:00
Add basic and bypass auth methods
This commit is contained in:
21
auth/bypass/bypass.go
Normal file
21
auth/bypass/bypass.go
Normal file
@ -0,0 +1,21 @@
|
||||
package bypass
|
||||
|
||||
// ByPass authentification backend
|
||||
// By pass password check, open your streaming server to everyone!
|
||||
type ByPass struct {
|
||||
}
|
||||
|
||||
// Login always return success
|
||||
func (a ByPass) Login(username string, password string) (bool, error) {
|
||||
return true, nil
|
||||
}
|
||||
|
||||
// Close has no connection to close
|
||||
func (a ByPass) Close() {
|
||||
}
|
||||
|
||||
// New instanciates a new Basic authentification backend
|
||||
func New() (ByPass, error) {
|
||||
backend := ByPass{}
|
||||
return backend, nil
|
||||
}
|
Reference in New Issue
Block a user