aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-06-28 18:24:56 +0200
committerMatthias Andreas Benkard <code@mail.matthias.benkard.de>2012-06-28 18:24:56 +0200
commit973b7a2a12bd3d81d49c28eb8c9bbdd56b2c2495 (patch)
tree1bb5a7033053b19a795d294fdef3d204b0feabf6
parentbd9bc596f7310a497b15f4cbb88126b3a2e0ca2e (diff)
Add missing “typ” key to generated JWS objects.
-rwxr-xr-xsign.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/sign.pl b/sign.pl
index 137a7d7..c7e51ad 100755
--- a/sign.pl
+++ b/sign.pl
@@ -53,7 +53,7 @@ sub sign($$$$) {
principal => { email => $email }
};
- my $header = {alg => "RS256"};
+ my $header = {typ => "JWT", alg => "RS256"};
my $header_bytes = encode_base64_url(encode_json($header));
my $cert_bytes = encode_base64_url(encode_json($cert));
my $string_to_sign = $header_bytes . "." . $cert_bytes;