Commit 5062c679 authored by Morten Knutsen's avatar Morten Knutsen
Browse files

Use padded encodings to ensure max compatability.

parent 9e594463
...@@ -39,9 +39,9 @@ func getJWKS() *JWKS { ...@@ -39,9 +39,9 @@ func getJWKS() *JWKS {
e = make([]byte, 4) e = make([]byte, 4)
binary.BigEndian.PutUint32(e, uint32(rsaKey.E)) binary.BigEndian.PutUint32(e, uint32(rsaKey.E))
key := Key{KType: "RSA", key := Key{KType: "RSA",
Key: base64.RawURLEncoding.EncodeToString(keyBytes), Key: base64.URLEncoding.EncodeToString(keyBytes),
N: base64.RawURLEncoding.EncodeToString(rsaKey.N.Bytes()), N: base64.URLEncoding.EncodeToString(rsaKey.N.Bytes()),
E: base64.RawURLEncoding.EncodeToString(e)} E: base64.URLEncoding.EncodeToString(e)}
return &JWKS{Keys: []Key{key}} return &JWKS{Keys: []Key{key}}
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment