Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
cristaloleg committed Nov 27, 2024
1 parent 3fb24d8 commit 187c5f1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/rpc/perms/permissions.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ func NewTokenWithPerms(signer jwt.Signer, perms []auth.Permission, ttl time.Dura

p := &JWTPayload{
Allow: perms,
Nonce: nonce[:],
Nonce: nonce,
ExpiresAt: expiresAt,
}
token, err := jwt.NewBuilder(signer).Build(p)
Expand Down
2 changes: 1 addition & 1 deletion libs/authtoken/authtoken.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func NewSignedJWT(signer jwt.Signer, permissions []auth.Permission, ttl time.Dur

token, err := jwt.NewBuilder(signer).Build(&perms.JWTPayload{
Allow: permissions,
Nonce: nonce[:],
Nonce: nonce,
ExpiresAt: expiresAt,
})
if err != nil {
Expand Down
4 changes: 3 additions & 1 deletion nodebuilder/node/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ func (m *module) AuthNew(_ context.Context, permissions []auth.Permission) (stri
return authtoken.NewSignedJWT(m.signer, permissions, 0)
}

func (m *module) AuthNewWithExpiry(_ context.Context, permissions []auth.Permission, ttl time.Duration) (string, error) {
func (m *module) AuthNewWithExpiry(_ context.Context,
permissions []auth.Permission, ttl time.Duration,
) (string, error) {
return authtoken.NewSignedJWT(m.signer, permissions, ttl)
}

0 comments on commit 187c5f1

Please sign in to comment.