Modifying and re-deploying the PowerServer project

Step 1: Add the INI file CloudSetting.ini to the Files preloaded in uncompressed format section in the Application page.


Step 2: Select RESTClient Support under the Runtime files group in the Application page > Advanced tab.


Step 3: Select Use built-in JWT server in the Security page.

Select Use built-in JWT server from the Auth Template list box, view the license terms, and select the "I have read and agree to the license..." option.


Step 4: Save the changes and then deploy the PowerServer project again (using the "Build & Deploy PowerServer Project" option).

The PowerServer C# solution > UserExtensions project contains a built-in JWT server and the authentication class files as shown below.


  • The built-in JWT server authenticates the user credential and returns a token. The built-in server runs automatically when the PowerServer Web APIs (the ServerAPIs project) runs.

  • The authentication class and configuration files will be used by the PowerServer Web APIs to validate the token passed from the client and, if validation is successful, data will be obtained from the database.

    • DefaultUserStore.cs defines two users by default. The built-in server will by default validate users passed from the client against user credentials stored in this file. You can change this file to define more users.

    • DatabaseUserStore.cs can connect with an authentication database. The built-in server can validate users passed from the client against the user credentials stored in the database. Refer to Authenticate users against a database for how to implement it.

    • Authentication.json contains the settings for enabling the authentication feature ("PowerServer:EnableAuthentication") and specifying the JWT token information ("JwtSetting").

      The "PowerServer:EnableAuthentication" setting is set to true by default. Setting it to false will turn off the authentication feature. The "JwtSetting" block is used to specify the token information including the issuer, audience and security key.