Skip to content

Core libraries for implementing OAuth 2.0 authorization flows in .NET applications, featuring modular architecture, cross-platform support, Blazor-based UI components, and comprehensive testing. Supports various data storage options and is available via NuGet for easy integration.

License

Notifications You must be signed in to change notification settings

DotNetExtensions/OAuth20.Server

Repository files navigation

DotNetExtensions.OAuth20.Server - Core OAuth 2.0 Authorization Libraries

License Contributors

DotNetExtensions.OAuth20.Server is a modular, cross-platform solution designed to implement OAuth 2.0 authorization flows in .NET applications. This project offers reusable libraries for core OAuth 2.0 functionalities and Blazor-based UI components, making it easy to integrate secure authorization services into your .NET projects.

Figure 1: OAuth 2.0 Protocol Flow (taken from dev.to article (authored by "Hem"))

Table of Contents

Project Overview

Welcome to the DotNetExtensions.OAuth20.Server project, a comprehensive solution for implementing OAuth 2.0 authorization flows in .NET applications. This repository contains the core OAuth 2.0 authorization libraries, data source integration libraries, and Blazor-based UI components (Admin Panel and Personal Account). These components are distributed via NuGet packages for easy integration into your .NET projects.

Key Features

  • Modular Architecture: Provides core functionality through reusable libraries, allowing for flexible integration into existing applications.
  • Cross-Platform Compatibility: Supports .NET 8, .NET Standard 2.0/2.1, and .NET Framework 4.8.1.
  • Flexible Data Storage: Supports in-memory, SQLite, MS SQL Server, PostgreSQL, MySQL, and more.
  • User Interfaces: Includes Blazor-based user-friendly Admin Panel and Personal Account UI for managing OAuth 2.0 consents and configurations.
  • Security Compliance: Adheres to the OAuth 2.0 RFC 6749 specification with additional enhancements.
  • CI/CD Integration: Automated workflows using GitHub Actions for building, testing, and release uploading.
  • Comprehensive Testing: Includes unit, integration, and load tests, benchmarks, demo projects, and configuration samples.

Getting Started

To get started with DotNetExtensions.OAuth20.Server, follow the installation instructions below to integrate the library into your project.

Installation

Prerequisites:

  • .NET SDK (version 8.0 or later)

Using NuGet Packages

The libraries are available as NuGet packages. To install, use the following command in your package manager console:

dotnet add package DotNetExtensions.OAuth20.Server --version x.x.x

Replace x.x.x with the latest version number from the NuGet Gallery.

Direct Download

You can also download the compiled library assemblies directly from the GitHub Releases page and add them to your project manually.

Adding Services and Middleware

Add the library services in your Startup.cs or Program.cs file:

services.AddOAuth20Server();

And use its middleware:

app.UseOAuth20Server();

Running Tests and Benchmarks

To run the unit tests included in the repository, use the following command:

dotnet test

To run benchmarks, navigate to the benchmarks directory and use:

dotnet run -c Release

Demo Projects

This project includes several demo projects within the repository to help you get started with different OAuth 2.0 flows. You can find these in the Demos directory. Follow the README files within each demo project for setup and usage instructions.

Project Structure

This project is part of the following repositories:

  • Project Repository: DotNetExtensions/OAuth20

    • Essential Project Documentation
  • Library Repository: DotNetExtensions/OAuth20.Server (Current Repository)

    • Core Libraries
    • Data Source Libraries
    • UI Libraries
    • Infrastructure (tests, benchmarks, demos)
    • Available via NuGet and direct download.
  • Hosted Application Repository: DotNetExtensions/OAuth20.Server.Host

    • ASP.NET Core Application
    • Integration with core and UI libraries
    • Infrastructure (tests, demos)
    • Deployment support via Docker, Kubernetes, Helm, Windows Service, IIS.

Development Workflow

We follow the GitFlow branching strategy for managing our development and release processes. For detailed information, please refer to our GitFlow Guide.

Roadmap

To understand our future plans and milestones, please refer to our Roadmap.

Task List

For a detailed breakdown of ongoing and upcoming tasks, please refer to our Task List.

Community and Support

For discussions, support, and feedback, please visit:

Contributing

We welcome contributions! Please read our Contributing Guidelines to get started.

For detailed information on coding, formatting, and contribution conventions, please refer to our Conventions file.

Please note that all contributions are expected to adhere to our Code of Conduct.

Security

We take the security of our project seriously. If you discover any security vulnerabilities, please report them by following the instructions in our Security Policy.

Change Log

All notable changes to this project are documented in our CHANGELOG.md.

License

This project is licensed under the MIT License.

References

This project is based on the OAuth 2.0 Authorization Framework, specifically following the guidelines set forth in RFC 6749.

About

Core libraries for implementing OAuth 2.0 authorization flows in .NET applications, featuring modular architecture, cross-platform support, Blazor-based UI components, and comprehensive testing. Supports various data storage options and is available via NuGet for easy integration.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published