Skip to content

.NET client for the Authok Authentication & Management APIs.

License

Notifications You must be signed in to change notification settings

authok/authok.net

Repository files navigation

.NET client for Authok Authentication and Management APIs

Release Downloads License AzureDevOps

📚 Documentation - 🚀 Getting Started - 💻 API Reference - 💬 Feedback

Documentation

  • Docs site - explore our docs site and learn more about Authok.

Getting started

Requirements

This library supports .NET Standard 2.0 and .NET Framework 4.5.2 as well as later versions of both.

Management API

Installation

Install-Package Authok.ManagementApi

Usage

Generate a token for the API calls you wish to make (see Access Tokens for the Management API). Create an instance of the ManagementApiClient class with the token and the API URL of your Authok instance:

var client = new ManagementApiClient("your token", new Uri("https://YOUR_AUTHOK_DOMAIN/api/v2"));

The API calls are divided into groups which correlate to the Management API documentation. For example all Connection related methods can be found under the ManagementApiClient.Connections property. So to get a list of all database (Authok) connections, you can make the following API call:

await client.Connections.GetAllAsync("authok");

Authentication API

Installation

Install-Package Authok.AuthenticationApi

Usage

To use the Authentication API, create a new instance of the AuthenticationApiClient class, passing in the URL of your Authok instance, e.g.:

var client = new AuthenticationApiClient(new Uri("https://YOUR_AUTHOK_DOMAIN"));

Authentication

This library contains URL Builders which will assist you with constructing an authentication URL, but does not actually handle the authentication/authorization flow for you. It is suggested that you refer to the Quickstart tutorials for guidance on how to implement authentication for your specific platform.

Important note on state validation: If you choose to use the AuthorizationUrlBuilder to construct the authorization URL and implement a login flow callback yourself, it is important to generate and store a state value (using WithState) and validate it in your callback URL before exchanging the authorization code for the tokens.

Feedback

Contributing

We appreciate feedback and contribution to this repo! Before you get started, please see the following:

Raise an issue

To provide feedback or report a bug, please raise an issue on our issue tracker.

Vulnerability Reporting

Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.


Authok Logo

Authok is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Authok?

This project is licensed under the MIT license. See the LICENSE file for more info.

About

.NET client for the Authok Authentication & Management APIs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages