Class DanglIdentityServerConfiguration
The IDanglIdentityConfig to be used server-side
Inheritance
Implements
Namespace: Dangl.Identity.Client.Mvc.Configuration
Assembly: Dangl.Identity.Client.Mvc.dll
Syntax
public class DanglIdentityServerConfiguration : object, IDanglIdentityConfig
Properties
| Improve this Doc View SourceAdditionalApplicationParts
This is used to specify additional assemblies that should be added to the setup when calling AddControllers().AddApplicationPart(). You need this when you have controllers defined in an assembly different than the one that calls the AddControllersWithDanglIdentity<TIdentityDbContext, TIdentityUser, TIdentityRole>(IServiceCollection, DanglIdentityServerConfiguration) extension.
Declaration
public List<Assembly> AdditionalApplicationParts { get; }
Property Value
| Type | Description |
|---|---|
| List<Assembly> |
AuthorizationSetupAction
Custom authorization setup action
Declaration
public Action<AuthorizationOptions> AuthorizationSetupAction { get; }
Property Value
| Type | Description |
|---|---|
| Action<AuthorizationOptions> |
BaseUri
The primary base url of the Dangl.Identity service
Declaration
public string BaseUri { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientId
The ClientId to use when interacting with the Dangl.Identity service
Declaration
public string ClientId { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
ClientSecret
The ClientSecret to use when interacting with the Dangl.Identity service
Declaration
public string ClientSecret { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
DanglIdentityOpenIdCookieName
If Dangl.Identity OpenId Cookie Authentication is used, this property can be used to manually set the name of the login Cookie.
Declaration
public string DanglIdentityOpenIdCookieName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
FallbackBaseUri
The fallback base url of the Dangl.Identity service
Declaration
public string FallbackBaseUri { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
FallbackTokenEndpoint
The absolute fallback token endpoint
Declaration
public string FallbackTokenEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
HttpMessageHandlerFactory
This can be used to supply a custom handler for JWT / OAuth2 operations
Declaration
public Func<HttpMessageHandler> HttpMessageHandlerFactory { get; }
Property Value
| Type | Description |
|---|---|
| Func<HttpMessageHandler> |
MvcBuilderConfig
Additional MvcBuilder config
Declaration
public Action<IMvcBuilder> MvcBuilderConfig { get; }
Property Value
| Type | Description |
|---|---|
| Action<IMvcBuilder> |
MvcSetupAction
Custom MVC setup configuration
Declaration
public Action<MvcOptions> MvcSetupAction { get; }
Property Value
| Type | Description |
|---|---|
| Action<MvcOptions> |
RelativeLoginUrl
The login url that is used on the client service. This is used for delegated logins, e.g. say a service that internally uses Dangl.Identity authentication at https://identity.dangl-it.com but has a local login UI at e.g. https://www.my-service.com/login. This is used, for example, in welcome emails and redirections
Declaration
public string RelativeLoginUrl { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
RequiredJwtClaims
If this is present and the UseDanglIdentityJwtAuthentication option is set to true, authentication will require all of the defined claims to be present on the Jwt token. The actual values of the claims are not read, only their presence is checked
Declaration
public string[] RequiredJwtClaims { get; }
Property Value
| Type | Description |
|---|---|
| System.String[] |
RequiredJwtRoles
If this is present and the UseDanglIdentityJwtAuthentication option is set to true, authentication will require all of the defined roles to be present on the Jwt token
Declaration
public string[] RequiredJwtRoles { get; }
Property Value
| Type | Description |
|---|---|
| System.String[] |
RequiredScope
The required scope to use when interacting with the Dangl.Identity service. If multiple scopes are required, they should be given as a space-delimited string, e.g. "scope1 scope2".
Declaration
public string RequiredScope { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
TokenEndpoint
The absolute token endpoint
Declaration
public string TokenEndpoint { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
UseDanglIdentityJwtAuthentication
If this is enabled, you should use the UseDanglIdentityJwtTokenAuthentication(IApplicationBuilder, String, String) method to configure your app to only use Jwt tokens and drop the call to 'app.UseAuthentication()'. This will disable a default policy with automatic authentication for all requests. Setting this to true will additionally disable redirects to login for 401 and 403 responses. It will also disable cookie based logins for the DanglIdentityController.
Declaration
public bool UseDanglIdentityJwtAuthentication { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
UseDanglIdentityOpenIdCookieAuthentication
Defaults to false. If enabled, Dangl.Identity will be added as OpenID provider and used for login cookies. It will also be set as the default authentication scheme. Jwt Token authentication will be disabled in that case.
Declaration
public bool UseDanglIdentityOpenIdCookieAuthentication { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
UseMemoryCacheUserInfoUpdater
Defaults to true. If set, the MemoryCacheUserInfoUpdaterCache will be used as IUserInfoUpdaterCache along with the default Asp.Net Core MemoryCache implementation. If set to fals, you have to supply your own cache.
Declaration
public bool UseMemoryCacheUserInfoUpdater { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
Methods
| Improve this Doc View SourceValidate()
Throws if the configuration is invalid
Declaration
public void Validate()