Views:
Question:
How do we use OAuth2 for the .NET SDK and REST API?

Answer:
Commencing in DocuWare 7.11, Cookie Authentication in the API will be deprecated to further increase the security of DocuWare. 
To switch from Cookie Authentication to OAuth2, please refer to the following methods for converting to OAuth2 with the .NET SDK or REST API.

.NET SDK
  • For the .NET SDK, ensure that the projects' NuGet packages have been updated to the latest version, as shown in the following version overview: Version overview | DocuWare SDK Documentation
    *NOTE: Version 13.* and newer of DocuWare.Platform.ServerClient is required for OAuth2, which is used by DocuWare.Platform.ServerClient.Extensions version 11.12.* and newer.

     
  • The service connection will perform the OAuth2 authentication in the background, meaning that no changes to the code will be needed. 

REST API
Our Postman Collection has been updated to use OAuth2 authentication instead of cookie authentication. To authenticate using OAuth2, the following sequence of requests must be made.

  1. Get responsible Identity Service -This will retrieve information about the Identity service in the DocuWare platform.
     
  2. Get Identity Service Configuration - This call retrieves the OpenID configuration for the Identity Service. 
     
  3. Use either one of the following requests to obtain an Access Token from the Identity Service for use of Authentication and authorization purposes.

    3.a Request Token w/ Username & Password
    3.b Request Token w/ a  DocuWare Token
    3.c Request Token w/ Username & Password (Trusted User)
    3.d.1 Obtain Windows Authorization (On-Premises Only)
    3.d.2 Request Token /w a Windows Account (On-Premises Only)

For more detailed information on the Requests involved and on Cookie Authentication deprecation, please refer to the following;

*NOTE: For On-premise customers, please be aware that these changes come into effect in DocuWare 7.11. You can still utilize cookie authentication on DocuWare 7.10 and below systems. 

KBA applicable for both Cloud and On-premise Organizations