Skip to main content

Users and Authentication

Arc uses OAuth 2.0 and authtoken-based authentication to control per-user access to the API. Authtokens are unique, randomly generated identifiers that users authenticate to an API with. Authtokens also represent the user’s current permissions. Authtokens let you connect using any of the major authentication schemes. For example, to use HTTP Basic authentication, set the username in the User header and the user’s corresponding authtoken in the Password header. See Authentication for more information on authenticating to the API. OAuth 2.0 provides a more structured authentication flow for clients that need to manage token lifecycles or integrate with external applications. Arc supports the Client Credentials grant type, which is intended for server-to-server integrations where no user interaction is required. Rather than authenticating directly with a static authtoken, OAuth 2.0 clients obtain a short-lived access token by presenting their client credentials to the Access URL.

Adding Users

To add a user, navigate to the Users tab for the connector, and click Add. In the Settings dialog, enter the following information: Click the Authentication tab to add details on authtokens and OAuth 2.0.
User-specific settings override server-wide API limit settings. An empty value for one of the user settings uses the server default.

Configuring the User Database

Arc stores user information in an SQLite database by default. You can also save user information to the database of your choice. If you are using the embedded server, specify the connection string to the caching database in the connectionStrings element of the Web.config file. Otherwise, refer to the documentation for the server you are hosting the application on.

Authentication

Users access API resources by providing authtokens with requests. You can manage users, authtokens, and OAuth 2.0 credentials on the Users configuration tab. Before users can call the API, you also need to set trusted IP addresses for connections. These settings are available on the Server configuration tab. By default, all IP addresses are restricted.

Using Authtokens in Basic Authentication

Enter the user’s authtoken as the password when using Basic Authentication.

Using Auth Tokens in the HTTP Header

Add the HTTP header x-cdata-authtoken with the desired authtoken as part of the HTTP request.

Using Authtokens as Query String Parameters

To allow the connector to pass the authtoken in query string parameters, open the Server tab of the API connector settings pane and select Allow authtoken in URL in the Advanced Settings section. After enabling this feature, you can specify the authtoken as the value of the @authtoken parameter, which can be supplied as part of the HTTP form-post data or a query parameter.