FractalDataWorks.Services.Authentication.Abstractions 0.4.0-preview.6

This is a prerelease version of FractalDataWorks.Services.Authentication.Abstractions.
The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package FractalDataWorks.Services.Authentication.Abstractions --version 0.4.0-preview.6
                    
NuGet\Install-Package FractalDataWorks.Services.Authentication.Abstractions -Version 0.4.0-preview.6
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FractalDataWorks.Services.Authentication.Abstractions" Version="0.4.0-preview.6" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="FractalDataWorks.Services.Authentication.Abstractions" Version="0.4.0-preview.6" />
                    
Directory.Packages.props
<PackageReference Include="FractalDataWorks.Services.Authentication.Abstractions" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add FractalDataWorks.Services.Authentication.Abstractions --version 0.4.0-preview.6
                    
#r "nuget: FractalDataWorks.Services.Authentication.Abstractions, 0.4.0-preview.6"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package FractalDataWorks.Services.Authentication.Abstractions@0.4.0-preview.6
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=FractalDataWorks.Services.Authentication.Abstractions&version=0.4.0-preview.6&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=FractalDataWorks.Services.Authentication.Abstractions&version=0.4.0-preview.6&prerelease
                    
Install as a Cake Tool

FractalDataWorks.Services.Authentication.Abstractions

Authentication abstractions providing contracts for authentication services, token management, and security contexts.

Overview

This package defines the core contracts for authentication services:

  • IAuthenticationProvider - Service resolution and factory management
  • IAuthenticationService - Token validation, refresh, and revocation
  • IAuthenticationConfiguration - Configuration for authentication instances
  • IAuthenticationContext - User identity, roles, claims, and authentication state
  • TypeCollections - AuthenticationMethods, AuthenticationProtocols, AuthenticationFlows, TokenTypes

Target Framework: .NET Standard 2.0

Key Interfaces

IAuthenticationProvider

From IAuthenticationProvider.cs:1-11:

/// <summary>
/// Interface for providers that create and manage authentication services.
/// Inherits Create methods from IFdwServiceProvider.
/// </summary>
public interface IAuthenticationProvider : IFdwServiceProvider<IAuthenticationService, IAuthenticationConfiguration>
{
    // Inherits from IFdwServiceProvider:
    // IGenericResult<IAuthenticationService> Create(IAuthenticationConfiguration configuration);
    // IGenericResult<IAuthenticationService> Create(string name);
    // IGenericResult<IAuthenticationService> Create(Guid id);
    // IGenericResult<T> Create<T>(IAuthenticationConfiguration configuration) where T : IAuthenticationService;
    // IGenericResult<T> Create<T>(string name) where T : IAuthenticationService;
    // IGenericResult<T> Create<T>(Guid id) where T : IAuthenticationService;
}

IAuthenticationService

From IAuthenticationService.cs:31-64:

public interface IAuthenticationService : IDisposable, IGenericService
{
    Task<IGenericResult<IAuthenticationContext>> Authenticate(string token, CancellationToken cancellationToken = default);

    Task<IGenericResult<bool>> ValidateToken(string token, CancellationToken cancellationToken = default);

    Task<IGenericResult<string>> RefreshToken(string refreshToken, CancellationToken cancellationToken = default);

    Task<IGenericResult> RevokeToken(string token, CancellationToken cancellationToken = default);
}

IAuthenticationContext

From IAuthenticationContext.cs:31-251:

public interface IAuthenticationContext
{
    string UserId { get; }
    string Username { get; }
    IDictionary<string, object> Claims { get; }
    IEnumerable<string> Roles { get; }
    bool IsAuthenticated { get; }
    SecurityMethodBase AuthenticationMethod { get; }
    DateTimeOffset? ExpiresAt { get; }
}

IAuthenticationConfiguration

From IAuthenticationConfiguration.cs:11-66:

public interface IAuthenticationConfiguration : IGenericConfiguration
{
    string AuthenticationType { get; }
    IServiceLifetime Lifetime { get; }
    string? SecretManagerName { get; init; }
    string? SecretKeyName { get; init; }
    string ClientId { get; }
    string Authority { get; }
    string RedirectUri { get; }
    string[] Scopes { get; }
    bool EnableTokenCaching { get; }
    int TokenCacheLifetimeMinutes { get; }
}

TypeCollections

This package defines several TypeCollections for authentication concepts:

AuthenticationMethods

From AuthenticationMethods.cs:13-15:

[TypeCollection(typeof(AuthenticationMethodBase), typeof(IAuthenticationMethod), typeof(AuthenticationMethods))]
public abstract partial class AuthenticationMethods : TypeCollectionBase<AuthenticationMethodBase, IAuthenticationMethod>
{
}

AuthenticationProtocols

From AuthenticationProtocols.cs:13-16:

[TypeCollection(typeof(AuthenticationProtocolBase), typeof(IAuthenticationProtocol), typeof(AuthenticationProtocols))]
public abstract partial class AuthenticationProtocols : TypeCollectionBase<AuthenticationProtocolBase, IAuthenticationProtocol>
{
}

TokenTypes

From TokenTypes.cs:13-16:

[TypeCollection(typeof(TokenTypeBase), typeof(ITokenType), typeof(TokenTypes))]
public abstract partial class TokenTypes : TypeCollectionBase<TokenTypeBase, ITokenType>
{
}
  • FractalDataWorks.Services.Authentication - Concrete implementations including AuthenticationTypes ServiceTypeCollection
  • FractalDataWorks.Services.Authentication.Jwt - JWT authentication implementation
  • FractalDataWorks.Services.Abstractions - Base service interfaces

Next Steps

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
Loading failed