Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
daas
jwt-tokenissuer
Commits
5062c679
Commit
5062c679
authored
Apr 11, 2017
by
Morten Knutsen
Browse files
Use padded encodings to ensure max compatability.
parent
9e594463
Changes
1
Hide whitespace changes
Inline
Side-by-side
openid_jwks.go
View file @
5062c679
...
@@ -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
.
Raw
URLEncoding
.
EncodeToString
(
keyBytes
),
Key
:
base64
.
URLEncoding
.
EncodeToString
(
keyBytes
),
N
:
base64
.
Raw
URLEncoding
.
EncodeToString
(
rsaKey
.
N
.
Bytes
()),
N
:
base64
.
URLEncoding
.
EncodeToString
(
rsaKey
.
N
.
Bytes
()),
E
:
base64
.
Raw
URLEncoding
.
EncodeToString
(
e
)}
E
:
base64
.
URLEncoding
.
EncodeToString
(
e
)}
return
&
JWKS
{
Keys
:
[]
Key
{
key
}}
return
&
JWKS
{
Keys
:
[]
Key
{
key
}}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment