mirror of
https://github.com/casdoor/casdoor.git
synced 2025-05-23 02:35:49 +08:00
Only consider x509 certs in /.well-known/jwks API
This commit is contained in:
parent
0d48da24dc
commit
caec1d1bac
@ -123,6 +123,10 @@ func GetJsonWebKeySet() (jose.JSONWebKeySet, error) {
|
|||||||
// link here: https://self-issued.info/docs/draft-ietf-jose-json-web-key.html
|
// link here: https://self-issued.info/docs/draft-ietf-jose-json-web-key.html
|
||||||
// or https://datatracker.ietf.org/doc/html/draft-ietf-jose-json-web-key
|
// or https://datatracker.ietf.org/doc/html/draft-ietf-jose-json-web-key
|
||||||
for _, cert := range certs {
|
for _, cert := range certs {
|
||||||
|
if cert.Type != "x509" {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
certPemBlock := []byte(cert.Certificate)
|
certPemBlock := []byte(cert.Certificate)
|
||||||
certDerBlock, _ := pem.Decode(certPemBlock)
|
certDerBlock, _ := pem.Decode(certPemBlock)
|
||||||
x509Cert, _ := x509.ParseCertificate(certDerBlock.Bytes)
|
x509Cert, _ := x509.ParseCertificate(certDerBlock.Bytes)
|
||||||
|
@ -158,6 +158,7 @@ class CertEditPage extends React.Component {
|
|||||||
{
|
{
|
||||||
[
|
[
|
||||||
{id: "x509", name: "x509"},
|
{id: "x509", name: "x509"},
|
||||||
|
{id: "Payment", name: "Payment"},
|
||||||
].map((item, index) => <Option key={index} value={item.id}>{item.name}</Option>)
|
].map((item, index) => <Option key={index} value={item.id}>{item.name}</Option>)
|
||||||
}
|
}
|
||||||
</Select>
|
</Select>
|
||||||
|
@ -151,6 +151,7 @@ class CertListPage extends BaseListPage {
|
|||||||
filterMultiple: false,
|
filterMultiple: false,
|
||||||
filters: [
|
filters: [
|
||||||
{text: "x509", value: "x509"},
|
{text: "x509", value: "x509"},
|
||||||
|
{text: "Payment", value: "Payment"},
|
||||||
],
|
],
|
||||||
width: "110px",
|
width: "110px",
|
||||||
sorter: true,
|
sorter: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user