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

19 lines
240 B
Go

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