applicationId uz neni povinne

This commit is contained in:
JiriUhlir
2026-06-15 08:42:56 +02:00
parent b01c09006a
commit cadfdaef1b
7 changed files with 127 additions and 10 deletions
+5 -4
View File
@@ -59,13 +59,14 @@ builder.Services.AddSwaggerGen(options =>
"using the OAuth2 client credentials flow.\n\n" +
"**Credentials.** Every agenda endpoint needs an iDoklad ClientId, ClientSecret and ApplicationId. " +
"Sensitive values are required in request headers and are never accepted in the query string or body:\n\n" +
"- `X-ClientId` — iDoklad OAuth2 ClientId\n" +
"- `X-ClientSecret` — iDoklad OAuth2 ClientSecret (sensitive; TLS only)\n" +
"- `X-ApplicationId` — iDoklad ApplicationId from the developer portal\n" +
"- `X-ClientId` — iDoklad OAuth2 ClientId (required)\n" +
"- `X-ClientSecret` — iDoklad OAuth2 ClientSecret (required; sensitive; TLS only)\n" +
"- `X-ApplicationId` — OPTIONAL ApplicationId (GUID) for partner apps only; leave empty for a standard app\n" +
"- `X-Idoklad-Language` — optional response language (Cz, Sk, En)\n\n" +
"If a header is omitted, the matching environment default " +
"(`IDOKLAD_CLIENT_ID`, `IDOKLAD_CLIENT_SECRET`, `IDOKLAD_APPLICATION_ID`) is used. " +
"If neither a header nor a default is available, the request is rejected with 401.",
"Only ClientId and ClientSecret are required; if either is missing the request is rejected with 401. " +
"When no ApplicationId is provided, authentication uses client_id + client_secret only.",
});
options.OperationFilter<CredentialHeadersOperationFilter>();