Skip to content

Commit

Permalink
jwk: Tests for simple equality in JWT strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
arekkas authored and arekkas committed Jul 4, 2018
1 parent 6c6fb3c commit 95c96a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jwk/jwt_strategy.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ func (j *RS256JWTStrategy) refresh() error {
j.publicKeyID = public.KeyID
}

if j.privateKey.PublicKey != *j.publicKey {
if j.privateKey.PublicKey.E != j.publicKey.E ||
j.privateKey.PublicKey.N.String() != j.publicKey.N.String() {
return errors.New("public and private key pair fetched from store does not match")
}

Expand Down

0 comments on commit 95c96a0

Please sign in to comment.