mirror of
https://github.com/1f349/mjwt.git
synced 2024-12-21 23:14:04 +00:00
Fix pedantic string check for nul in access token generator command.
This commit is contained in:
parent
d76a534346
commit
a0d03c0dfb
@ -67,7 +67,7 @@ func (s *accessCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{}
|
||||
}
|
||||
|
||||
var token string
|
||||
if len(s.kID) == 1 && s.kID[0] == '\x00' {
|
||||
if s.kID == "\x00" {
|
||||
signer := mjwt.NewMJwtSigner(s.issuer, key)
|
||||
token, err = signer.GenerateJwt(s.subject, s.id, aud, dur, auth.AccessTokenClaims{Perms: ps})
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user