Add UseOidc method to turn on OIDC authentication. Technically that just changes value of the Authorization header from DiadocToken scheme to Bearer scheme.
Add overload with authToken argument to methods that haven't had them. These methods don't require DiadocToken on server side. But it will be required to pass authToken with OIDC. Both overloads will work with DiadocToken without any problems. Checked methods in public client types: IDiadocApi, DiadocHttpApi, IDocflowApi, DocflowHttpApi, IComDiadocApi.
Add a test that enforces "overload with authToken must exist" rule on public client types.
Later, after public announcement about OIDC, overloads without authToken argument will be marked obsolete.
List of methods that don't require DiadocToken on server
The list was builded automatically using reflection. It contains all actions in server app with `[SkipTokenValidation]` attribute.
➖ -- overload is not required, because the method isn't going to be used with OIDC
🚶 -- overload is not required because the method is gone (API responds with HTTP 410)
Ⓜ️ -- the methods missed from the client and overload wasn't added too
✅ -- the method either already had overload with `authToken` or such overload was added
* ➖ Authenticate
* Ⓜ️ Devices
* ✅ GenerateAcceptanceCertificateXmlForSeller
* ✅ GenerateInvoiceXml
* ✅ GenerateTorg12XmlForSeller
* ✅ GenerateUniversalTransferDocumentXmlForSeller
* ✅ GetBox
* Ⓜ️ GetBoxesByInnKpp
* Ⓜ️ GetBoxInfo
* 🚶 GetExternalServiceAuthInfo
* ✅ GetOrganization
* ✅ GetOrganizationsByInnKpp
* ✅ GetOrganizationsByInnList
* 🚶 GetRecognized
* ✅ ParseAcceptanceCertificateBuyerTitleXml
* ✅ ParseAcceptanceCertificateSellerTitleXml
* ✅ ParseInvoiceXml
* ✅ ParseRevocationRequestXml
* ✅ ParseRussianAddress
* ✅ ParseSignatureRejectionXml
* ✅ ParseTorg12BuyerTitleXml
* ✅ ParseTorg12SellerTitleXml
* ✅ ParseUniversalCorrectionDocumentBuyerTitleXml
* ✅ ParseUniversalCorrectionDocumentSellerTitleXml
* ✅ ParseUniversalTransferDocumentBuyerTitleXml
* ✅ ParseUniversalTransferDocumentSellerTitleXml
* 🚶 Recognize
* Ⓜ️ SendMessage
* Ⓜ️ PostDraft
* ➖ V2/Authenticate
* ➖ V2/AuthenticateConfirm
* Ⓜ️ V2/ParseRussianAddress
* ➖ V3/Authenticate
* Ⓜ️ VerifyThatUserHasAccessToAnyBox
DDCORE-8610
Authorization
header fromDiadocToken
scheme toBearer
scheme.authToken
argument to methods that haven't had them. These methods don't requireDiadocToken
on server side. But it will be required to passauthToken
with OIDC. Both overloads will work with DiadocToken without any problems. Checked methods in public client types:IDiadocApi
,DiadocHttpApi
,IDocflowApi
,DocflowHttpApi
,IComDiadocApi
.authToken
must exist" rule on public client types.authToken
argument will be marked obsolete.List of methods that don't require DiadocToken on server
The list was builded automatically using reflection. It contains all actions in server app with `[SkipTokenValidation]` attribute. ➖ -- overload is not required, because the method isn't going to be used with OIDC 🚶 -- overload is not required because the method is gone (API responds with HTTP 410) Ⓜ️ -- the methods missed from the client and overload wasn't added too ✅ -- the method either already had overload with `authToken` or such overload was added * ➖ Authenticate * Ⓜ️ Devices * ✅ GenerateAcceptanceCertificateXmlForSeller * ✅ GenerateInvoiceXml * ✅ GenerateTorg12XmlForSeller * ✅ GenerateUniversalTransferDocumentXmlForSeller * ✅ GetBox * Ⓜ️ GetBoxesByInnKpp * Ⓜ️ GetBoxInfo * 🚶 GetExternalServiceAuthInfo * ✅ GetOrganization * ✅ GetOrganizationsByInnKpp * ✅ GetOrganizationsByInnList * 🚶 GetRecognized * ✅ ParseAcceptanceCertificateBuyerTitleXml * ✅ ParseAcceptanceCertificateSellerTitleXml * ✅ ParseInvoiceXml * ✅ ParseRevocationRequestXml * ✅ ParseRussianAddress * ✅ ParseSignatureRejectionXml * ✅ ParseTorg12BuyerTitleXml * ✅ ParseTorg12SellerTitleXml * ✅ ParseUniversalCorrectionDocumentBuyerTitleXml * ✅ ParseUniversalCorrectionDocumentSellerTitleXml * ✅ ParseUniversalTransferDocumentBuyerTitleXml * ✅ ParseUniversalTransferDocumentSellerTitleXml * 🚶 Recognize * Ⓜ️ SendMessage * Ⓜ️ PostDraft * ➖ V2/Authenticate * ➖ V2/AuthenticateConfirm * Ⓜ️ V2/ParseRussianAddress * ➖ V3/Authenticate * Ⓜ️ VerifyThatUserHasAccessToAnyBox