📚 Documentation - 🚀 Getting Started - 💻 API Reference - 💬 Feedback
- Docs site - explore our docs site and learn more about Authok.
This library supports .NET Standard 2.0 and .NET Framework 4.5.2 as well as later versions of both.
Install-Package Authok.ManagementApi
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");
Install-Package Authok.AuthenticationApi
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"));
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.
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
To provide feedback or report a bug, please raise an issue on our issue tracker.
Please do not report security vulnerabilities on the public GitHub issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
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.