Giter Site home page Giter Site logo

cwistsilver / dynusharp Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 155 KB

DynuSharp is a cross-platform library for providing comprehensive access to the full range of features offered by the Dynu API.

License: MIT License

C# 100.00%
api ddns dynu dynu-dns

dynusharp's Introduction

DynuSharp

DynuSharp NuGet

Thanks to Dynu

A big thanks to Dynu for offering such a versatile platform that spans beyond DNS services to include email, domain registration, and more. Their provision of a free tier is a testament to their commitment to making powerful web solutions accessible to everyone. Check out Dynu's website for more information on their services.

Overview

DynuSharp is a .NET library designed to facilitate seamless integration with Dynu's API, enabling developers to manage DNS, email, domain services, and more with utmost efficiency and security. This library leverages .NET's robust features to provide an intuitive interface for Dynu services, ensuring sensitive credentials are handled securely.

Features

  • Comprehensive API Coverage: Interact with Dynu's DNS, Email, and Domain services through a single, cohesive library.
  • Secure Secret Management: Implements advanced techniques to securely store and manage runtime secrets, including secure memory storage, obfuscation, and TPM-based solutions.
  • Flexible Authentication: Out-of-the-box support for API key and OAuth2, with the ability to extend or implement custom authentication mechanisms.

Authentication

DynuSharp offers built-in support for standard Dynu authentication methods (API key and OAuth2) and extends the capability to include custom authentication strategies through the 'IAuthentication' interface.

For API credentials management, visit Dynu API Credentials.

Standard Authentication Methods

API Key Authentication

var apiKey = "your_api_key_here";
var client = new DynuClient(apiKey);

OAuth2 Authentication

var clientId = "your_client_id_here";
var secret = "your_client_secret_here";
var client = new DynuClient(clientId, secret);

Custom Authentication

DynuSharp's design embraces extensibility, allowing developers to implement their own authentication mechanisms by implementing the IAuthentication interface.

public class CustomAuthentication : IAuthentication
{
    // Implementation of custom authentication logic
}

var customAuth = new CustomAuthentication();
var client = new DynuClient(customAuth);

Secure Secret Management

DynuSharp secures sensitive information such as API keys, client secrets, and client IDs using AES encryption as standard practice. Encrypted data is stored and utilized in-memory, leveraging TPM module technology when available for enhanced security. As a fallback, obfuscation techniques are employed to slightly increase security. No secrets are permanently stored, ensuring they remain accessible only for the duration of the client's lifespan. While these measures significantly enhance the protection of sensitive information, it's acknowledged that no system can guarantee 100% security.

Example

Here's a quick demonstration of DynuSharp in action:

using var client = new DynuClient("api_key");
var dnsDomains = await client.DNS.Domains.GetListAsync();
foreach (var domain in dnsDomains)
{
    var records = await client.DNS.Records.GetListAsync(domain.Id);
    foreach (var record in records)
    {
        Console.WriteLine(record);
    }
}

This code snippet highlights how DynuSharp makes it straightforward to interact with Dynu's API, streamlining the process of managing DNS records with ease and efficiency.

DynuSharp.HttpTest Example

For a practical demonstration of 'DynuSharp' in action, check out the DynuSharp.HttpTest console application. This companion project serves as both a testing framework and an example implementation, showcasing how to integrate and validate connectivity with Dynu API endpoints. Whether you're new to 'DynuSharp' or looking for advanced usage examples, 'DynuSharp.HttpTest' provides valuable insights into the library's capabilities.

Contributing

Contributions to 'DynuSharp' are welcome. Follow these steps to contribute:

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/YourFeature)
  3. Commit your Changes (git commit -m 'Add YourFeature')
  4. Push to the Branch (git push origin feature/YourFeature)
  5. Open a Pull Request

Licence

'DynuSharp' is licenced under the MIT licence.

Dependencies

'DynuSharp' utilizes the following packages, which need to be included as dependencies in your project:

dynusharp's People

Contributors

cwistsilver avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.