as api cdcavell - cdcavell/cdcavell.name Wiki

as_api_cdcavell.Authorization.ReadHandler

Read Handler

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/31/2020 Initial build Authorization Service
Christopher D. Cavell 1.1.0.0 03/24/2021 Integrate ASP.NET Core Identity

Methods:

ReadHandler()

Constructor method

HandleRequirementAsync(AuthorizationHandlerContext context, ReadRequirement requirement)

Handle Requirement method

Parameters
context AuthorizationHandlerContext
requirement AuthenticatedRequirement

Returns:

Task

( Home )

as_api_cdcavell.Authorization.ReadRequirement

Read Access Requirement

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/30/2021 Initial build Authorization Service
Properties
Authorized bool

Methods:

ReadRequirement(bool isAuthorized)

Constructor method

Parameters
isAuthorized bool

( Home )

as_api_cdcavell.Authorization.WriteHandler

Write Handler

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/31/2021 Initial build Authorization Service
Christopher D. Cavell 1.1.0.0 03/24/2021 Integrate ASP.NET Core Identity

Methods:

WriteHandler()

Constructor method

HandleRequirementAsync(AuthorizationHandlerContext context, WriteRequirement requirement)

Handle Requirement method

Parameters
context AuthorizationHandlerContext
requirement AuthenticatedRequirement

Returns:

Task

( Home )

as_api_cdcavell.Authorization.WriteRequirement

Write Access Requirement

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/30/2021 Initial build Authorization Service
Properties
Authorized bool

Methods:

WriteRequirement(bool isAuthorized)

Constructor method

Parameters
isAuthorized bool

( Home )

as_api_cdcavell.Controllers.ApplicationBaseController

Base controller class for application

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/18/2021 Initial build Authorization Service
Christopher D. Cavell 1.1.0.0 03/23/2021 Integrate ASP.NET Core Identity
Fields
_appSettings AppSettings
_dbContext AuthorizationServiceDbContext
_authorizationService IAuthorizationService

Methods:

ApplicationBaseController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext )

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

( Home )

as_api_cdcavell.Controllers.DateTimeController

Current date time controller class for application

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/19/2021 Initial build Authorization Service

Methods:

public DateTimeController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Get

Get action method

( Home )

as_api_cdcavell.Controllers.Role.CreateController

Identity Role CreateAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.0 04/11/2021 Permission-Based Authorization

Methods:

public CreateController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

Create Post Method

( Home )

as_api_cdcavell.Controllers.Role.FindByIdController

Identity Role FindByIdAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.0 04/11/2021 Permission-Based Authorization

Methods:

public FindByIdController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindById Post Method

( Home )

as_api_cdcavell.Controllers.Role.FindByNormalizedNameController

Identity Role FindByNormalizedNameAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.0 04/11/2021 Permission-Based Authorization

Methods:

public FindByNormalizedNameController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindByNormalizedName Post Method

( Home )

as_api_cdcavell.Controllers.Role.GetApprovedUsersController

Custom GetApprovedUsersAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.4 07/03/2021 Permission-Based Authorization

Methods:

public GetApprovedUsersController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

GetActiveUsers Post Method

( Home )

as_api_cdcavell.Controllers.Role.GetRolesController

Identity Role Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.0 04/09/2021 Permission-Based Authorization

Methods:

public GetRolesController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post

GetRoles Post Method

( Home )

as_api_cdcavell.Controllers.Role.GetUsersController

Identity Role GetUsersAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.0 04/11/2021 Permission-Based Authorization

Methods:

public GetUsersController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

GetUsers Post Method

( Home )

as_api_cdcavell.Controllers.Role.UpdateController

Identity Role UpdateAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/27/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/06/2021 Permission-Based Authorization

Methods:

public UpdateController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

Update Post Method

( Home )

as_api_cdcavell.Controllers.User.CreateController

Identity User CreateAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/24/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/06/2021 Permission-Based Authorization

Methods:

public CreateController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

Create Post Method

( Home )

as_api_cdcavell.Controllers.User.FindByClaimController

Identity User FindByClaimAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/26/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/10/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview

Methods:

public FindByClaimController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindByClaim Post Method

( Home )

as_api_cdcavell.Controllers.User.FindByIdController

Identity User FindByIdAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/25/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/10/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview

Methods:

public FindByIdController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindById Post Method

( Home )

as_api_cdcavell.Controllers.User.FindByLoginController

Identity User FindByLoginAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/25/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/10/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview

Methods:

public FindByLoginController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindByLogin Post Method

( Home )

as_api_cdcavell.Controllers.User.FindByNameController

Identity User FindByNameAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/25/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/10/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview

Methods:

public FindByNameController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindByName Post Method

( Home )

as_api_cdcavell.Controllers.User.FindByNormalizedEmailController

Identity User FindByNormalizedEmailAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/26/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/10/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview

Methods:

public FindByNormalizedEmailController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindByNormalizedEmail Post Method

( Home )

as_api_cdcavell.Controllers.User.FindByNormalizedNameController

Identity User FindByNormalizedNameAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/26/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/10/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview

Methods:

public FindByNormalizedNameController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

FindByNormalizedName Post Method

( Home )

as_api_cdcavell.Controllers.User.PendingRegistrationsController

Custom PendingRegistrations Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview

Methods:

public PendingRegistrationsController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post

PendingRegistrations Post Method

( Home )

as_api_cdcavell.Controllers.User.RoleClaimHistoryController

Custom RoleClaimHistory Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization

Methods:

public RoleClaimHistoryController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

RoleClaimHistory Post Method

( Home )

as_api_cdcavell.Controllers.User.UpdateController

Identity User UpdateAsync Controller Class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.1.0.0 03/27/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/06/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.2 06/13/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.3 06/27/2021 ASP.NET Core 6.0 Preview
Christopher D. Cavell 1.1.1.4 07/03/2021 Permission-Based Authorization

Methods:

public UpdateController( ILogger logger, IWebHostEnvironment webHostEnvironment, IHttpContextAccessor httpContextAccessor, IAuthorizationService authorizationService, AppSettings appSettings, AuthorizationServiceDbContext dbContext ) : base(logger, webHostEnvironment, httpContextAccessor, authorizationService, appSettings, dbContext)

Constructor method

Parameters
logger ILogger
webHostEnvironment IWebHostEnvironment
httpContextAccessor IHttpContextAccessor
authorizationService IAuthorizationService
appSettings AppSettings
dbContext AuthorizationServiceDbContext

Post(System.Object)

Update Post Method

( Home )

as_api_cdcavell.Data.AuditEntry

CDCavell AuditEntry record

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/18/2021 Initial build Authorization Service
Christopher D. Cavell 1.1.1.0 04/05/2021 Permission-Based Authorization
Properties
Entry EntityEntry
TableName string
State string
Application string
ModifiedBy string
ModifiedOn DateTime
KeyValues Dictionary<string, object>
OriginalValues Dictionary<string, object>
CurrentValues Dictionary<string, object>
TemporaryProperties List
HasTemporaryProperties bool

Methods:

AuditEntry(EntityEntry entry)

Constructor method

Parameters
entry EntityEntry

ToAuditHistory()

Audit History record to write

( Home )

as_api_cdcavell.Data.AuditHistory

Authorization Service AuditHistory Entity

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/18/2021 Initial build Authorization Service
Properties
Id long
ModifiedBy string
ModifiedOn DateTime?
Application string
Entity string
State string
KeyValues string
OriginalValues string
CurrentValues string

( Home )

as_api_cdcavell.Data.AuthorizationServiceDbContext

Authorization Service Database Context

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/20/2021 Initial build Authorization Service
Christopher D. Cavell 1.1.0.0 03/23/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/11/2021 Permission-Based Authorization
Christopher D. Cavell 1.1.1.1 06/06/2021 Permission-Based Authorization
Properties
AuditHistory DbSet
UserRoleClaims DbSet
UserRoleClaimHistory DbSet

Methods:

CDCavellDdContext(ILogger logger, IHttpContextAccessor httpContextAccessor, DbContextOptions options) : base(options)

Constructor method

Parameters
logger ILogger
httpContextAccessor IHttpContextAccessor
options DbContextOptions

OnModelCreating(ModelBuilder builder)

OnModelCreating method

Parameters
builder ModelBuilder

HasUnsavedChanges()

Checks for any unsaved INSERT, UPDATE, DELETE history.

Returns:

bool

SaveChanges(bool acceptAllChangesOnSuccess = true)

Override to record all the data change history in a table named Audit, this table contains INSERT, UPDATE, DELETE history.

Returns:

int

SaveChangesAsync(CancellationToken cancellationToken = default(CancellationToken))

Override to record all the data change history in a table named Audit, this table contains INSERT, UPDATE, DELETE history.

Parameters
cancellationToken CancellationToken

Returns:

Task

OnBeforeSaveChanges(string userId)

Save audit entities that have all the modifications and return list of entries where the value of some properties are unknown at this step. https://www.meziantou.net/entity-framework-core-history-audit-table.htm

Returns:

List

OnAfterSaveChanges(List auditEntries)

Save audit entities where the value of some properties were unknown at previous step. https://www.meziantou.net/entity-framework-core-history-audit-table.htm

OnAfterSaveChangesAsync(List auditEntries)

Save audit entities where the value of some properties were unknown at previous step. https://www.meziantou.net/entity-framework-core-history-audit-table.htm

RemoveAuditRecords()

Remove audit records greater than 7 days old

( Home )

.DataModel

Authorization Service DataModel base class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/20/2021 Initial build Authorization Service
Christopher D. Cavell 1.0.3.3 02/27/2021 User Authorization Service
Properties
Id long
IsNew bool

Methods:

AddUpdate(CDCavellDbContext dbContext)

Add/Update record

Delete(AuthorizationServiceDbContext dbContext)

Delete record

Parameters
dbContext

Equals(DataModel obj)

Equate method

Parameters
obj T

Returns:

bool

( Home )

as_api_cdcavell.Data.DbInitializer

Authorization Service Database Initializer

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/21/2021 Initial build Authorization Service
Christopher D. Cavell 1.0.3.3 03/09/2021 User Authorization Service
Christopher D. Cavell 1.0.4.2 03/16/2021 Email verification
Christopher D. Cavell 1.1.0.0 03/23/2021 Integrate ASP.NET Core Identity
Christopher D. Cavell 1.1.1.0 04/11/2021 Permission-Based Authorization

Methods:

Initialize(MigrateDdContext context)

Initialize method To Initialize: dotnet ef migrations add InitialCreate To Update: dotnet ef migrations add UpdateDatabase_<> EF Core tools reference: https://docs.microsoft.com/en-us/ef/core/cli/dotnet Install EF Core Tools: dotnet tool install --global dotnet-ef Upgrade EF Core Tools: dotnet tool update --global dotnet-ef Before you can use the tools on a specific project, you'll need to add the Microsoft.EntityFrameworkCore.Design package to it.

Parameters
context AuthorizationServiceDbContext
siteAdministrator SiteAdministrator

( Home )

.IDataModel

DataModel Interface

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/20/2021 Initial build Authorization Service
Properties
Id long
IsNew bool

Methods:

AddUpdate(CDCavellDbContext dbContext)

Add/Update method

Parameters
dbContext CDCavellDbContext

Equals(T obj)

Equate method

Parameters
obj T

Returns:

bool

( Home )

as_api_cdcavell.Models.AppSettings

AppSettings model

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/18/2021 Initial build Authorization Service
Christopher D. Cavell 1.0.3.3 03/08/2021 User Authorization Service

( Home )

as_api_cdcavell.Program

Entry point class

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 01/18/2021 Initial build Initial build Authorization Service
Christopher D. Cavell 1.0.3.1 02/07/2021 Add ApplicationInsights

Methods:

Main(string[] args)

Entry point method

Parameters
args string[]

CreateHostBuilder(string[] args)

Host Builder configuration

Parameters
args string[]

Returns:

IHostBuilder

( Home )

as_api_cdcavell.Startup

The Startup class configures services and the application's request pipeline Services are components that are used by the app. For example, a logging component is a service. Code to configure (or register) services is added to the Startup.ConfigureServices method. The request handling pipeline is composed as a series of middleware components. For example, a middleware might handle requests for static files or redirect HTTP requests to HTTPS. Each middleware performs asynchronous operations on an HttpContext and then either invokes the next middleware in the pipeline or terminates the request. Code to configure the request handling pipeline is added to the Startup.Configure method.

Revisions:

Contributor Build Revison Date Description
Christopher D. Cavell 1.0.3.0 02/06/2021 Initial build Authorization Service
Christopher D. Cavell 1.0.3.1 02/07/2021 Utilize Redis Cache - Not implemented
Christopher D. Cavell 1.0.3.3 03/09/2021 User Authorization Service
Christopher D. Cavell 1.1.0.0 03/24/2021 Integrate ASP.NET Core Identity

Methods:

Startup(IConfiguration configuration, IWebHostEnvironment webHostEnvironment)

Class Constructor

Parameters
configuration IConfiguration
webHostEnvironment IWebHostEnvironment

ConfigureServices(IServiceCollection services)

This optional method gets called by the runtime. Use this method to add services to the container.

Parameters
services IServiceCollection

Configure(IApplicationBuilder app, IWebHostEnvironment env, ILogger logger, IHostApplicationLifetime lifetime, AuthorizationServiceDbContext dbContext)

This required method gets called by the runtime. Use this method to configure the HTTP request pipeline.

Parameters
app IApplicationBuilder
env IWebHostEnvironment
logger ILogger
lifetime IHostApplicationLifetime
dbContext AuthorizationServiceDbContext

OnAppStarted()

Exposed IApplicationLifetime interface method.

OnAppStopping()

Exposed IApplicationLifetime interface method.

OnAppStopped()

Exposed IApplicationLifetime interface method.

( Home )