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

19 lines
239 B
Go

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