func (s *ServerClaims) ExpectedPrefixes() []nkeys.PrefixByte {
	return []nkeys.PrefixByte{nkeys.PrefixByteOperator, nkeys.PrefixByteCluster}
}
ExpectedPrefixes defines the types that can encode a server JWT, operator or cluster
package jwt
import (
	"errors"
	"github.com/nats-io/nkeys"
)
type Server struct {
	Permissions
	Cluster string `json:"cluster,omitempty"`
}
func (s *Server) Validate(vr *ValidationResults) {
	if s.Cluster == "" {
		vr.AddError("servers can't contain an empty cluster")
	}
}
type ServerClaims struct {
	ClaimsData
	Server `json:"nats,omitempty"`
}
func NewServerClaims(subject string) *ServerClaims {
	if subject == "" {
		return nil
	}
	c := &ServerClaims{}
	c.Subject = subject
	return c
}
func (s *ServerClaims) Encode(pair nkeys.KeyPair) (string, error) {
	if !nkeys.IsValidPublicServerKey(s.Subject) {
		return "", errors.New("expected subject to be a server public key")
	}
	s.ClaimsData.Type = ServerClaim
	return s.ClaimsData.Encode(pair, s)
}
func DecodeServerClaims(token string) (*ServerClaims, error) {
	v := ServerClaims{}
	if err := Decode(token, &v); err != nil {
		return nil, err
	}
	return &v, nil
}
func (s *ServerClaims) String() string {
	return s.ClaimsData.String(s)
}
func (s *ServerClaims) Payload() interface{} {
	return &s.Server
}
func (s *ServerClaims) Validate(vr *ValidationResults) {
	s.ClaimsData.Validate(vr)
	s.Server.Validate(vr)
}