mirror of
https://github.com/1f349/mjwt.git
synced 2024-12-22 07:24:05 +00:00
Fix pendantic negation issue.
This commit is contained in:
parent
9a1029861c
commit
3201964fec
@ -78,16 +78,15 @@ func (d *defaultMJwtVerifier) VerifyJwt(token string, claims baseTypeClaim) (*jw
|
||||
kIDI, exs := token.Header["kid"]
|
||||
if exs {
|
||||
kID, ok := kIDI.(string)
|
||||
if ok {
|
||||
if !ok {
|
||||
return nil, ErrKIDInvalid
|
||||
}
|
||||
key := d.kStore.GetKeyPublic(kID)
|
||||
if key == nil {
|
||||
return nil, ErrNoPublicKeyFound
|
||||
} else {
|
||||
return key, nil
|
||||
}
|
||||
} else {
|
||||
return nil, ErrKIDInvalid
|
||||
}
|
||||
}
|
||||
if d.pub == nil {
|
||||
return nil, ErrNoPublicKeyFound
|
||||
|
Loading…
Reference in New Issue
Block a user