署名鍵を取得
curl --request GET \
--url https://{issuer}/.well-known/jwks.jsonimport requests
url = "https://{issuer}/.well-known/jwks.json"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{issuer}/.well-known/jwks.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{issuer}/.well-known/jwks.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{issuer}/.well-known/jwks.json"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{issuer}/.well-known/jwks.json")
.asString();require 'uri'
require 'net/http'
url = URI("https://{issuer}/.well-known/jwks.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"keys": [
{
"kty": "EC",
"crv": "P-256",
"x": "ZDN2unLMultuZwNY_ZKMvsKLRrlC_usPFZyK77cnDO8",
"y": "CfLKoaJNvhFpDWqG56H8dD_j0f1c93RdR63bhIdTh3I",
"kid": "k_8sJ2dQvX0nLr5TfYb3HkPw",
"use": "sig",
"alg": "ES256"
}
]
}
APIリファレンス
署名鍵の取得(JWKS)| Didit Authentication API
Didit の GET /.well-known/jwks.json は、アプリケーションの ES256 公開鍵を返します。kid ごとにキャッシュしてください。鍵は 30 日ごとにローテーションされ、1 日間の重複期間があります。
GET
/
.well-known
/
jwks.json
署名鍵を取得
curl --request GET \
--url https://{issuer}/.well-known/jwks.jsonimport requests
url = "https://{issuer}/.well-known/jwks.json"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{issuer}/.well-known/jwks.json', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://{issuer}/.well-known/jwks.json",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{issuer}/.well-known/jwks.json"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{issuer}/.well-known/jwks.json")
.asString();require 'uri'
require 'net/http'
url = URI("https://{issuer}/.well-known/jwks.json")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"keys": [
{
"kty": "EC",
"crv": "P-256",
"x": "ZDN2unLMultuZwNY_ZKMvsKLRrlC_usPFZyK77cnDO8",
"y": "CfLKoaJNvhFpDWqG56H8dD_j0f1c93RdR63bhIdTh3I",
"kid": "k_8sJ2dQvX0nLr5TfYb3HkPw",
"use": "sig",
"alg": "ES256"
}
]
}
Authenticationは新機能です。これらのエンドポイントは、
https://<name>.auth.didit.meのようなアプリケーションのイシュアーによって提供され、Didit APIキーを受け付けることはありません。kidをトークンが指定している場合は、1分に1回までJWKSを再取得してください。詳しくはキャッシュとローテーションを参照してください。レスポンス
公開されている鍵です。
アプリケーションが公開している署名用の公開鍵。通常は1つです。ローテーションの前後は2つになります。次の鍵は署名を開始する1日前に公開され、前の鍵は署名を停止した後も1日間公開されたままになるためです。
Show child attributes
Show child attributes
最終更新日 2026年11月1日