fix: add 'use' and 'alg' in .well-known/jwks (#708)

* fix: add 'use' and 'alg' in .well-known/jwks

* fix: dynamically assign value to 'alg' param
This commit is contained in:
halozhy 2022-04-26 21:53:05 +08:00 committed by GitHub
parent b867872da4
commit cab51fae9c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -105,6 +105,8 @@ func GetJsonWebKeySet() (jose.JSONWebKeySet, error) {
jwk.Key = x509Cert.PublicKey
jwk.Certificates = []*x509.Certificate{x509Cert}
jwk.KeyID = cert.Name
jwk.Algorithm = cert.CryptoAlgorithm
jwk.Use = "sig"
jwks.Keys = append(jwks.Keys, jwk)
}