Skip to content

Commit

Permalink
moved BearerToken to be inside of the "nats" configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
aricart committed Jan 14, 2020
1 parent dc0916a commit 3206b44
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions user_claims.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,14 @@ import (
type User struct {
Permissions
Limits
BearerToken bool `json:"bearer_token,omitempty"`
}

// Validate checks the permissions and limits in a User jwt
func (u *User) Validate(vr *ValidationResults) {
u.Permissions.Validate(vr)
u.Limits.Validate(vr)
// When BearerToken is true server will ignore any nonce-signing verification
}

// UserClaims defines a user JWT
Expand All @@ -40,8 +42,6 @@ type UserClaims struct {
// IssuerAccount stores the public key for the account the issuer represents.
// When set, the claim was issued by a signing key.
IssuerAccount string `json:"issuer_account,omitempty"`
// When BearerToken is true server will ignore any nonce-signing verification
BearerToken bool `json:"bearer_token,omitempty"`
}

// NewUserClaims creates a user JWT with the specific subject/public key
Expand Down

0 comments on commit 3206b44

Please sign in to comment.