Files
nats-server/auth/plain.go
Máximo Cuadros Ortiz 65ae9c16f2 extendable auth methods
2014-11-27 00:26:13 +01:00

20 lines
288 B
Go

package auth
import (
"github.com/apcera/gnatsd/server"
)
type Plain struct {
Username string
Password string
}
func (p *Plain) Check(c server.ClientAuth) bool {
opts := c.GetOpts()
if p.Username != opts.Username || p.Password != opts.Password {
return false
}
return true
}