AppBuilder Class

 

A standard implementation of IAppBuilder

Namespace:   Microsoft.Owin.Builder
Assembly:  Microsoft.Owin (in Microsoft.Owin.dll)

Inheritance Hierarchy

System.Object
  Microsoft.Owin.Builder.AppBuilder

Syntax

public class AppBuilder : IAppBuilder
public ref class AppBuilder : IAppBuilder
type AppBuilder = 
    class
        interface IAppBuilder
    end
Public Class AppBuilder
    Implements IAppBuilder

Constructors

Name Description
System_CAPS_pubmethod AppBuilder()

Initializes a new instance of the the type.

Properties

Name Description
System_CAPS_pubproperty Properties

Contains arbitrary properties which may added, examined, and modified by components during the startup sequence.

Methods

Name Description
System_CAPS_pubmethod Build(Type)

The Build is called at the point when all of the middleware should be chained together. This is typically done by the hosting component which created the app builder, and does not need to be called by the startup method if the IAppBuilder is passed in.

System_CAPS_pubmethod Equals(Object)

(Inherited from Object.)

System_CAPS_protmethod Finalize()

(Inherited from Object.)

System_CAPS_pubmethod GetHashCode()

(Inherited from Object.)

System_CAPS_pubmethod GetType()

(Inherited from Object.)

System_CAPS_protmethod MemberwiseClone()

(Inherited from Object.)

System_CAPS_pubmethod New()

The New method creates a new instance of an IAppBuilder. This is needed to create a tree structure in your processing, rather than a linear pipeline. The new instance share the same Properties, but will be created with a new, empty middleware list. To create a tangent pipeline you would first call New, followed by several calls to Use on the new builder, ending with a call to Build on the new builder. The return value from Build will be the entry-point to your tangent pipeline. This entry-point may now be added to the main pipeline as an argument to a switching middleware, which will either call the tangent pipeline or the "next app", based on something in the request. That said - all of that work is typically hidden by a middleware like Map, which will do that for you.

System_CAPS_pubmethod ToString()

(Inherited from Object.)

System_CAPS_pubmethod Use(Object, Object[])

Adds a middleware node to the OWIN function pipeline. The middleware are invoked in the order they are added: the first middleware passed to Use will be the outermost function, and the last middleware passed to Use will be the innermost.

Extension Methods

Name Description
System_CAPS_pubmethod AddSignatureConversion(Delegate)

Overloaded. (Defined by AppBuilderExtensions.)

System_CAPS_pubmethod AddSignatureConversion<T1, T2>(Func<T1, T2>)

Overloaded. (Defined by AppBuilderExtensions.)

System_CAPS_pubmethod Build()

Overloaded. (Defined by AppBuilderExtensions.)

System_CAPS_pubmethod CreateDataProtector(String[])

Creates a data protector.(Defined by AppBuilderExtensions.)

System_CAPS_pubmethod CreateLogger(String)

Overloaded. Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.(Defined by AppBuilderLoggerExtensions.)

System_CAPS_pubmethod CreateLogger(Type)

Overloaded. Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.(Defined by AppBuilderLoggerExtensions.)

System_CAPS_pubmethod CreateLogger<TType>()

Overloaded. Creates a new ILogger instance from the server.LoggerFactory in the Properties collection.(Defined by AppBuilderLoggerExtensions.)

System_CAPS_pubmethod GetDataProtectionProvider()

Retrieves a data protection provider for the application.(Defined by AppBuilderExtensions.)

System_CAPS_pubmethod GetDefaultSignInAsAuthenticationType()

Returns the previously set AuthenticationType that external sign in middleware should use when the browser navigates back to their return url.(Defined by AppBuilderSecurityExtensions.)

System_CAPS_pubmethod GetLoggerFactory()

Retrieves the server.LoggerFactory from the Properties collection.(Defined by AppBuilderLoggerExtensions.)

System_CAPS_pubmethod Map(PathString, Action<IAppBuilder>)

Overloaded. If the request path starts with the given pathMatch, execute the app configured via configuration parameter instead of continuing to the next component in the pipeline.(Defined by MapExtensions.)

System_CAPS_pubmethod Map(String, Action<IAppBuilder>)

Overloaded. If the request path starts with the given pathMatch, execute the app configured via configuration parameter instead of continuing to the next component in the pipeline.(Defined by MapExtensions.)

System_CAPS_pubmethod MapWhen(Func<IOwinContext, Boolean>, Action<IAppBuilder>)

Branches the request pipeline based on the result of the given predicate.(Defined by MapWhenExtensions.)

System_CAPS_pubmethod MapWhenAsync(Func<IOwinContext, Task<Boolean>>, Action<IAppBuilder>)

Branches the request pipeline based on the async result of the given predicate.(Defined by MapWhenExtensions.)

System_CAPS_pubmethod Run(Func<IOwinContext, Task>)

Inserts into the OWIN pipeline a middleware which does not have a next middleware reference.(Defined by AppBuilderUseExtensions.)

System_CAPS_pubmethod SetDataProtectionProvider(IDataProtectionProvider)

Sets a data protection provider.(Defined by AppBuilderExtensions.)

System_CAPS_pubmethod SetDefaultSignInAsAuthenticationType(String)

Called by middleware to change the name of the AuthenticationType that external middleware should use when the browser navigates back to their return url.(Defined by AppBuilderSecurityExtensions.)

System_CAPS_pubmethod SetLoggerFactory(ILoggerFactory)

Sets the server.LoggerFactory in the Properties collection.(Defined by AppBuilderLoggerExtensions.)

System_CAPS_pubmethod Use(Func<IOwinContext, Func<Task>, Task>)

Overloaded. Inserts a middleware into the OWIN pipeline.(Defined by AppBuilderUseExtensions.)

System_CAPS_pubmethod Use<T>(Object[])

Overloaded. Inserts a middleware into the OWIN pipeline.(Defined by AppBuilderUseExtensions.)

System_CAPS_pubmethod UseActiveDirectoryFederationServicesBearerAuthentication(ActiveDirectoryFederationServicesBearerAuthenticationOptions)

Adds Active Directory Federation Services (ADFS) issued JWT bearer token middleware to your web application pipeline.(Defined by ActiveDirectoryFederationServicesBearerAuthenticationExtensions.)

System_CAPS_pubmethod UseCookieAuthentication(CookieAuthenticationOptions)

Overloaded. Adds a cookie-based authentication middleware to your web application pipeline.(Defined by CookieAuthenticationExtensions.)

System_CAPS_pubmethod UseCookieAuthentication(CookieAuthenticationOptions, PipelineStage)

Overloaded. Adds a cookie-based authentication middleware to your web application pipeline.(Defined by CookieAuthenticationExtensions.)

System_CAPS_pubmethod UseCors(CorsOptions)

Adds a CORS middleware to your web application pipeline to allow cross domain requests.(Defined by CorsExtensions.)

System_CAPS_pubmethod UseDefaultFiles()

Overloaded. Enables default file mapping on the current path from the current directory(Defined by DefaultFilesExtensions.)

System_CAPS_pubmethod UseDefaultFiles(DefaultFilesOptions)

Overloaded. Enables default file mapping with the given options(Defined by DefaultFilesExtensions.)

System_CAPS_pubmethod UseDefaultFiles(String)

Overloaded. Enables default file mapping for the given request path from the directory of the same name(Defined by DefaultFilesExtensions.)

System_CAPS_pubmethod UseDirectoryBrowser()

Overloaded. Enable directory browsing on the current path for the current directory(Defined by DirectoryBrowserExtensions.)

System_CAPS_pubmethod UseDirectoryBrowser(DirectoryBrowserOptions)

Overloaded. Enable directory browsing with the given options(Defined by DirectoryBrowserExtensions.)

System_CAPS_pubmethod UseDirectoryBrowser(String)

Overloaded. Enables directory browsing for the given request path from the directory of the same name(Defined by DirectoryBrowserExtensions.)

System_CAPS_pubmethod UseErrorPage()

Overloaded. Captures synchronous and asynchronous exceptions from the pipeline and generates HTML error responses. Full error details are only displayed by default if 'host.AppMode' is set to 'development' in the IAppBuilder.Properties.(Defined by ErrorPageExtensions.)

System_CAPS_pubmethod UseErrorPage(ErrorPageOptions)

Overloaded. Captures synchronous and asynchronous exceptions from the pipeline and generates HTML error responses. Full error details are only displayed by default if 'host.AppMode' is set to 'development' in the IAppBuilder.Properties.(Defined by ErrorPageExtensions.)

System_CAPS_pubmethod UseFacebookAuthentication(FacebookAuthenticationOptions)

Overloaded. Authenticate users using Facebook(Defined by FacebookAuthenticationExtensions.)

System_CAPS_pubmethod UseFacebookAuthentication(String, String)

Overloaded. Authenticate users using Facebook(Defined by FacebookAuthenticationExtensions.)

System_CAPS_pubmethod UseFileServer()

Overloaded. Enable all static file middleware (except directory browsing) for the current request path in the current directory.(Defined by FileServerExtensions.)

System_CAPS_pubmethod UseFileServer(Boolean)

Overloaded. Enable all static file middleware on for the current request path in the current directory.(Defined by FileServerExtensions.)

System_CAPS_pubmethod UseFileServer(FileServerOptions)

Overloaded. Enable all static file middleware with the given options(Defined by FileServerExtensions.)

System_CAPS_pubmethod UseFileServer(String)

Overloaded. Enables all static file middleware (except directory browsing) for the given request path from the directory of the same name(Defined by FileServerExtensions.)

System_CAPS_pubmethod UseGoogleAuthentication()

Obsolete.Overloaded. Authenticate users using Google OpenId(Defined by GoogleAuthenticationExtensions.)

System_CAPS_pubmethod UseGoogleAuthentication(GoogleAuthenticationOptions)

Obsolete.Overloaded. Authenticate users using Google OpenId(Defined by GoogleAuthenticationExtensions.)

System_CAPS_pubmethod UseGoogleAuthentication(GoogleOAuth2AuthenticationOptions)

Overloaded. Authenticate users using Google OAuth 2.0(Defined by GoogleAuthenticationExtensions.)

System_CAPS_pubmethod UseGoogleAuthentication(String, String)

Overloaded. Authenticate users using Google OAuth 2.0(Defined by GoogleAuthenticationExtensions.)

System_CAPS_pubmethod UseJwtBearerAuthentication(JwtBearerAuthenticationOptions)

Adds JWT bearer token middleware to your web application pipeline.(Defined by JwtBearerAuthenticationExtensions.)

System_CAPS_pubmethod UseMicrosoftAccountAuthentication(MicrosoftAccountAuthenticationOptions)

Overloaded. Authenticate users using Microsoft Account(Defined by MicrosoftAccountAuthenticationExtensions.)

System_CAPS_pubmethod UseMicrosoftAccountAuthentication(String, String)

Overloaded. Authenticate users using Microsoft Account(Defined by MicrosoftAccountAuthenticationExtensions.)

System_CAPS_pubmethod UseOAuthAuthorizationServer(OAuthAuthorizationServerOptions)

Adds OAuth2 Authorization Server capabilities to an OWIN web application. This middleware performs the request processing for the Authorize and Token endpoints defined by the OAuth2 specification. See also http://tools.ietf.org/html/rfc6749(Defined by OAuthAuthorizationServerExtensions.)

System_CAPS_pubmethod UseOAuthBearerAuthentication(OAuthBearerAuthenticationOptions)

Adds Bearer token processing to an OWIN application pipeline. This middleware understands appropriately formatted and secured tokens which appear in the request header. If the Options.AuthenticationMode is Active, the claims within the bearer token are added to the current request's IPrincipal User. If the Options.AuthenticationMode is Passive, then the current request is not modified, but IAuthenticationManager AuthenticateAsync may be used at any time to obtain the claims from the request's bearer token. See also http://tools.ietf.org/html/rfc6749(Defined by OAuthBearerAuthenticationExtensions.)

System_CAPS_pubmethod UseOpenIdConnectAuthentication(OpenIdConnectAuthenticationOptions)

Overloaded. Adds the OpenIdConnectAuthenticationMiddleware into the OWIN runtime.(Defined by OpenIdConnectAuthenticationExtensions.)

System_CAPS_pubmethod UseOpenIdConnectAuthentication(String, String)

Overloaded. Adds the OpenIdConnectAuthenticationMiddleware into the OWIN runtime.(Defined by OpenIdConnectAuthenticationExtensions.)

System_CAPS_pubmethod UseSendFileFallback()

Provide a SendFileFunc if another component does not.(Defined by SendFileExtensions.)

System_CAPS_pubmethod UseStageMarker(PipelineStage)

Overloaded. Call after other middleware to specify when they should run in the integrated pipeline.(Defined by IntegratedPipelineExtensions.)

System_CAPS_pubmethod UseStageMarker(String)

Overloaded. Call after other middleware to specify when they should run in the integrated pipeline.(Defined by IntegratedPipelineExtensions.)

System_CAPS_pubmethod UseStaticFiles()

Overloaded. Enables static file serving for the current request path from the current directory(Defined by StaticFileExtensions.)

System_CAPS_pubmethod UseStaticFiles(StaticFileOptions)

Overloaded. Enables static file serving with the given options(Defined by StaticFileExtensions.)

System_CAPS_pubmethod UseStaticFiles(String)

Overloaded. Enables static file serving for the given request path from the directory of the same name(Defined by StaticFileExtensions.)

System_CAPS_pubmethod UseTwitterAuthentication(String, String)

Overloaded. Authenticate users using Twitter(Defined by TwitterAuthenticationExtensions.)

System_CAPS_pubmethod UseTwitterAuthentication(TwitterAuthenticationOptions)

Overloaded. Authenticate users using Twitter(Defined by TwitterAuthenticationExtensions.)

System_CAPS_pubmethod UseWelcomePage()

Overloaded. Adds the WelcomePageMiddleware to the pipeline.(Defined by WelcomePageExtensions.)

System_CAPS_pubmethod UseWelcomePage(PathString)

Overloaded. Adds the WelcomePageMiddleware to the pipeline with the given path.(Defined by WelcomePageExtensions.)

System_CAPS_pubmethod UseWelcomePage(String)

Overloaded. Adds the WelcomePageMiddleware to the pipeline with the given path.(Defined by WelcomePageExtensions.)

System_CAPS_pubmethod UseWelcomePage(WelcomePageOptions)

Overloaded. Adds the WelcomePageMiddleware to the pipeline with the given options.(Defined by WelcomePageExtensions.)

System_CAPS_pubmethod UseWindowsAzureActiveDirectoryBearerAuthentication(WindowsAzureActiveDirectoryBearerAuthenticationOptions)

Adds Windows Azure Active Directory (WAAD) issued JWT bearer token middleware to your web application pipeline.(Defined by WindowsAzureActiveDirectoryBearerAuthenticationExtensions.)

System_CAPS_pubmethod UseWsFederationAuthentication(String, String)

Overloaded. Adds the WsFederationAuthenticationMiddleware into the OWIN runtime.(Defined by WsFederationAuthenticationExtensions.)

System_CAPS_pubmethod UseWsFederationAuthentication(WsFederationAuthenticationOptions)

Overloaded. Adds the WsFederationAuthenticationMiddleware into the OWIN runtime.(Defined by WsFederationAuthenticationExtensions.)

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Microsoft.Owin.Builder Namespace

Return to top