Skip to content

DapperMaticAccountOptions ​

Namespace: MJCZone.DapperMatic.AspNetCore.Accounts

Assembly: MJCZone.DapperMatic.AspNetCore

Summary ​

Built-in accounts: people who sign in to DapperMatic with an email and a password, on ASP.NET Core Identity, kept in DapperMatic's tables. Off until <c>dm.AddUserAccounts()</c>.

sealed public

Contents ​

Constructors (1) | Methods (7) | Properties (13)

Constructors ​

DapperMaticAccountOptions ​

csharp
DapperMaticAccountOptions()

Methods ​

MethodSummary
UseDatasourceNames the datasource the account tables are in.
UseJwtIssues access tokens as JWTs (RS256 or ES256) that other services check with the published keys (&lt...
UseDatabaseNames the database the account tables are in.
GetType
ToString
Equals
GetHashCode

UseDatasource ​

Names the datasource the account tables are in.

csharp
void UseDatasource(string datasourceId, string schema)

Parameters ​

  • datasourceId (string) - The datasource.
  • schema (string) - The schema, or null for the database's default.

UseJwt ​

Issues access tokens as JWTs (RS256 or ES256) that other services check with the published keys (<c>auth/jwks.json</c>); refresh tokens stay Identity's own.

csharp
void UseJwt(DapperMaticJwtOptions} configure)

Parameters ​

  • configure (DapperMaticJwtOptions}) - The issuer, audience and keys.

UseDatabase ​

Names the database the account tables are in.

csharp
void UseDatabase(string provider, string connectionString, string schema)

Parameters ​

  • provider (string) - The database provider.
  • connectionString (string) - The connection string.
  • schema (string) - The schema, or null for the database's default.

GetType ​

csharp
GetType()

ToString ​

csharp
ToString()

Equals ​

csharp
Equals()

GetHashCode ​

csharp
GetHashCode()

Properties ​

Datasource ​

Gets or sets the datasource the account tables are in, or null for Provider and ConnectionString.

Type: string?

Provider ​

Gets or sets the database provider of the account tables, when no datasource is named.

Type: string?

ConnectionString ​

Gets or sets the connection string of the account tables, when no datasource is named.

Type: string?

Schema ​

Gets or sets the schema of the account tables, or null for the database's default.

Type: string?

SignUp ​

Gets who may make an account themselves. Nobody, by default: people are invited.

Type: DapperMaticSignUpOptions

FirstAdmin ​

Gets or sets the first administrator: invited at startup, when no such account exists yet. Without it (here or in the <c>DapperMatic:Accounts:FirstAdmin</c> configuration section), a one-time setup code is written to the log while no account exists.

Type: DapperMaticFirstAdmin?

MaxGrantDuration ​

Gets or sets the longest a grant may last (a platform user's membership of a tenant). Default is 8 hours.

Type: TimeSpan?

InvitationLifetime ​

Gets or sets how long an invitation stays good. Default is 7 days.

Type: TimeSpan?

Gets where emails send people: the application's own pages, or DapperMatic's endpoints when not set.

Type: DapperMaticAccountLinks

Identity ​

Gets or sets changes to Identity's options: password rules, lockout, ….

Type: Action&lt;IdentityOptions&gt;?

BearerToken ​

Gets or sets changes to the bearer tokens' options: lifetimes.

Type: Action&lt;BearerTokenOptions&gt;?

KeepDataProtectionKeys ​

Gets or sets a value indicating whether DapperMatic keeps the application's Data Protection keys (which sign the accounts' tokens and cookies, and the application's own) in its database, encrypted with the connection string encryption key, so that every instance shares them. Default is true; false when the application keeps them itself.

Type: bool?

Jwt ​

Gets or sets the settings of JWT access tokens, or null (the default) for Identity's own tokens, which only DapperMatic reads. See DapperMaticJwtOptions}).

Type: DapperMaticJwtOptions?