feat(notifications): configurable OAuth2 authority + scope per SMTP configuration (defaults preserve M365) — entity + EF + migration + token service
Claude-Session: https://claude.ai/code/session_01MtdgwpEeCUn6cUA5f1LMPj
This commit is contained in:
+9
@@ -126,5 +126,14 @@ public class SmtpConfigurationConfiguration : IEntityTypeConfiguration<SmtpConfi
|
||||
builder.Property(s => s.FromAddress)
|
||||
.IsRequired()
|
||||
.HasMaxLength(500);
|
||||
|
||||
// Optional OAuth2 token-endpoint overrides — null preserves the M365 defaults.
|
||||
builder.Property(s => s.OAuth2Authority)
|
||||
.IsRequired(false)
|
||||
.HasMaxLength(500);
|
||||
|
||||
builder.Property(s => s.OAuth2Scope)
|
||||
.IsRequired(false)
|
||||
.HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
|
||||
+2028
File diff suppressed because it is too large
Load Diff
+40
@@ -0,0 +1,40 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class AddSmtpOAuth2AuthorityScope : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "OAuth2Authority",
|
||||
table: "SmtpConfigurations",
|
||||
type: "nvarchar(500)",
|
||||
maxLength: 500,
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "OAuth2Scope",
|
||||
table: "SmtpConfigurations",
|
||||
type: "nvarchar(500)",
|
||||
maxLength: 500,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OAuth2Authority",
|
||||
table: "SmtpConfigurations");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "OAuth2Scope",
|
||||
table: "SmtpConfigurations");
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
@@ -984,6 +984,14 @@ namespace ZB.MOM.WW.ScadaBridge.ConfigurationDatabase.Migrations
|
||||
b.Property<int>("MaxRetries")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OAuth2Authority")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("OAuth2Scope")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("Port")
|
||||
.HasColumnType("int");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user