FractalDataWorks.Services.Authentication.Abstractions
0.4.0-preview.6
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
<PackageReference Include="FractalDataWorks.Services.Authentication.Abstractions" Version="0.4.0-preview.6" />
<PackageVersion Include="FractalDataWorks.Services.Authentication.Abstractions" Version="0.4.0-preview.6" />
<PackageReference Include="FractalDataWorks.Services.Authentication.Abstractions" />
paket add FractalDataWorks.Services.Authentication.Abstractions --version 0.4.0-preview.6
#r "nuget: FractalDataWorks.Services.Authentication.Abstractions, 0.4.0-preview.6"
#:package FractalDataWorks.Services.Authentication.Abstractions@0.4.0-preview.6
#addin nuget:?package=FractalDataWorks.Services.Authentication.Abstractions&version=0.4.0-preview.6&prerelease
#tool nuget:?package=FractalDataWorks.Services.Authentication.Abstractions&version=0.4.0-preview.6&prerelease
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>
{
}
Related Packages
- FractalDataWorks.Services.Authentication - Concrete implementations including
AuthenticationTypesServiceTypeCollection - FractalDataWorks.Services.Authentication.Jwt - JWT authentication implementation
- FractalDataWorks.Services.Abstractions - Base service interfaces
Next Steps
- See FractalDataWorks.Services.Authentication for the
AuthenticationTypesServiceTypeCollection and provider implementations - See the wiki documentation for authentication patterns and usage examples
| Product | Versions 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. |
-
.NETStandard 2.0
- FractalDataWorks.Abstractions (>= 0.4.0-preview.6)
- FractalDataWorks.Collections (>= 0.4.0-preview.6)
- FractalDataWorks.Configuration.Abstractions (>= 0.4.0-preview.6)
- FractalDataWorks.Services.Abstractions (>= 0.4.0-preview.6)
- FractalDataWorks.Web.Http.Abstractions (>= 0.4.0-preview.6)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 10.0.1)
- Microsoft.Extensions.Diagnostics.HealthChecks (>= 10.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 10.0.1)
- System.Collections.Immutable (>= 10.0.1)
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 |
|---|