22.10. KyCH OAuth2 Gateway RESTful API#
The KyCH OAuth2 Gateway provides OAuth 2.0 authorization backed by electronic identification. It allows OAuth 2.0 clients (such as a Taler exchange) to verify a person’s identity with an EU Digital Identity Wallet, the German identity card’s online function, another member state’s eID through the eIDAS network, or the Swiss e-ID in the swiyu wallet.
Each source of identity KyCH can use is a vocabulary with its own native
claim names (eupid and eupid-mdoc for the EU PID, npa for the
German card, eidas, swiyu for the Swiss e-ID), and each vocabulary is
served by a helper that does the protocol and cryptographic work (the Swiyu
Verifier for swiyu, one of three OpenID4VP verifiers for the EU PID, an
eID server for npa). Which vocabularies a client may use, and which named profiles –
sets of claims per vocabulary – it may ask for, is part of its registration.
The high-level flow is:
An OAuth 2.0 client is registered with KyCH (via configuration file or CLI tool).
When the client needs to verify a user’s identity, it calls
/setup/$CLIENT_IDwith its client secret to obtain anonce.The client redirects the user-agent to
/authorize/$NONCEwith OAuth 2.0 parameters (response_type,client_id,redirect_uri,state,scope).KyCH initiates a verification request with the helper of the session’s vocabulary. For a wallet vocabulary (
oid4vp) it returns averification_url(QR code URL) for the user to scan with their wallet; for the German eID card (eid-server) or another member state’s eID (eidas-saml) it sends the browser to the helper instead.The user presents their credential to the helper: the wallet does so in the background, the eID card or eIDAS route in the browser, which the helper then sends back to KyCH’s
/return/$VERIFICATION_ID.KyCH learns of the outcome from the helper’s webhook to
/notification(the Swiyu Verifier), from asking the helper itself while the browser polls/status(helpers without a webhook), or when the browser returns; in each case it fetches the result from the helper.The client polls
/status/$VERIFICATION_IDor the user calls/finalize/$VERIFICATION_IDto be redirected back to the client with an authorization code – or, if the identification failed or the session expired, witherror=access_denied(RFC 6749, section 4.1.2.1).The client exchanges the authorization code for an access token via
/token.The client retrieves the verified identity claims via
/info.
22.10.1. Receiving Configuration#
- GET /config#
Returns the public configuration of the KyCH service, including supported verifiable credential types and available claims. Clients can use this endpoint to discover which claims they can request during authorization.
This endpoint does not require authentication and can be used for health checks and service discovery.
Response:
- 200 OK:
The service is operational. Returns a KyCHConfigResponse containing the service configuration.
interface KyCHConfigResponse { // Service identifier. Always "KyCH OAuth2 Gateway". name: "kych-oauth2-gateway"; // Semantic version of the KyCH service (e.g., "1.0.0"). version: string; // Health status indicator. "healthy" indicates the service is // ready to accept requests. status: "healthy"; // The vc_* members describe the first SD-JWT VC vocabulary the // instance enables, which for a Swiss e-ID installation is the // "swiyu" vocabulary; they are empty strings and lists if there is // none. // // Verifiable credential type identifier: the first accepted vct of // that vocabulary. For Swiss Beta ID, this is "betaid-sdjwt". vc_type: string; // Credential format. SD-JWT credentials use "dc+sd-jwt". vc_format: string; // List of cryptographic signature algorithms accepted for // credential verification (e.g., ["ES256"]). vc_algorithms: string[]; // List of claim names that clients can request via the scope // parameter, for that vocabulary. // Examples: "family_name", "given_name", "birth_date", "age_over_18". vc_claims: string[]; // Every vocabulary the instance enables, in the order of its // VOCABULARIES option. vocabularies: KyCHVocabulary[]; // Every profile with a line for at least one enabled vocabulary. profiles: KyCHProfile[]; }
interface KyCHVocabulary { // Its name, as /setup, the picker and /info's "vocabulary" use it, // e.g. "swiyu", "eupid", "eupid-mdoc", "npa", "eidas". name: string; // How the person identifies: with a wallet over OpenID4VP, with // the German eID card's online function, or through eIDAS. kind: "oid4vp" | "eid-server" | "eidas-saml"; // For "oid4vp": "dc+sd-jwt", "vc+sd-jwt" or "mso_mdoc". format?: string; // For SD-JWT VC: the accepted vct values. vct?: string[]; // For mdoc: the document type. doctype?: string; // Every claim it delivers, under its native name. For SD-JWT VC a // name is a path: "address.locality" is a member of the "address" // object, "nationalities[]" every element of that array. In /info a // claim appears under its first path component. claims: string[]; }
interface KyCHProfile { // The name a client puts into its scope, e.g. "kyc". name: string; // Whether the client keeps what it receives; sent to mdoc wallets // as intent_to_retain. retain: boolean; // Per enabled vocabulary the profile covers: the claims asked for. // A credential lacking an optional one is still accepted, and /info // lists it in "missing". vocabularies: { [vocabulary: string]: KyCHProfileLine }; }
interface KyCHProfileLine { required: string[]; optional: string[]; }
22.10.2. Setup#
- POST /setup/$CLIENT_ID#
Initiates a new KYC verification session for the specified client. This is the first step in the verification flow and must be called by the client (e.g., Taler exchange) before redirecting the user to the authorization endpoint.
The client authenticates using HTTP Bearer authentication with its client secret. Upon success, KyCH creates a new session in
pendingstatus and returns a cryptographically random nonce that identifies this session.The client may fix the session’s vocabulary, its profile or both in the request body. A session whose vocabulary is fixed this way shows the person no choice of vocabulary at
/authorize, and its scope may then name native claims of that vocabulary even if the client may use several.Request:
- Request Headers:
Authorization – Required. Must be
Bearer $CLIENT_SECRETwhere$CLIENT_SECRETis the secret registered for this client.Content-Encoding – Optional.
deflatefor a body compressed in the zlib format (RFC 1950), as the Taler exchange sends it; raw deflate data (RFC 1951) is accepted as well. Any other encoding butidentityis refused.
The body is optional. If present, it is a KyCHSetupRequest. Members KyCH does not know are ignored, so a Taler exchange that sends its measure’s
initial_addresshere, as it does today, opens a session with no preselection. The body is checked only after the client secret has been.interface KyCHSetupRequest { // Fixes the session's vocabulary. Must be one the client is // registered for and the instance enables. Case-insensitive. vocabulary?: string; // The profile the session asks for. Must be one the client is // registered for, with a line for the vocabulary given, or for at // least one of the client's vocabularies. With a profile fixed here, // the scope at /authorize may be empty; if it is not, it must name // this profile. profile?: string; }
Response:
- 200 OK:
Session created successfully. Returns a KyCHSetupResponse containing the session nonce.
- 400 Bad Request:
The body is not a JSON object, or a member has the wrong type (
invalid_request); it names a vocabulary the client may not use (invalid_vocabulary), or a profile the client may not use or that covers none of the session’s possible vocabularies (invalid_profile).- 401 Unauthorized:
Authentication failed. Either the
Authorizationheader is missing, malformed, or contains an invalid client secret. The client should verify that it is using the correct secret for the specified$CLIENT_ID.- 404 Not found:
The
$CLIENT_IDin the URL path does not match any registered client. The client must be registered via configuration file or CLI before use.- 413 Request entity too large:
The body is larger than 64 KiB, before or after decompression (
request_too_large).- 415 Unsupported media type:
The body uses a
Content-Encodingother thanidentityordeflate(unsupported_content_encoding).
interface KyCHSetupResponse { // Cryptographically random nonce (base64-encoded) that identifies // this verification session. The client must include this nonce // in the URL when redirecting the user to /authorize/$NONCE. // The nonce is single-use and expires after a configured timeout. nonce: string; // When the session expires, 15 minutes after its creation: the // person has to have identified by then. expires: Timestamp; }
22.10.4. Status#
- GET /status/$VERIFICATION_ID#
Polls the current status of a verification request. Clients (or the browser JavaScript on the authorize page) use this endpoint to detect when the user has completed the verification process.
The
stateparameter is required and must match the state from the original authorization request. This prevents unauthorized parties from polling verification status.For a helper that does not call
/notification(the EUDI verifier, for instance), this is also where KyCH asks the helper for the outcome: while the session isauthorized, a poll asks the helper, at most once a second per session however often/statusis called, and completes the session as the webhook would have. walt.id with a webhook is asked as well, at most every ten seconds, for the outcomes no webhook reports (a session it let expire, or lost in a restart).Request:
- Parameters:
VERIFICATION_ID – The verification ID returned by
/authorize.
- Query Parameters:
state – Required. The state parameter from the original authorization request. Must match exactly. This provides CSRF protection and prevents unauthorized status polling.
Response:
- 200 OK:
Returns a KyCHStatusResponse containing the current verification status.
- 403 Forbidden:
The
stateparameter does not match the state associated with this verification. This may indicate a CSRF attack or that the wrong state was provided.- 404 Not found:
No verification exists with the given
$VERIFICATION_ID. The ID may be invalid or the verification may have been deleted after expiration.
interface KyCHStatusResponse { // Current status of the verification. Possible values: // // - "pending": Session created but /authorize not yet called. // (Normally not seen via /status since /authorize must be // called first to get the verification_id.) // // - "authorized": User has been shown the QR code but has not // yet scanned it or completed verification in their wallet. // The client should continue polling. // // - "verified": The user's credential has been successfully // verified by the helper. The client can now redirect // the user to /finalize to obtain the authorization code. // // - "failed": Verification failed. This may occur if the user // declined consent, presented an invalid credential, or the // credential issuer is not trusted. With the EUDI verifier also // when it refused what the wallet posted (an undecryptable or // otherwise invalid response), when its transaction expired, or // when it does not know the transaction any more (it was // restarted): the person has to start again. // // - "expired": The verification session timed out before the // user completed verification, which happens 15 minutes after // /setup. The client should start a new session via /setup. // // For "failed" and "expired", the wallet page sends the browser // to /finalize, which redirects to the client with // error=access_denied. // // - "completed": An access token has already been issued for // this verification. The flow is complete. status: "pending" | "authorized" | "verified" | "failed" | "expired" | "completed"; }
22.10.5. Return#
- GET /return/$VERIFICATION_ID#
Where a browser-redirect helper – the eID server for the German eID card, the eIDAS connector – sends the person back once they are done there. KyCH takes the browser’s return as the signal to ask the helper for the outcome, at most once a second per session, completes the session as the webhook would have, and continues the way the wallet page does once
/statussaysverified.No
stateis needed: KyCH gives the verification id only to the browser and the helper, and the authorization code/finalizeredirects with is of no use without the client secret.Request:
- Parameters:
VERIFICATION_ID – The verification ID returned by
/authorize.
Response:
- 302 Found:
The session is
verified,failedorexpired:Locationis/finalize/$VERIFICATION_ID?state=$STATE, which redirects to the client with the code, or witherror=access_deniedfor a session that failed or expired. A failed or expired session is redirected only if itsredirect_uriis one the client still has registered.- 200 OK:
Anything else. With an
Acceptheader includingtext/html, a page: while the outcome is pending, one that polls/statusand continues to/finalizelike the wallet page; for acompletedsession, and for afailedorexpiredone without a validredirect_uri, one that says so, in the languageAccept-Languageasks for. Otherwise a KyCHStatusResponse.- 404 Not found:
No verification exists with the given
$VERIFICATION_ID(session_not_found).
22.10.6. Finalize#
- GET /finalize/$VERIFICATION_ID#
Completes the authorization flow by redirecting the user back to the client: with an OAuth 2.0 authorization code once
/statusreturnsverified, and with an error response (RFC 6749, section 4.1.2.1) once it returnsfailedorexpired. The wallet page and/returnsend the browser here in all three cases, so that the client learns of a failed identification at once rather than when its own process times out.For a
verifiedsession, KyCH redirects the user’s browser to theredirect_uriof the authorization request with the authorization code (minted when the helper’s outcome arrived) and the state as query parameters. The authorization code is single-use. The client must exchange it for an access token at the/tokenendpoint before it expires (configurable, default 10 minutes).Either redirect goes only to a
redirect_urithat is still among the client’s registered ones, checked again here.Request:
- Parameters:
VERIFICATION_ID – The verification ID returned by
/authorize.
- Query Parameters:
state – Required. The state parameter from the original authorization request. Must match exactly for CSRF protection.
Response:
- 302 Found:
Redirects to the client’s
redirect_uriwith query parameters:code: The authorization code to exchange for an access token.state: The state parameter, echoed back unchanged.
Example redirect:
https://client.example.com/callback?code=abc123&state=xyz789For a
failedorexpiredsession, the query parameters are instead:error:access_denied.error_description:the identification failed, followed by: $REASONwhen the helper adapter gave a reason code (such aspresentation_expired), orthe identification was not completed in time. Printable ASCII; never personal data.state: The state parameter, echoed back unchanged.
Example redirect:
https://client.example.com/callback?error=access_denied&error_description=the%20identification%20failed%3A%20presentation_expired&state=xyz789A Taler exchange maps
access_deniedto a failed KYC process.With an
Acceptheader includingtext/html, a session not decided yet (pending,authorized) is redirected to/return/$VERIFICATION_IDinstead, which asks the helper and waits.- 200 OK:
The
Acceptheader includestext/html, and the sessionfailedorexpiredwhile no validredirect_uriis known (the client’s registration has changed), or it iscompleted(a token was already issued, e.g. from a second tab: a same-device wallet opens KyCH’s return URL beside the wallet page): KyCH’s own page saying so, in the languageAccept-Languageasks for.- 400 Bad Request:
not_verified, withouttext/htmlinAccept: the user has not completed verification yet (status isauthorized), a token was already issued (completed), or the sessionfailedorexpiredand no validredirect_uriis known.- 403 Forbidden:
The
stateparameter does not match.- 404 Not found:
No verification exists with the given
$VERIFICATION_ID.- 500 Internal Server Error:
internal_error: averifiedsession whoseredirect_urithe client no longer has registered.
22.10.7. Token#
- POST /token#
Exchanges an authorization code for an access token. This is the standard OAuth 2.0 token endpoint implementing the authorization code grant.
The client authenticates by including its
client_idandclient_secretin the request body (not via HTTP Basic authentication). Theredirect_urimust exactly match the one used in the original authorization request.Authorization codes are single-use. Once exchanged for a token, the code is invalidated and cannot be used again. Codes also expire after a short time (configurable, default 10 minutes).
Request:
- Request Headers:
Content-Type – Must be
application/x-www-form-urlencoded.
The request body contains the following form parameters:
interface KyCHTokenRequest { // The OAuth 2.0 grant type. Must be "authorization_code". grant_type: "authorization_code"; // The authorization code received from the /finalize redirect. // This code is single-use and expires after a short time. code: string; // The client identifier. Must match the client that initiated // the authorization flow. client_id: string; // The client secret for authentication. KyCH verifies this // against the stored bcrypt hash. client_secret: string; // The redirect URI. Must exactly match the redirect_uri used // in the original /authorize request. This prevents authorization // code injection attacks. redirect_uri: string; }
Response:
- 200 OK:
Token issued successfully. Returns a KyCHTokenResponse containing the access token. The session status is updated to
completed.- 400 Bad Request:
The request is invalid. Possible causes:
grant_typeis notauthorization_codecodeis missing, invalid, expired, or already usedredirect_uridoes not match the original requestRequired parameters are missing
- 401 Unauthorized:
Client authentication failed. Either
client_iddoes not exist orclient_secretdoes not match the registered secret.
interface KyCHTokenResponse { // The access token. Use this as a Bearer token in the // Authorization header when calling /info. access_token: string; // The token type. Always "Bearer". token_type: "Bearer"; // Token validity period in seconds. The token cannot be used // after this time. Typically 3600 (1 hour). expires_in: number; }
22.10.8. Info#
- GET /info#
Retrieves the verified identity claims using an access token. This endpoint is analogous to the OAuth 2.0 UserInfo endpoint but returns verified credential claims instead of user profile information.
The response contains only the claims that were:
Requested in the
scopeparameter during authorization: the profile’s claims for the vocabulary presented, or the native claim names of the scope. KyCH enforces this itself, by each claim’s path: a credential may reveal more than was asked – an issuer can make claims always disclosed, a wallet can disclose a whole object for one of its members – and the rest is neither stored nor returned. A requested object (place_of_birth) is returned whole, a requested member (address.locality) alone within its object. The raw presentation inevidenceis the issuer’s signed data and is left as the wallet sent it.Successfully disclosed by the user from their verifiable credential.
The access token is validated on each request. Expired or revoked tokens are rejected.
Request:
- Request Headers:
Authorization – Required. Must be
Bearer $ACCESS_TOKENwhere$ACCESS_TOKENis the token received from/token.
Response:
- 200 OK:
Returns a KyCHInfoResponse containing the verified claims.
- 401 Unauthorized:
The access token is missing, malformed, expired, or has been revoked. The client should obtain a new token by starting a new verification flow.
- 410 Gone:
The token is valid, but KyCH has deleted the claims and the evidence (
claims_purged): they are kept forPURGE_GRACE(an hour by default) after the first successful/info, so that a client can retry a request that failed on its side, and not longer. A client keeps what it needs from the first answer.
The first successful
/infois recorded, and the grace runs from there; later calls return the same data until it is deleted. Independently of/info, everything is deleted once the access token expires. See the data retention section of the KyCH manual.interface KyCHInfoResponse { // The verified credential claims as key-value pairs, under the // native names of the session's vocabulary. Only claims that were // requested and disclosed are included. A claim requested by a path // ("address.locality") appears under its first component, holding // the value as the credential nests it. // // Example response for scope "family_name given_name age_over_18": // { // "family_name": "Muster", // "given_name": "Max", // "age_over_18": true, // "vocabulary": "swiyu", // "missing": [], // "evidence": { ... } // } // // Claim types vary: // - String claims: family_name, given_name, birth_place, nationality, etc. // - Boolean claims: age_over_16, age_over_18, age_over_65 // - Date claims: birth_date, issuance_date, expiry_date (ISO 8601 format) // - Binary claims: portrait (base64-encoded image data) // - Objects and arrays: address, place_of_birth, nationalities (EU PID) [claim: string]: string | boolean | number | object; // The keys "vocabulary", "missing" and "evidence" are KyCH's own: no // vocabulary may define a claim under one of them. They are absent // only for sessions from before KyCH had vocabularies. // Which source of identity the person used, e.g. "swiyu", "eupid", // "npa"; it decides what the claim names mean. When the person's // choice offered the wallet several vocabularies (the EU PID as // "eupid" or "eupid-mdoc"), it is the one the wallet presented. vocabulary: string; // The optional claims of the requested profile that the credential // did not have, by their names in the profile (e.g. // "address.country"). Empty for a scope of native claim names, which // are all required. The client completes these by other means. missing: string[]; // How the result was obtained and checked. evidence: KyCHEvidence; }
interface KyCHEvidence { // KyCH's verification id, the one /status and /finalize used. verification_id: string; // When KyCH received the outcome from the helper. verified_at: Timestamp; // The helper that did the verification. helper: { // Its type, as in kych.conf(5): "swiyu", "eudi-verifier", // "waltid-verifier2", "kych-native", "eumw-saml", "eidas-saml". type: string; // The program, for "kych-native", which several implement: // "kych-oid4vp", "kych-eid". name?: string; // Its version, if it reports one. version?: string; }; // The credential format, for a wallet: "dc+sd-jwt" or "mso_mdoc". format?: string; // What was presented: the vct of an SD-JWT VC, the doctype of an // mdoc. credential_type?: string; // Who issued it. issuer?: { // The issuer's identifier: a DID for the Swiss e-ID. id?: string; // The key the credential was signed with, as the credential // names it. key_id?: string; // For an X.509 issuer: the certificate's subject, and the chain // as base64 DER, leaf first. subject?: string; chain?: string[]; }; // What the issuer was trusted on: the accepted issuer DIDs, a trust // list and its issue date, the helper's own evaluation. trust?: object; // "high" only where the trust configuration establishes it: for an // EU PID, an issuer on the PID-provider list plus verified holder // binding. Never assumed from the vocabulary. level_of_assurance?: string; // The revocation check: whether done, against which list, and the // result. status?: object; // The holder-binding check: whether done, the nonce and the // audience. holder_binding?: object; // What was asked for: the DCQL query and the request parameters. request?: object; // The raw presentation, as the helper hands it out. presentation?: any; }
A member is present only where the helper reports it; an absent member means “not reported”, never “checked and fine”. What each vocabulary’s helper reports:
swiyu(swiyu-verifier)Always
verification_id,verified_at,helper.type,format,trust.accepted_issuer_dids;helper.versionwhen the verifier’s/actuator/inforeports its build.request(the DCQL query,response_mode) when the verifier returns the query. Only with the verifier’sADDITIONAL_AUDIT_INFORMATION_VP_TOKEN_ENABLED: the rawvp_tokenaspresentation, and, read from it,issuer.id(the issuer DID from the credential’skid, the one the verifier checks against the accepted DIDs),issuer.key_idandcredential_type(the presentedvct); without it,credential_typeis given only when the vocabulary accepts a singlevct. Only withADDITIONAL_AUDIT_INFORMATION_CREDENTIAL_EVALUATION_ENABLED:trust.credential_evaluation, the verifier’s trust-marker and status results. Neverlevel_of_assurance(the Swiss e-ID is not an eIDAS means),statusorholder_binding, which the verifier checks but does not report separately.eupid,eupid-mdoc(eudi-verifier, the EUDI reference verifier)Always
verification_id,verified_at,helper.type,format,credential_type(the presentedvct, or the doctype),issuer.chain(thex5cof an SD-JWT VC, thex5chainof an mdoc’sissuerAuth) withissuer.subjectof its leaf and, for an SD-JWT VC,issuer.iss;presentation, the rawvp_tokenobject (credential query id to presentations);holder_bindingwithchecked: true– the verifier accepts no presentation without a valid key-binding JWT ordeviceSignature–method(kb-jwtordeviceSignature),nonce,audience(the verifier’s client id), for an SD-JWT VC the key-binding JWT’siat, for an mdochandover(client_id,nonce,jwk_thumbprintof the response encryption key,response_uri) andsession_transcript, the OpenID4VP SessionTranscript, base64url CBOR, whichdeviceSignaturecan be checked against again;status:listandindexof the credential’s status reference,checkedwhether the verifier reported checking it,result: "valid"then ({"checked": false}alone for a credential without one);request:dcql_query,client_id,nonce,response_mode,response_uri,profile(haiporopenid4vp) and the signedrequest_objectthe wallet fetched.trustis kych-trust’s record of the decision onissuer.chain:context(PID),trusted,anchor(the listed certificate, base64 DER),entity,service,list,list_issuedand the wholesnapshot(its serial, sequence number, issue date and hash), or anerrorif kych-trust could not be asked.level_of_assuranceonly when the trust section setsLEVEL_OF_ASSURANCEand kych-trust trusts the issuer: never for a simulated list.helper.versionwhen the verifier’s/actuator/inforeports its build (the package exposes it).eupid,eupid-mdoc(waltid-verifier2, walt.id verifier-api2)The same members as for eudi-verifier, with these differences, so that a client comparing the two can tell what each helper vouches for:
holder_binding.checkedis what walt.id’s presentation policies reported – for an SD-JWT VC the key-binding JWT’s signature, nonce, audience andsd_hashchecks all passed, for an mdocmso_mdoc/device-auth– andfalsewhen they are missing from its result;handover.jwk_thumbprintis the one walt.id names for its response key.status.checkedistruewhen walt.id’scredential-statuspolicy passed and found a status reference to check.trustsays how walt.id was told whom to trust, insourceandpolicy:kych-trustandx509-trust(the helper’sTRUST = kych-trust), then the rest is kych-trust’s record as for eudi-verifier –context,trusted,anchor,entity,service,list,list_issued,snapshot; orselfandetsi-trust-list(TRUST = self), thencontext,trusted,list(the URL walt.id fetched, or thefile://path of the list KyCH handed it) and, as walt.id reports them,entity,service_type(walt.id names a service by its type only, not by the name kych-trust’sservicegives),source_freshnessandauthenticity– but neitheranchornorsnapshotnorlist_issued, which walt.id does not report. Both carryhelper_result, walt.id’s own result of the policy.level_of_assuranceneedstrustedandholder_binding.checked.requesthas noprofile, butpolicies: the policies KyCH asked walt.id to apply to this credential, the trust roots or list included.helper.versionis walt.id’s own build version, from its OpenAPI document (info.version), read once per gateway process.
eupid,eupid-mdoc(kych-native: kych-oid4vp, KyCH’s own verifier)The evidence comes from the helper itself, in this shape (the KyCH-native helper API, KyCH-native Helper RESTful API), and is passed on as it is, with KyCH’s
verification_id. The same members as for eudi-verifier, with these differences:helperhasname,kych-oid4vp, and itsversion.trustis kych-trust’s record as for eudi-verifier (context,trusted,anchor,entity,service,list,list_issued,snapshot): the very decision the helper took, not a second one KyCH asked for afterwards.statushasformat(jwtorcwt: the form the list was fetched in, byAcceptper credential format) andsigner, kych-trust’s decision on the status list’s signer in the class’s revocation context (PIDStatus);checkedistrueandresultvalidwhenever the credential names a status list, since kych-oid4vp refuses one whose list it cannot fetch, read or trust.holder_bindingof an SD-JWT VC also hassd_hash;checkedistruebecause kych-oid4vp refuses any presentation without a valid key-binding JWT ordeviceSignature.requesthasprofile(haipforx509_hash,openid4vpforx509_san_dns) and the signedrequest_objectthe wallet fetched;presentationis thevp_tokenas the wallet sent it, decrypted.level_of_assuranceneeds the trust section’sLEVEL_OF_ASSURANCE, a trusted issuer and a verified holder binding, as for the others.
npa,eidas(kych-native: kych-eumw-bridge, kych-eid)npais served by kych-eumw-bridge in front of the Governikus eIDAS Middleware or by kych-eid,eidasby kych-eumw-bridge in front of the eIDAS-Node Connector. The evidence comes from the helper in KyCH’s shape and is passed on with KyCH’sverification_id; its members per helper are listed under Evidence. In short:helpernames the program;issueris the eID server (and, for kych-eid, the card’s document signer and CSCA) or the citizen’s country and its proxy service;trustsays what the eID server or the Connector checked;level_of_assuranceishighfornpaand the asserted level foreidas;presentationis the eID server’s own signed statement (the middleware’s SAML assertion, or kych-eid’s CMS-signed result) or the proxy service’s signed SAML response with the decrypted assertion. Fornpanothing in it can be checked against the card later.
22.10.9. Notification#
- POST /notification#
Webhook endpoint for receiving asynchronous notifications from a helper that has a webhook: the Swiyu Verifier, walt.id verifier-api2 with a
NOTIFY_URL, and KyCH’s own helpers (kych-native) with one, whose body is{"session_id": ...}(see Notification). The verifier calls this endpoint when a verification request changes state, typically when the user presents their credential. Whichever of the webhook, a/statuspoll and/returnlearns of the outcome first completes the session; the others find it done.When a notification is received, KyCH:
Looks up the verification session by the helper’s
verification_id.Queries that helper’s management API for the verification result, on the helper the session was started with.
If successful, extracts the disclosed claims and updates the session to
verifiedstatus.If failed, updates the session to
failedstatus.
This endpoint always returns
200 OKto acknowledge receipt, regardless of whether processing succeeded. Errors are logged internally. This prevents the verifier from retrying notifications that cannot be processed.Request:
- Request Headers:
Content-Type – Should be
application/json.
interface KyCHNotificationRequest { // UUID of the verification request as assigned by the Swiyu // Verifier (not KyCH's verificationId). KyCH uses this to look up // the corresponding session. verification_id: string; // ISO 8601 timestamp indicating when the verification state // changed. Used for logging and debugging. timestamp: string; }
Response:
- 200 OK:
Notification acknowledged. The response body is empty. This status is returned regardless of processing outcome to prevent retries, including for a body that is not JSON or that names no known verification.
22.10.10. Errors#
All error responses use the following format:
interface KyCHErrorResponse {
// Error code identifier
error: string;
}
Common error codes:
unauthorized: Missing or invalid authentication credentials.invalid_request: Malformed request parameters.invalid_redirect_uri: The redirect URI does not match the registered value.invalid_scope: Requested scopes are not allowed.invalid_grant: Authorization code is invalid, expired, or already used.invalid_client: Client authentication failed.invalid_token: Access token is invalid, expired, or revoked.invalid_state: The state parameter does not match.session_not_found: The session or verification was not found.session_expired: The session has expired.not_verified: The session has not been verified yet.vocabulary_not_selected: The client may use several vocabularies and the session has none chosen yet.no_vocabulary: The client’s registration lists no vocabulary the instance enables; a configuration problem of the operator’s.verifier_unavailable: Cannot communicate with the helper.verifier_error: The helper returned an error.verifier_invalid_response: The helper’s answer could not be understood.invalid_verification_url,invalid_verification_deeplink,invalid_browser_url: The helper handed out a URL with a scheme KyCH does not show the person.invalid_session_status: The session is not in a state that allows the request.vocabulary_already_chosen: The session’s vocabulary is fixed, to another one than the choice posted.claims_purged:/infoafter KyCH deleted the claims and the evidence.invalid_vocabulary: A vocabulary the client may not use.invalid_profile: A profile the client may not use, or one that covers none of the session’s possible vocabularies.unsupported_content_encoding: A request body compressed in a way KyCH does not read.request_too_large: A request body over the size limit.internal_error: An internal server error occurred.