Files
nats-server/auth/plain.go
2015-06-19 12:08:11 -07:00

20 lines
289 B
Go

package auth
import (
"github.com/nats-io/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
}