mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-08-20 12:00:53 +08:00
Update comments in test cases
This commit is contained in:
@@ -60,13 +60,13 @@ jwt.verify(token, cert, { audience: 'urn:foo', issuer: 'urn:issuer' }, function(
|
||||
// verify algorithm
|
||||
cert = fs.readFileSync('public.pem'); // get public key
|
||||
jwt.verify(token, cert, { algorithms: ['RS256'] }, function(err, decoded) {
|
||||
// if issuer mismatch, err == invalid issuer
|
||||
// if algorithm mismatch, err == invalid algorithm
|
||||
});
|
||||
|
||||
// verify without expiration check
|
||||
cert = fs.readFileSync('public.pem'); // get public key
|
||||
jwt.verify(token, cert, { ignoreExpiration: true }, function(err, decoded) {
|
||||
// if issuer mismatch, err == invalid issuer
|
||||
// if ignoreExpration == false and token is expired, err == expired token
|
||||
});
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user