Setting up a gateway

Before getting the .NET SDK installed in your project, it is important to setup the authorization endpoint. This can be done through the Codeguard dashboard.

Once the endpoint is configured, Codeguard will send a request to your endpoint whenever a connection is established. The .NET SDK will then serialize the data and send it as a POST request to the endpoint.

Accepting and rejecting connections

Upon successful configuration of the gateway endpoint, it is necessary to establish a method for the Codeguard nodes to interpret the response from your licensing endpoint.

The initial method for determining authorization is through the HTTP response code. If the endpoint returns a 401 Unauthorized error, the Codeguard node will reject the incoming connection. Conversely, if the response is a 200 status code, the node will authorize the connection.

Alternatively, if the licensing endpoint's return codes do not align with this format, it is possible to implement a Regex pattern to override the previously described behavior. This pattern will be matched against the endpoint response, and if a match is found, the session will be authorized.

Last updated