
API Integration Manual for Daikin DKN Cloud Wi-Fi Adaptor
2 AUTHENTICATION
The authentication mechanism, which allows a third party service to connect to the DKN Cloud NA
ecosystem, is based on the OAuth2 standard implementation. OAuth2 is an authorization
framework that enables applications to obtain limited access to user accounts on an HTTP service.
It works by delegating user authentication to the service that hosts the user account, and
authorizing third-party applications to access the user account. The following sections will provide
an overview of OAuth2 roles, the Authorization Code grant type (Authorization flow used for the
Open API) and how it’s been adopted to work with the Open API. This section is guided towards
developers.
2.1 Oauth2 Fundamentals
2.1.1 Oauth Roles
Oauth defines four roles:
Resource Owner, User: The resource owner is the user who authorizes an application to access
their account. The application's access to the user's account is limited to the "scope" of the
authorization granted (e.g. read or write access). In this case, the user corresponds to a
registered user in the DKN Cloud NA App, and the allowed “scopes” by the Open API are the
user’s devices and groups information.
Resource / Authorization Server, API: The resource server hosts the protected user accounts,
and the authorization server verifies the identity of the user then issues access tokens to the
application. In the Open API implementation, the DKN Cloud NA ecosystem fulfills both the
resource and authorization server roles.
Client, Third Party Application: The client is the third party application that wants to access the
user's account. Before it may do so, it must be authorized by the user, and the authorization
must be validated by the Server.
2.1.2 Third Party Client Application Registration
Before using Oauth, the third party client application must be registered with the Open API service,
where the following details of the application must be provided:
Application Name
List of Redirect URI or Callback URL
The redirect URI is where the Open API will redirect the user after they authorize (or deny) the
application, and therefore the part of the application that will handle authorization codes or access
tokens. This must be seen as a list of valid URLs. As we will see next, on the authentication
process using a web interface based flow, the application must specify a redirect URL. This URL
must match one of the registered URLS. This is a safety measure used to ensure that the user will
only be directed to appropriate locations.
As of now, this registration is done exclusively on demand, and requires manual interaction
of the system administrator of the DKN Cloud NA ecosystem.
2.1.3 Client ID and Client Secret
Once the third party application is registered, the Open API service will issue "client credentials" in
the form of a client identifier and a client secret. The Client ID is a publicly exposed string that is