Show / Hide Table of Contents

    Class DanglIdentityServerConfiguration

    The IDanglIdentityConfig to be used server-side

    Inheritance
    System.Object
    DanglIdentityServerConfiguration
    Implements
    IDanglIdentityConfig
    Namespace: Dangl.Identity.Client.Mvc.Configuration
    Assembly: Dangl.Identity.Client.Mvc.dll
    Syntax
    public class DanglIdentityServerConfiguration : object, IDanglIdentityConfig

    Properties

    | Improve this Doc View Source

    AdditionalApplicationParts

    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>
    | Improve this Doc View Source

    AuthorizationSetupAction

    Custom authorization setup action

    Declaration
    public Action<AuthorizationOptions> AuthorizationSetupAction { get; }
    Property Value
    Type Description
    Action<AuthorizationOptions>
    | Improve this Doc View Source

    BaseUri

    The primary base url of the Dangl.Identity service

    Declaration
    public string BaseUri { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ClientId

    The ClientId to use when interacting with the Dangl.Identity service

    Declaration
    public string ClientId { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    ClientSecret

    The ClientSecret to use when interacting with the Dangl.Identity service

    Declaration
    public string ClientSecret { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    FallbackBaseUri

    The fallback base url of the Dangl.Identity service

    Declaration
    public string FallbackBaseUri { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    FallbackTokenEndpoint

    The absolute fallback token endpoint

    Declaration
    public string FallbackTokenEndpoint { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    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>
    | Improve this Doc View Source

    MvcBuilderConfig

    Additional MvcBuilder config

    Declaration
    public Action<IMvcBuilder> MvcBuilderConfig { get; }
    Property Value
    Type Description
    Action<IMvcBuilder>
    | Improve this Doc View Source

    MvcSetupAction

    Custom MVC setup configuration

    Declaration
    public Action<MvcOptions> MvcSetupAction { get; }
    Property Value
    Type Description
    Action<MvcOptions>
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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[]
    | Improve this Doc View Source

    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[]
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    TokenEndpoint

    The absolute token endpoint

    Declaration
    public string TokenEndpoint { get; }
    Property Value
    Type Description
    System.String
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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
    | Improve this Doc View Source

    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 Source

    Validate()

    Throws if the configuration is invalid

    Declaration
    public void Validate()

    Implements

    IDanglIdentityConfig

    Extension Methods

    DanglIdentityServerConfigurationExtensions.SetClientId(DanglIdentityServerConfiguration, String)
    DanglIdentityServerConfigurationExtensions.SetClientSecret(DanglIdentityServerConfiguration, String)
    DanglIdentityServerConfigurationExtensions.SetRequiredScope(DanglIdentityServerConfiguration, String)
    DanglIdentityServerConfigurationExtensions.SetBaseUri(DanglIdentityServerConfiguration, String)
    DanglIdentityServerConfigurationExtensions.SetFallbackBaseUri(DanglIdentityServerConfiguration, String)
    DanglIdentityServerConfigurationExtensions.SetRelativeLoginUrl(DanglIdentityServerConfiguration, String)
    DanglIdentityServerConfigurationExtensions.SetUseMemoryCacheUserInfoUpdater(DanglIdentityServerConfiguration, Boolean)
    DanglIdentityServerConfigurationExtensions.SetUseDanglIdentityOpenIdCookieAuthentication(DanglIdentityServerConfiguration, Boolean)
    DanglIdentityServerConfigurationExtensions.SetDanglIdentityOpenIdCookieName(DanglIdentityServerConfiguration, String)
    DanglIdentityServerConfigurationExtensions.SetUseDanglIdentityJwtAuthentication(DanglIdentityServerConfiguration, Boolean)
    DanglIdentityServerConfigurationExtensions.SetMvcSetupAction(DanglIdentityServerConfiguration, Action<MvcOptions>)
    DanglIdentityServerConfigurationExtensions.SetAdditionalApplicationParts(DanglIdentityServerConfiguration, List<Assembly>)
    DanglIdentityServerConfigurationExtensions.SetAuthorizationSetupAction(DanglIdentityServerConfiguration, Action<AuthorizationOptions>)
    DanglIdentityServerConfigurationExtensions.SetMvcBuilderConfig(DanglIdentityServerConfiguration, Action<IMvcBuilder>)
    DanglIdentityServerConfigurationExtensions.SetHttpMessageHandlerFactory(DanglIdentityServerConfiguration, Func<HttpMessageHandler>)
    DanglIdentityServerConfigurationExtensions.SetRequiredJwtRoles(DanglIdentityServerConfiguration, String[])
    DanglIdentityServerConfigurationExtensions.SetRequiredJwtClaims(DanglIdentityServerConfiguration, String[])
    ObjectExtensions.Clone<T>(T)
    • Improve this Doc
    • View Source
    Back to top © Dangl IT GmbH