Recupera la configurazione OpenID
curl --request GET \
--url https://{issuer}/.well-known/openid-configurationimport requests
url = "https://{issuer}/.well-known/openid-configuration"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{issuer}/.well-known/openid-configuration', 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/openid-configuration",
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/openid-configuration"
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/openid-configuration")
.asString();require 'uri'
require 'net/http'
url = URI("https://{issuer}/.well-known/openid-configuration")
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{
"issuer": "https://your-app.auth.didit.me",
"authorization_endpoint": "https://your-app.auth.didit.me/sign-in",
"token_endpoint": "https://your-app.auth.didit.me/token/",
"jwks_uri": "https://your-app.auth.didit.me/.well-known/jwks.json",
"response_types_supported": [
"code"
],
"response_modes_supported": [
"query"
],
"grant_types_supported": [
"authorization_code",
"refresh_token"
],
"subject_types_supported": [
"public"
],
"id_token_signing_alg_values_supported": [
"ES256"
],
"token_endpoint_auth_methods_supported": [
"none"
],
"code_challenge_methods_supported": [
"S256"
],
"scopes_supported": [
"openid",
"email",
"phone",
"profile",
"offline_access"
],
"claims_supported": [
"iss",
"aud",
"sub",
"sid",
"auth_time",
"nonce",
"vendor_data",
"amr",
"org",
"verified",
"act",
"email",
"email_verified",
"name",
"phone_number"
]
}
Riferimento API
Configurazione OpenID | API di autenticazione Didit
GET /.well-known/openid-configuration restituisce il documento di discovery OpenID Connect della tua applicazione: issuer, endpoint, grant, ES256 e claim.
GET
/
.well-known
/
openid-configuration
Recupera la configurazione OpenID
curl --request GET \
--url https://{issuer}/.well-known/openid-configurationimport requests
url = "https://{issuer}/.well-known/openid-configuration"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://{issuer}/.well-known/openid-configuration', 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/openid-configuration",
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/openid-configuration"
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/openid-configuration")
.asString();require 'uri'
require 'net/http'
url = URI("https://{issuer}/.well-known/openid-configuration")
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{
"issuer": "https://your-app.auth.didit.me",
"authorization_endpoint": "https://your-app.auth.didit.me/sign-in",
"token_endpoint": "https://your-app.auth.didit.me/token/",
"jwks_uri": "https://your-app.auth.didit.me/.well-known/jwks.json",
"response_types_supported": [
"code"
],
"response_modes_supported": [
"query"
],
"grant_types_supported": [
"authorization_code",
"refresh_token"
],
"subject_types_supported": [
"public"
],
"id_token_signing_alg_values_supported": [
"ES256"
],
"token_endpoint_auth_methods_supported": [
"none"
],
"code_challenge_methods_supported": [
"S256"
],
"scopes_supported": [
"openid",
"email",
"phone",
"profile",
"offline_access"
],
"claims_supported": [
"iss",
"aud",
"sub",
"sid",
"auth_time",
"nonce",
"vendor_data",
"amr",
"org",
"verified",
"act",
"email",
"email_verified",
"name",
"phone_number"
]
}
L’autenticazione è una novità. Questi endpoint sono forniti dall’issuer della tua applicazione, come
https://<name>.auth.didit.me, e non accettano mai la tua chiave API Didit.Risposta
Il documento di individuazione.
Il documento di discovery OpenID Connect dell'emittente. Leggi gli endpoint da qui invece di costruirli manualmente.
L'emittente: l'origine di accesso dell'applicazione, senza barra finale. Il campo iss di ogni token coincide con esso.
Esempio:
"https://your-app.auth.didit.me"
La pagina di accesso ospitata (/sign-in).
Esempio:
"https://your-app.auth.didit.me/sign-in"
Esempio:
"https://your-app.auth.didit.me/token/"
Esempio:
"https://your-app.auth.didit.me/.well-known/jwks.json"
Esempio:
["code"]
Esempio:
["query"]
Esempio:
["authorization_code", "refresh_token"]
Esempio:
["public"]
Esempio:
["ES256"]
none: i client sono pubblici e non inviano alcun segreto.
Esempio:
["none"]
Esempio:
["S256"]
Esempio:
[ "openid", "email", "phone", "profile", "offline_access" ]
Esempio:
[ "iss", "aud", "sub", "sid", "auth_time", "nonce", "vendor_data", "amr", "org", "verified", "act", "email", "email_verified", "name", "phone_number" ]
Ultima modifica il 7 novembre 2026