Druware.Server.Controllers 1.1.24

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 Druware.Server.Controllers --version 1.1.24
                    
NuGet\Install-Package Druware.Server.Controllers -Version 1.1.24
                    
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="Druware.Server.Controllers" Version="1.1.24" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Druware.Server.Controllers" Version="1.1.24" />
                    
Directory.Packages.props
<PackageReference Include="Druware.Server.Controllers" />
                    
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 Druware.Server.Controllers --version 1.1.24
                    
#r "nuget: Druware.Server.Controllers, 1.1.24"
                    
#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 Druware.Server.Controllers@1.1.24
                    
#: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=Druware.Server.Controllers&version=1.1.24
                    
Install as a Cake Addin
#tool nuget:?package=Druware.Server.Controllers&version=1.1.24
                    
Install as a Cake Tool

Druware.Server.Controllers

This package implements the Controllers associated with the foundation elements within the Druware.Server library. They are however isolated out into this library in order to allow any user or implementation to replace them with their own custom implementations if these to not suit the need.

As of version 1.0.8, in addition to supporting PostgreSQL and Microsoft SQL Server, Sqlite is now also supported ( with known warnings that schemas are not supported during the migration ).

Documentation

Full documentation is 'slowly' coming together in the 'docs' folder.

Dependencies

Requires .net8.0

  • Druware.Extensions
  • Druware.Server
  • RESTfulFoundation
  • Microsoft.AspNetCore.Identity
  • Microsoft.AspNetCore.Identity.EntityFramework
  • Microsoft.Extensions.Configuration
  • Microsoft.Extensions.Configuration.Binder

Mail Configuration

Account email ( registration confirmation, password reset, and the MFA code ) is sent through Druware.Server.Email.IEmailSender. The Azure Communication Services implementation is provided by Druware.Server; this controller package no longer creates an Azure client or reads connection strings itself.

Register the shared sender and the default controller services at startup:

builder.Services.AddDruwareAzureEmail(builder.Configuration);
builder.Services.AddDruwareServerControllers();

The default registration confirmation message retains the original Druware subject and plain-text confirmation link. Applications can preserve their own branded email by implementing IRegistrationConfirmationEmailFactory and registering it before AddDruwareServerControllers:

builder.Services.AddSingleton<IRegistrationConfirmationEmailFactory,
    BrandedRegistrationConfirmationEmailFactory>();
builder.Services.AddDruwareServerControllers();

Both public registration and administrator-created accounts use this factory, and each account creation sends only the single message it produces.

The connection string is a secret and is supplied through the environment, so that it never lands in a checked in appsettings.json:

export COMMUNICATION_SERVICES_CONNECTION_STRING="endpoint=https://<resource>.communication.azure.com/;accesskey=<key>"

On Azure App Service this is set as an application setting of the same name. API__Mail__Azure__ConnectionString also works, as the configuration provider maps it onto the API:Mail:Azure:ConnectionString key.

The API:Mail:Azure:ConnectionString value in appsettings.json is still read as a last resort for existing deployments, but it is deprecated and should be removed from appsettings.json in favour of the environment variable. The environment variable wins when both are present.

The non-secret settings remain in appsettings.json:

{
  "API": {
    "Mail": {
      "Azure": {
        "SenderAddress": "DoNotReply@<verified-domain>"
      }
    }
  }
}

The configured sender address must be a sender on a domain that is verified/connected to the Communication Services resource. The legacy API:Notification:From setting remains available as a fallback.

History

See Changelog.md for detailed history

License

This project is under the GPLv3 license, see the included LICENSE.txt file

Copyright 2019-2024 by:
    Andy 'Dru' Satori @ Satori & Associates, Inc.
    All Rights Reserved
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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. 
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