mirror of
https://github.com/denoland/deno.git
synced 2024-11-30 16:40:57 -05:00
034ab48086
Co-authored-by: Tim Reichen <timreichen@users.noreply.github.com>
11 lines
473 B
TypeScript
11 lines
473 B
TypeScript
import { assertEquals } from "../testing/asserts.ts";
|
|
|
|
import { verify as verifyAlgorithm } from "./_algorithm.ts";
|
|
|
|
Deno.test("[jwt] verify algorithm", function () {
|
|
assertEquals(verifyAlgorithm("HS512", "HS512"), true);
|
|
assertEquals(verifyAlgorithm("HS512", "HS256"), false);
|
|
assertEquals(verifyAlgorithm(["HS512"], "HS512"), true);
|
|
assertEquals(verifyAlgorithm(["HS256", "HS512"], "HS512"), true);
|
|
assertEquals(verifyAlgorithm(["HS512"], "HS256"), false);
|
|
});
|