├── .azuredevops
└── dependabot.yml
├── .config
└── tsaoptions.json
├── .gitignore
├── CODE-OF-CONDUCT.md
├── CONTRIBUTING.md
├── CredScanSuppressions.json
├── Directory.Build.props
├── Directory.Build.targets
├── Katana.sln
├── LICENSE.txt
├── NuGet.Config
├── README.md
├── SECURITY.md
├── azure-pipelines-internal.yml
├── azure-pipelines.yml
├── build.cmd
├── eng
├── Build.props
├── Publishing.props
├── Signing.props
├── Version.Details.xml
├── Versions.props
├── common
│ ├── CIBuild.cmd
│ ├── PSScriptAnalyzerSettings.psd1
│ ├── README.md
│ ├── SetupNugetSources.ps1
│ ├── SetupNugetSources.sh
│ ├── build.ps1
│ ├── build.sh
│ ├── cibuild.sh
│ ├── cross
│ │ ├── arm
│ │ │ ├── sources.list.bionic
│ │ │ ├── sources.list.jessie
│ │ │ ├── sources.list.xenial
│ │ │ └── sources.list.zesty
│ │ ├── arm64
│ │ │ ├── sources.list.bionic
│ │ │ ├── sources.list.buster
│ │ │ ├── sources.list.stretch
│ │ │ ├── sources.list.xenial
│ │ │ ├── sources.list.zesty
│ │ │ ├── tizen-build-rootfs.sh
│ │ │ ├── tizen-fetch.sh
│ │ │ └── tizen
│ │ │ │ └── tizen.patch
│ │ ├── armel
│ │ │ ├── armel.jessie.patch
│ │ │ ├── sources.list.jessie
│ │ │ ├── tizen-build-rootfs.sh
│ │ │ ├── tizen-fetch.sh
│ │ │ └── tizen
│ │ │ │ ├── tizen-dotnet.ks
│ │ │ │ └── tizen.patch
│ │ ├── build-android-rootfs.sh
│ │ ├── build-rootfs.sh
│ │ ├── s390x
│ │ │ └── sources.list.bionic
│ │ ├── toolchain.cmake
│ │ └── x86
│ │ │ ├── sources.list.bionic
│ │ │ └── sources.list.xenial
│ ├── darc-init.ps1
│ ├── darc-init.sh
│ ├── dotnet-install.cmd
│ ├── dotnet-install.ps1
│ ├── dotnet-install.sh
│ ├── enable-cross-org-publishing.ps1
│ ├── generate-locproject.ps1
│ ├── generate-sbom-prep.ps1
│ ├── generate-sbom-prep.sh
│ ├── helixpublish.proj
│ ├── init-tools-native.cmd
│ ├── init-tools-native.ps1
│ ├── init-tools-native.sh
│ ├── internal-feed-operations.ps1
│ ├── internal-feed-operations.sh
│ ├── internal
│ │ ├── Directory.Build.props
│ │ ├── NuGet.config
│ │ └── Tools.csproj
│ ├── msbuild.ps1
│ ├── msbuild.sh
│ ├── native
│ │ ├── CommonLibrary.psm1
│ │ ├── common-library.sh
│ │ ├── find-native-compiler.sh
│ │ ├── install-cmake-test.sh
│ │ ├── install-cmake.sh
│ │ └── install-tool.ps1
│ ├── pipeline-logging-functions.ps1
│ ├── pipeline-logging-functions.sh
│ ├── post-build
│ │ ├── check-channel-consistency.ps1
│ │ ├── nuget-validation.ps1
│ │ ├── nuget-verification.ps1
│ │ ├── publish-using-darc.ps1
│ │ ├── sourcelink-validation.ps1
│ │ └── symbols-validation.ps1
│ ├── retain-build.ps1
│ ├── sdk-task.ps1
│ ├── sdl
│ │ ├── NuGet.config
│ │ ├── configure-sdl-tool.ps1
│ │ ├── execute-all-sdl-tools.ps1
│ │ ├── extract-artifact-archives.ps1
│ │ ├── extract-artifact-packages.ps1
│ │ ├── init-sdl.ps1
│ │ ├── packages.config
│ │ ├── run-sdl.ps1
│ │ └── sdl.ps1
│ ├── templates-official
│ │ ├── job
│ │ │ ├── job.yml
│ │ │ ├── onelocbuild.yml
│ │ │ ├── publish-build-assets.yml
│ │ │ ├── source-build.yml
│ │ │ └── source-index-stage1.yml
│ │ ├── jobs
│ │ │ ├── codeql-build.yml
│ │ │ ├── jobs.yml
│ │ │ └── source-build.yml
│ │ ├── post-build
│ │ │ ├── common-variables.yml
│ │ │ ├── post-build.yml
│ │ │ └── setup-maestro-vars.yml
│ │ ├── steps
│ │ │ ├── component-governance.yml
│ │ │ ├── enable-internal-runtimes.yml
│ │ │ ├── execute-codeql.yml
│ │ │ ├── generate-sbom.yml
│ │ │ ├── get-delegation-sas.yml
│ │ │ ├── get-federated-access-token.yml
│ │ │ ├── publish-logs.yml
│ │ │ ├── retain-build.yml
│ │ │ ├── send-to-helix.yml
│ │ │ └── source-build.yml
│ │ └── variables
│ │ │ └── sdl-variables.yml
│ ├── templates
│ │ ├── job
│ │ │ ├── execute-sdl.yml
│ │ │ ├── job.yml
│ │ │ ├── onelocbuild.yml
│ │ │ ├── publish-build-assets.yml
│ │ │ ├── source-build.yml
│ │ │ └── source-index-stage1.yml
│ │ ├── jobs
│ │ │ ├── codeql-build.yml
│ │ │ ├── jobs.yml
│ │ │ └── source-build.yml
│ │ ├── post-build
│ │ │ ├── common-variables.yml
│ │ │ ├── post-build.yml
│ │ │ └── setup-maestro-vars.yml
│ │ ├── steps
│ │ │ ├── build-reason.yml
│ │ │ ├── component-governance.yml
│ │ │ ├── enable-internal-runtimes.yml
│ │ │ ├── execute-codeql.yml
│ │ │ ├── execute-sdl.yml
│ │ │ ├── generate-sbom.yml
│ │ │ ├── get-delegation-sas.yml
│ │ │ ├── get-federated-access-token.yml
│ │ │ ├── publish-logs.yml
│ │ │ ├── retain-build.yml
│ │ │ ├── run-on-unix.yml
│ │ │ ├── run-on-windows.yml
│ │ │ ├── run-script-ifequalelse.yml
│ │ │ ├── send-to-helix.yml
│ │ │ ├── source-build.yml
│ │ │ ├── telemetry-end.yml
│ │ │ └── telemetry-start.yml
│ │ └── variables
│ │ │ └── sdl-variables.yml
│ ├── tools.ps1
│ └── tools.sh
└── templates
│ └── default-build.yml
├── es-metadata.yml
├── global.json
├── pack.cmd
├── restore.cmd
├── samples
├── Katana.Sandbox.Selfhost
│ ├── App.config
│ ├── Katana.Sandbox.Selfhost.csproj
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── packages.config
├── Katana.Sandbox.WebClient
│ ├── ClientApp.aspx
│ ├── ClientApp.aspx.cs
│ ├── ClientApp.aspx.designer.cs
│ ├── ClientPage.html
│ ├── ClientPage.js
│ ├── ClientPageSignIn.html
│ ├── ClientPageSignIn.js
│ ├── Katana.Sandbox.WebClient.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Web.Debug.config
│ ├── Web.Release.config
│ ├── Web.config
│ └── packages.config
└── Katana.Sandbox.WebServer
│ ├── AspNetAuthSessionStore.cs
│ ├── Authorize.cshtml
│ ├── AuthorizeError.cshtml
│ ├── External.cshtml
│ ├── InMemoryAuthSessionStore.cs
│ ├── Katana.Sandbox.WebServer.csproj
│ ├── Login.cshtml
│ ├── Logout.cshtml
│ ├── Properties
│ └── AssemblyInfo.cs
│ ├── SameSiteCookieManager.cs
│ ├── Startup.cs
│ ├── Web.Debug.config
│ ├── Web.Release.config
│ ├── Web.config
│ └── packages.config
├── src
├── Directory.Build.props
├── Microsoft.Owin.Cors
│ ├── CorsExtensions.cs
│ ├── CorsMiddleware.cs
│ ├── CorsOptions.cs
│ ├── CorsPolicyProvider.cs
│ ├── ICorsPolicyProvider.cs
│ ├── Microsoft.Owin.Cors.csproj
│ └── Properties
│ │ └── AssemblyInfo.cs
├── Microsoft.Owin.Diagnostics
│ ├── Constants.cs
│ ├── DiagnosticsPageExtensions.cs
│ ├── DiagnosticsPageMiddleware.cs
│ ├── DiagnosticsPageOptions.cs
│ ├── ErrorPageExtensions.cs
│ ├── ErrorPageMiddleware.cs
│ ├── ErrorPageOptions.cs
│ ├── GlobalSuppressions.cs
│ ├── Microsoft.Owin.Diagnostics.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── Views
│ │ ├── BaseView.cs
│ │ ├── DiagnosticsPage.cs
│ │ ├── DiagnosticsPage.cshtml
│ │ ├── DiagnosticsPage.tt
│ │ ├── ErrorDetails.cs
│ │ ├── ErrorPage.cs
│ │ ├── ErrorPage.cshtml
│ │ ├── ErrorPage.css
│ │ ├── ErrorPage.js
│ │ ├── ErrorPage.tt
│ │ ├── ErrorPageModel.cs
│ │ ├── StackFrame.cs
│ │ ├── WelcomePage.cs
│ │ ├── WelcomePage.cshtml
│ │ └── WelcomePage.tt
│ ├── WelcomePageExtensions.cs
│ ├── WelcomePageMiddleware.cs
│ └── WelcomePageOptions.cs
├── Microsoft.Owin.FileSystems
│ ├── EmbeddedResourceFileSystem.cs
│ ├── IFileInfo.cs
│ ├── IFileSystem.cs
│ ├── Microsoft.Owin.FileSystems.csproj
│ ├── PhysicalFileSystem.cs
│ └── Properties
│ │ └── AssemblyInfo.cs
├── Microsoft.Owin.Host.HttpListener
│ ├── Constants.cs
│ ├── DictionaryExtensions.cs
│ ├── DisconnectHandler.cs
│ ├── LogHelper.cs
│ ├── Microsoft.Owin.Host.HttpListener.csproj
│ ├── NativeMethods.cs
│ ├── OwinHttpListener.cs
│ ├── OwinServerFactory.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── PumpLimits.cs
│ ├── RequestProcessing
│ │ ├── CallEnvironment.Generated.cs
│ │ ├── CallEnvironment.Generated.tt
│ │ ├── CallEnvironment.cs
│ │ ├── ExceptionFilterStream.cs
│ │ ├── HeadersDictionaryBase.cs
│ │ ├── HttpListenerStreamWrapper.cs
│ │ ├── NilDictionary.cs
│ │ ├── OwinHttpListenerContext.cs
│ │ ├── OwinHttpListenerRequest.cs
│ │ ├── OwinHttpListenerResponse.cs
│ │ ├── RequestHeadersDictionary.cs
│ │ └── ResponseHeadersDictionary.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ └── WebSockets
│ │ ├── Constants.cs
│ │ └── OwinWebSocketWrapper.cs
├── Microsoft.Owin.Host.SystemWeb
│ ├── App_Packages
│ │ └── Owin.Loader
│ │ │ ├── LoaderResources.Designer.cs
│ │ │ └── LoaderResources.resx
│ ├── CallContextAsyncResult.cs
│ ├── CallEnvironment
│ │ ├── AspNetDictionary.Generated.cs
│ │ ├── AspNetDictionary.Generated.tt
│ │ ├── AspNetDictionary.cs
│ │ ├── NilDictionary.cs
│ │ └── TraceTextWriter.cs
│ ├── CallHeaders
│ │ ├── AspNetRequestHeaders.cs
│ │ ├── AspNetResponseHeaders.cs
│ │ └── SendingHeadersEvent.cs
│ ├── CallStreams
│ │ ├── DelegatingStream.cs
│ │ ├── InputStream.cs
│ │ └── OutputStream.cs
│ ├── Constants.cs
│ ├── DataProtection
│ │ ├── MachineKeyDataProtectionProvider.cs
│ │ └── MachineKeyDataProtector.cs
│ ├── DictionaryExtensions.cs
│ ├── DisconnectWatcher.cs
│ ├── GlobalSuppressions.cs
│ ├── HttpContextBaseExtensions.cs
│ ├── HttpContextExtensions.cs
│ ├── HttpContextItemKeys.cs
│ ├── Infrastructure
│ │ ├── DefaultTrace.cs
│ │ ├── DefaultTraceFactory.cs
│ │ ├── ErrorState.cs
│ │ ├── ITrace.cs
│ │ ├── ITraceFactory.cs
│ │ ├── ReferencedAssemblyWrapper.cs
│ │ ├── TraceExtensions.cs
│ │ └── TraceFactory.cs
│ ├── IntegratedPipeline
│ │ ├── IntegratedPipelineBlueprint.cs
│ │ ├── IntegratedPipelineBlueprintStage.cs
│ │ ├── IntegratedPipelineContext.cs
│ │ ├── IntegratedPipelineContextStage.cs
│ │ └── StageAsyncResult.cs
│ ├── Microsoft.Owin.Host.SystemWeb.csproj
│ ├── OwinAppContext.cs
│ ├── OwinApplication.cs
│ ├── OwinBuilder.cs
│ ├── OwinCallContext.DisableResponseCompression.cs
│ ├── OwinCallContext.Environment.cs
│ ├── OwinCallContext.WebSockets.cs
│ ├── OwinCallContext.cs
│ ├── OwinHttpHandler.cs
│ ├── OwinHttpModule.cs
│ ├── OwinRoute.cs
│ ├── OwinRouteHandler.cs
│ ├── PreApplicationStart.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── RouteCollectionExtensions.cs
│ ├── ShutdownDetector.cs
│ ├── SystemWebChunkingCookieManager.cs
│ ├── SystemWebCookieManager.cs
│ ├── UnsafeIISMethods.cs
│ ├── Utils.cs
│ └── WebSockets
│ │ ├── OwinWebSocketWrapper.cs
│ │ └── WebSocketConstants.cs
├── Microsoft.Owin.Hosting
│ ├── App_Packages
│ │ └── Owin.Loader
│ │ │ ├── LoaderResources.Designer.cs
│ │ │ └── LoaderResources.resx
│ ├── Builder
│ │ ├── AppActivator.cs
│ │ ├── AppBuilderFactory.cs
│ │ ├── IAppActivator.cs
│ │ └── IAppBuilderFactory.cs
│ ├── Constants.cs
│ ├── Engine
│ │ ├── HostingEngine.cs
│ │ ├── IHostingEngine.cs
│ │ └── StartContext.cs
│ ├── GlobalSuppressions.cs
│ ├── Loader
│ │ ├── AppLoader.cs
│ │ ├── AppLoaderFactory.cs
│ │ ├── IAppLoader.cs
│ │ └── IAppLoaderFactory.cs
│ ├── Microsoft.Owin.Hosting.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── ServerFactory
│ │ ├── IServerFactoryActivator.cs
│ │ ├── IServerFactoryAdapter.cs
│ │ ├── IServerFactoryLoader.cs
│ │ ├── ServerFactoryActivator.cs
│ │ ├── ServerFactoryAdapter.cs
│ │ └── ServerFactoryLoader.cs
│ ├── Services
│ │ ├── ActivatorUtilities.cs
│ │ ├── ServiceProvider.cs
│ │ ├── ServiceProviderExtensions.cs
│ │ └── ServicesFactory.cs
│ ├── StartOptions.cs
│ ├── Starter
│ │ ├── DirectHostingStarter.cs
│ │ ├── DomainHostingStarter.cs
│ │ ├── DomainHostingStarterAgent.cs
│ │ ├── HostingStarter.cs
│ │ ├── HostingStarterActivator.cs
│ │ ├── HostingStarterAttribute.cs
│ │ ├── HostingStarterFactory.cs
│ │ ├── IHostingStarter.cs
│ │ ├── IHostingStarterActivator.cs
│ │ └── IHostingStarterFactory.cs
│ ├── Tracing
│ │ ├── DualWriter.cs
│ │ ├── ITraceOutputFactory.cs
│ │ └── TraceOutputFactory.cs
│ ├── Utilities
│ │ ├── Disposable.cs
│ │ ├── Encapsulate.cs
│ │ └── SettingsLoader.cs
│ └── WebApp.cs
├── Microsoft.Owin.Security.ActiveDirectory
│ ├── ActiveDirectoryFederationServicesBearerAuthenticationExtensions.cs
│ ├── ActiveDirectoryFederationServicesBearerAuthenticationOptions.cs
│ ├── IssuerSigningKeys.cs
│ ├── Microsoft.Owin.Security.ActiveDirectory.csproj
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── WindowsAzureActiveDirectoryBearerAuthenticationExtensions.cs
│ ├── WindowsAzureActiveDirectoryBearerAuthenticationOptions.cs
│ ├── WsFedCachingSecurityKeyProvider.cs
│ └── WsFedMetadataRetriever.cs
├── Microsoft.Owin.Security.Cookies
│ ├── CookieAuthenticationDefaults.cs
│ ├── CookieAuthenticationExtensions.cs
│ ├── CookieAuthenticationHandler.cs
│ ├── CookieAuthenticationMiddleware.cs
│ ├── CookieAuthenticationOptions.cs
│ ├── CookieSecureOption.cs
│ ├── IAuthenticationSessionStore.cs
│ ├── Microsoft.Owin.Security.Cookies.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Provider
│ │ ├── CookieApplyRedirectContext.cs
│ │ ├── CookieAuthenticationProvider.cs
│ │ ├── CookieExceptionContext.cs
│ │ ├── CookieResponseSignInContext.cs
│ │ ├── CookieResponseSignOutContext.cs
│ │ ├── CookieResponseSignedInContext.cs
│ │ ├── CookieValidateIdentityContext.cs
│ │ ├── DefaultBehavior.cs
│ │ └── ICookieAuthenticationProvider.cs
├── Microsoft.Owin.Security.Facebook
│ ├── Constants.cs
│ ├── FacebookAuthenticationExtensions.cs
│ ├── FacebookAuthenticationHandler.cs
│ ├── FacebookAuthenticationMiddleware.cs
│ ├── FacebookAuthenticationOptions.cs
│ ├── Microsoft.Owin.Security.Facebook.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Provider
│ │ ├── FacebookApplyRedirectContext.cs
│ │ ├── FacebookAuthenticatedContext.cs
│ │ ├── FacebookAuthenticationProvider.cs
│ │ ├── FacebookReturnEndpointContext.cs
│ │ └── IFacebookAuthenticationProvider.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Microsoft.Owin.Security.Google
│ ├── Constants.cs
│ ├── GoogleAuthenticationExtensions.cs
│ ├── GoogleOAuth2AuthenticationHandler.cs
│ ├── GoogleOAuth2AuthenticationMiddleware.cs
│ ├── GoogleOAuth2AuthenticationOptions.cs
│ ├── Microsoft.Owin.Security.Google.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Provider
│ │ ├── GoogleOAuth2ApplyRedirectContext.cs
│ │ ├── GoogleOAuth2AuthenticatedContext.cs
│ │ ├── GoogleOAuth2AuthenticationProvider.cs
│ │ ├── GoogleOAuth2ReturnEndpointContext.cs
│ │ └── IGoogleOAuth2AuthenticationProvider.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Microsoft.Owin.Security.Jwt
│ ├── CustomDictionary.xml
│ ├── IIssuerSecurityKeyProvider.cs
│ ├── JwtBearerAuthenticationExtensions.cs
│ ├── JwtBearerAuthenticationOptions.cs
│ ├── JwtFormat.cs
│ ├── Microsoft.Owin.Security.Jwt.csproj
│ ├── Properties
│ │ ├── AssemblyInfo.cs
│ │ ├── Resources.Designer.cs
│ │ └── Resources.resx
│ ├── SymmetricKeyIssuerSecurityKeyProvider.cs
│ └── X509CertificateSecurityKeyProvider.cs
├── Microsoft.Owin.Security.MicrosoftAccount
│ ├── Constants.cs
│ ├── Microsoft.Owin.Security.MicrosoftAccount.csproj
│ ├── MicrosoftAccountAuthenticationExtensions.cs
│ ├── MicrosoftAccountAuthenticationHandler.cs
│ ├── MicrosoftAccountAuthenticationMiddleware.cs
│ ├── MicrosoftAccountAuthenticationOptions.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Provider
│ │ ├── IMicrosoftAccountAuthenticationProvider.cs
│ │ ├── MicrosoftAccountApplyRedirectContext.cs
│ │ ├── MicrosoftAccountAuthenticatedContext.cs
│ │ ├── MicrosoftAccountAuthenticationProvider.cs
│ │ └── MicrosoftAccountReturnEndpointContext.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Microsoft.Owin.Security.OAuth
│ ├── CustomDictionary.xml
│ ├── Messages
│ │ ├── AuthorizeEndpointRequest.cs
│ │ ├── TokenEndpointRequest.cs
│ │ ├── TokenEndpointRequestAuthorizationCode.cs
│ │ ├── TokenEndpointRequestClientCredentials.cs
│ │ ├── TokenEndpointRequestCustomExtension.cs
│ │ ├── TokenEndpointRequestRefreshToken.cs
│ │ └── TokenEndpointRequestResourceOwnerPasswordCredentials.cs
│ ├── Microsoft.Owin.Security.OAuth.csproj
│ ├── OAuthAuthorizationServerExtensions.cs
│ ├── OAuthAuthorizationServerHandler.cs
│ ├── OAuthAuthorizationServerMiddleware.cs
│ ├── OAuthAuthorizationServerOptions.cs
│ ├── OAuthBearerAuthenticationExtensions.cs
│ ├── OAuthBearerAuthenticationHandler.cs
│ ├── OAuthBearerAuthenticationMiddleware.cs
│ ├── OAuthBearerAuthenticationOptions.cs
│ ├── OAuthConstants.cs
│ ├── OAuthDefaults.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ └── Provider
│ │ ├── BaseValidatingClientContext.cs
│ │ ├── BaseValidatingContext.cs
│ │ ├── BaseValidatingTicketContext.cs
│ │ ├── DefaultBehavior.cs
│ │ ├── IOAuthAuthorizationServerProvider.cs
│ │ ├── IOAuthBearerAuthenticationProvider.cs
│ │ ├── OAuthAuthorizationServerProvider.cs
│ │ ├── OAuthAuthorizeEndpointContext.cs
│ │ ├── OAuthAuthorizeEndpointResponseContext.cs
│ │ ├── OAuthBearerAuthenticationProvider.cs
│ │ ├── OAuthChallengeContext.cs
│ │ ├── OAuthGrantAuthorizationCodeContext.cs
│ │ ├── OAuthGrantClientCredentialsContext.cs
│ │ ├── OAuthGrantCustomExtensionContext.cs
│ │ ├── OAuthGrantRefreshTokenContext.cs
│ │ ├── OAuthGrantResourceOwnerCredentialsContext.cs
│ │ ├── OAuthMatchEndpointContext.cs
│ │ ├── OAuthRequestTokenContext.cs
│ │ ├── OAuthTokenEndpointContext.cs
│ │ ├── OAuthTokenEndpointResponseContext.cs
│ │ ├── OAuthValidateAuthorizeRequestContext.cs
│ │ ├── OAuthValidateClientAuthenticationContext.cs
│ │ ├── OAuthValidateClientRedirectUriContext.cs
│ │ ├── OAuthValidateIdentityContext.cs
│ │ └── OAuthValidateTokenRequestContext.cs
├── Microsoft.Owin.Security.OpenIdConnect
│ ├── CustomDictionary.xml
│ ├── GlobalSuppressions.cs
│ ├── Microsoft.Owin.Security.OpenIdConnect.csproj
│ ├── Notifications
│ │ ├── AuthorizationCodeReceivedNotification.cs
│ │ └── TokenResponseReceivedNotification.cs
│ ├── OAuthConstants.cs
│ ├── OpenIdConnectAuthenticationDefaults.cs
│ ├── OpenIdConnectAuthenticationExtensions.cs
│ ├── OpenIdConnectAuthenticationMiddleware.cs
│ ├── OpenIdConnectAuthenticationNotifications.cs
│ ├── OpenIdConnectAuthenticationOptions.cs
│ ├── OpenidConnectAuthenticationHandler.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── Microsoft.Owin.Security.Twitter
│ ├── Constants.cs
│ ├── Messages
│ │ ├── AccessToken.cs
│ │ ├── RequestToken.cs
│ │ ├── RequestTokenSerializer.cs
│ │ └── Serializers.cs
│ ├── Microsoft.Owin.Security.Twitter.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Provider
│ │ ├── ITwitterAuthenticationProvider.cs
│ │ ├── TwitterApplyRedirectContext.cs
│ │ ├── TwitterAuthenticatedContext.cs
│ │ ├── TwitterAuthenticationProvider.cs
│ │ └── TwitterReturnEndpointContext.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── TwitterAuthenticationExtensions.cs
│ ├── TwitterAuthenticationHandler.cs
│ ├── TwitterAuthenticationMiddleware.cs
│ └── TwitterAuthenticationOptions.cs
├── Microsoft.Owin.Security.WsFederation
│ ├── CustomDictionary.xml
│ ├── Microsoft.Owin.Security.WsFederation.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── WsFederationAuthenticationDefaults.cs
│ ├── WsFederationAuthenticationExtensions.cs
│ ├── WsFederationAuthenticationHandler.cs
│ ├── WsFederationAuthenticationMiddleware.cs
│ ├── WsFederationAuthenticationNotifications.cs
│ └── WsFederationAuthenticationOptions.cs
├── Microsoft.Owin.Security
│ ├── AppBuilderSecurityExtensions.cs
│ ├── AuthenticationMode.cs
│ ├── AuthenticationOptions.cs
│ ├── AuthenticationTicket.cs
│ ├── CertificateSubjectKeyIdentifierValidator.cs
│ ├── CertificateSubjectPublicKeyInfoValidator.cs
│ ├── CertificateThumbprintValidator.cs
│ ├── Constants.cs
│ ├── DataHandler
│ │ ├── Encoder
│ │ │ ├── Base64TextEncoder.cs
│ │ │ ├── Base64UrlTextEncoder.cs
│ │ │ ├── ITextEncoder.cs
│ │ │ └── TextEncodings.cs
│ │ ├── ISecureDataFormat.cs
│ │ ├── PropertiesDataFormat.cs
│ │ ├── SecureDataFormat.cs
│ │ ├── Serializer
│ │ │ ├── DataSerializers.cs
│ │ │ ├── IDataSerializer.cs
│ │ │ ├── PropertiesSerializer.cs
│ │ │ └── TicketSerializer.cs
│ │ └── TicketDataFormat.cs
│ ├── DataProtection
│ │ ├── AppBuilderExtensions.cs
│ │ ├── DpapiDataProtectionProvider.cs
│ │ ├── DpapiDataProtector.cs
│ │ ├── IDataProtectionProvider.cs
│ │ └── IDataProtector.cs
│ ├── ICertificateValidator.cs
│ ├── Infrastructure
│ │ ├── AuthenticationHandler.cs
│ │ ├── AuthenticationHandler`1.cs
│ │ ├── AuthenticationMiddleware.cs
│ │ ├── AuthenticationTokenCreateContext.cs
│ │ ├── AuthenticationTokenProvider.cs
│ │ ├── AuthenticationTokenReceiveContext.cs
│ │ ├── Constants.cs
│ │ ├── IAuthenticationTokenProvider.cs
│ │ ├── OwinRequestExtensions.cs
│ │ └── SecurityHelper.cs
│ ├── Microsoft.Owin.Security.csproj
│ ├── Notifications
│ │ ├── AuthenticationFailedNotification.cs
│ │ ├── BaseNotification`1.cs
│ │ ├── MessageReceivedNotification.cs
│ │ ├── NotificationResultState.cs
│ │ ├── RedirectToIdentityProviderNotification.cs
│ │ ├── SecurityTokenReceivedNotification.cs
│ │ └── SecurityTokenValidatedNotification.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Provider
│ │ ├── BaseContext.cs
│ │ ├── BaseContext`1.cs
│ │ ├── EndpointContext.cs
│ │ ├── EndpointContext`1.cs
│ │ └── ReturnEndpointContext.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── SubjectPublicKeyInfoAlgorithm.cs
│ └── Win32.cs
├── Microsoft.Owin.SelfHost
│ ├── Microsoft.Owin.SelfHost.csproj
│ └── README.md
├── Microsoft.Owin.StaticFiles
│ ├── Constants.cs
│ ├── ContentTypes
│ │ ├── FileExtensionContentTypeProvider.cs
│ │ └── IContentTypeProvider.cs
│ ├── CustomDictionary.xml
│ ├── DefaultFilesExtensions.cs
│ ├── DefaultFilesMiddleware.cs
│ ├── DefaultFilesOptions.cs
│ ├── DirectoryBrowserExtensions.cs
│ ├── DirectoryBrowserMiddleware.cs
│ ├── DirectoryBrowserOptions.cs
│ ├── DirectoryFormatters
│ │ ├── HtmlDirectoryFormatter.cs
│ │ └── IDirectoryFormatter.cs
│ ├── FileServerExtensions.cs
│ ├── FileServerOptions.cs
│ ├── GlobalSuppressions.cs
│ ├── Helpers.cs
│ ├── Infrastructure
│ │ ├── RangeHelpers.cs
│ │ ├── SharedOptions.cs
│ │ └── SharedOptionsBase.cs
│ ├── Microsoft.Owin.StaticFiles.csproj
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── SendFileExtensions.cs
│ ├── SendFileMiddleware.cs
│ ├── SendFileResponseExtensions.cs
│ ├── StaticFileContext.cs
│ ├── StaticFileExtensions.cs
│ ├── StaticFileMiddleware.cs
│ ├── StaticFileOptions.cs
│ ├── StaticFileResponseContext.cs
│ └── StreamCopyOperation.cs
├── Microsoft.Owin.Testing
│ ├── CustomDictionary.xml
│ ├── Microsoft.Owin.Testing.csproj
│ ├── OwinClientHandler.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── ReadMe.txt
│ ├── RequestBuilder.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── ResponseStream.cs
│ └── TestServer.cs
├── Microsoft.Owin
│ ├── Builder
│ │ ├── AppBuilder.cs
│ │ ├── Constants.cs
│ │ └── NotFound.cs
│ ├── BuilderProperties
│ │ ├── Address.cs
│ │ ├── AddressCollection.cs
│ │ ├── AppProperties.cs
│ │ └── Capabilities.cs
│ ├── CookieOptions.cs
│ ├── Extensions
│ │ ├── AppBuilderCookieExtensions.cs
│ │ ├── AppBuilderExtensions.cs
│ │ ├── AppBuilderUseExtensions.cs
│ │ ├── IntegratedPipelineExtensions.cs
│ │ ├── PipelineStage.cs
│ │ └── UseHandlerMiddleware.cs
│ ├── FormCollection.cs
│ ├── GlobalSuppressions.cs
│ ├── HeaderDictionary.cs
│ ├── Helpers
│ │ └── WebHelpers.cs
│ ├── HostString.cs
│ ├── IFormCollection.cs
│ ├── IHeaderDictionary.cs
│ ├── IOwinContext.cs
│ ├── IOwinRequest.cs
│ ├── IOwinResponse.cs
│ ├── IReadableStringCollection.cs
│ ├── Infrastructure
│ │ ├── AppFuncTransition.cs
│ │ ├── ChunkingCookieManager.cs
│ │ ├── Constants.cs
│ │ ├── CookieManager.cs
│ │ ├── ICookieManager.cs
│ │ ├── ISystemClock.cs
│ │ ├── OwinHelpers.cs
│ │ ├── OwinMiddlewareTransition.cs
│ │ ├── PathStringHelper.cs
│ │ ├── SignatureConversions.cs
│ │ ├── SystemClock.cs
│ │ └── WebUtils.cs
│ ├── Loader
│ │ └── OwinStartupAttribute.cs
│ ├── Logging
│ │ ├── AppBuilderLoggerExtensions.cs
│ │ ├── DiagnosticsLogger.cs
│ │ ├── DiagnosticsLoggerFactory.cs
│ │ ├── ILogger.cs
│ │ ├── ILoggerFactory.cs
│ │ ├── LoggerExtensions.cs
│ │ └── LoggerFactory.cs
│ ├── Mapping
│ │ ├── MapExtensions.cs
│ │ ├── MapMiddleware.cs
│ │ ├── MapOptions.cs
│ │ ├── MapWhenExtensions.cs
│ │ ├── MapWhenMiddleware.cs
│ │ └── MapWhenOptions.cs
│ ├── Microsoft.Owin.csproj
│ ├── OwinConstants.cs
│ ├── OwinContext.cs
│ ├── OwinMiddleware.cs
│ ├── OwinRequest.cs
│ ├── OwinResponse.cs
│ ├── PathString.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── QueryString.cs
│ ├── ReadableStringCollection.cs
│ ├── RequestCookieCollection.cs
│ ├── Resources.Designer.cs
│ ├── Resources.resx
│ ├── ResponseCookieCollection.cs
│ ├── SameSiteMode.cs
│ └── Security
│ │ ├── AuthenticateResult.cs
│ │ ├── AuthenticationDescription.cs
│ │ ├── AuthenticationManager.cs
│ │ ├── AuthenticationProperties.cs
│ │ ├── AuthenticationResponseChallenge.cs
│ │ ├── AuthenticationResponseGrant.cs
│ │ ├── AuthenticationResponseRevoke.cs
│ │ └── IAuthenticationManager.cs
├── Owin.Loader
│ ├── Constants.cs
│ ├── CopyResources.bat
│ ├── DefaultLoader.cs
│ ├── LoaderResources.Designer.cs
│ ├── LoaderResources.resx
│ ├── NullLoader.cs
│ └── Owin.Loader.csproj
├── OwinHost
│ ├── App.config
│ ├── Options
│ │ ├── Command.cs
│ │ ├── CommandException.cs
│ │ ├── CommandExecutor.cs
│ │ ├── CommandModel.cs
│ │ └── CommandOption.cs
│ ├── OwinHost.csproj
│ ├── Package
│ │ ├── ReadMe.md
│ │ └── tools
│ │ │ ├── OwinHost.exe.config
│ │ │ ├── install.ps1
│ │ │ └── uninstall.ps1
│ ├── Program.cs
│ ├── Properties
│ │ └── AssemblyInfo.cs
│ ├── Resources.Designer.cs
│ └── Resources.resx
└── Tools
│ └── CertificateInstaller
│ ├── CertInstaller
│ ├── App.config
│ ├── CertInstaller.csproj
│ ├── CertificateInstaller.cs
│ ├── Program.cs
│ └── app.manifest
│ └── CertificateInstaller.sln
├── startvs.cmd
├── test.cmd
└── tests
├── Directory.Build.props
├── FunctionalTests
├── Common
│ ├── ApplicationDeployer.cs
│ ├── Extensions.cs
│ ├── HostType.cs
│ ├── HttpClientUtility.cs
│ ├── KatanaWebConfiguration.cs
│ ├── NotificationServer.cs
│ └── WebDeployer.cs
├── Facts
│ ├── Diagnostics
│ │ ├── ErrorPageFacts.cs
│ │ └── WelcomePageFacts.cs
│ ├── Discovery
│ │ ├── AllowedNonDefaultConfigurationSignatures1.cs
│ │ ├── AllowedNonDefaultConfigurationSignatures2.cs
│ │ ├── ConfigurationMethodNotFoundTest.cs
│ │ ├── DiscoveryTests.cs
│ │ ├── InvalidConfigurationMethodSignatureTest.cs
│ │ └── NegativeScenarios.cs
│ ├── General
│ │ ├── ApplicationPoolStopTest.cs
│ │ ├── EnvironmentDictionaryVerificationTest.cs
│ │ ├── OnSendingHeadersTest.cs
│ │ ├── OwinCallCancelledTest.cs
│ │ ├── ResponseStatusCodeTest.cs
│ │ └── WebSocketTest.cs
│ ├── InstanceContext
│ │ └── InstanceContextTest.cs
│ ├── IntegratedPipeline
│ │ ├── DefaultStageMarkers.cs
│ │ ├── IntegratedPipelineMiddleware.cs
│ │ ├── IntegratedPipelineWithMap.cs
│ │ ├── MiddlewaresAtDifferentStagesTest.cs
│ │ └── OrderOfExecutionTest.cs
│ ├── MSOwin
│ │ └── MsOwinFacts.cs
│ ├── MappingMiddleware
│ │ └── MappingMiddlewareFacts.cs
│ ├── MiddlewarePatterns
│ │ ├── ClassBasedMiddlewareTests.cs
│ │ ├── ConvertibleMiddleware.cs
│ │ ├── InstanceBasedMiddleware.cs
│ │ └── OwinMiddlewareFacts.cs
│ ├── OwinHost
│ │ ├── HostServer.cs
│ │ ├── MyStartOptions.cs
│ │ ├── OwinHostAppSettings.cs
│ │ ├── OwinStartupAttribute.cs
│ │ └── StartOptionsAndOwinHost.cs
│ ├── Security
│ │ ├── ActiveDirectory
│ │ │ └── WaadAuthentication.cs
│ │ ├── AuthServer
│ │ │ ├── AuthServerTests.cs
│ │ │ └── UriUtilities.cs
│ │ ├── BearerToken
│ │ │ ├── BearerTokenAuthentication.cs
│ │ │ └── SymmetricJwtTokenAuthentication.cs
│ │ ├── Common
│ │ │ ├── CustomCertificateValidator.cs
│ │ │ ├── CustomStateDataFormat.cs
│ │ │ └── SecurityUtils.cs
│ │ ├── Cookies
│ │ │ ├── AjaxRequest.cs
│ │ │ ├── CookiesApplyRedirect.cs
│ │ │ ├── CookiesAuthCookiePathFact.cs
│ │ │ ├── CookiesAuthDefault.cs
│ │ │ ├── CookiesAuthReturnUrlOverrideFact.cs
│ │ │ ├── CookiesCommon.cs
│ │ │ ├── CustomSecureDataHandler.cs
│ │ │ └── PersistentCookie.cs
│ │ ├── Facebook
│ │ │ └── FacebookAuthentication.cs
│ │ ├── Federation
│ │ │ ├── InvalidToken.xml
│ │ │ ├── WsFederationTest.cs
│ │ │ └── federationmetadata.xml
│ │ ├── Google
│ │ │ ├── GoogleOAuth2Authentication.cs
│ │ │ └── GoogleOAuth2AuthorizeParameters.cs
│ │ ├── Jwt
│ │ │ ├── SymmetricKeyTokenVerification.cs
│ │ │ └── X509CertificateTokenVerification.cs
│ │ ├── MicrosoftAccount
│ │ │ └── MicrosoftAuthentication.cs
│ │ └── Twitter
│ │ │ └── TwitterAuthentication.cs
│ ├── SideBySide
│ │ ├── ExplicitlyRegisterOwinHttpHandlerTest.cs
│ │ ├── MapOwinPathTest.cs
│ │ └── MapOwinRouteTest.cs
│ ├── StaticFiles
│ │ ├── DefaultFiles
│ │ │ ├── DefaultFileExtensibility.cs
│ │ │ └── DefaultFiles.cs
│ │ ├── DirectoryBrowser
│ │ │ ├── DirectoryBrowser.cs
│ │ │ └── DirectoryBrowserExtensibility.cs
│ │ ├── EmbeddedFileSystem
│ │ │ ├── EmbeddedDefaultFiles.cs
│ │ │ ├── EmbeddedDirectoryBrowser.cs
│ │ │ └── EmbeddedFileSystemTests.cs
│ │ ├── FileServer
│ │ │ └── FileServerExtensibility.cs
│ │ └── StaticFile
│ │ │ ├── CacheTests.cs
│ │ │ ├── CustomSendFileFunc.cs
│ │ │ ├── IfMatchTests.cs
│ │ │ ├── IfModifiedSinceTests.cs
│ │ │ ├── IfNoneMatchTests.cs
│ │ │ ├── IfRangeTests.cs
│ │ │ ├── IfUnModifiedSinceTests.cs
│ │ │ ├── RangeTests.cs
│ │ │ ├── StaticFile.cs
│ │ │ └── StaticFileSecurity.cs
│ ├── Testing
│ │ └── TestServerFacts.cs
│ └── Tracing
│ │ └── TracingFacts.cs
├── FunctionalTests.csproj
├── OwinWebConfigTemplate.txt
├── Properties
│ └── AssemblyInfo.cs
├── RequirementFiles
│ ├── BlockedFiles
│ │ ├── TextFile.txt
│ │ └── clock$.txt
│ ├── ContentTypes
│ │ ├── SampleAVI.avi
│ │ ├── SampleC.c
│ │ ├── SampleCHM.CHM
│ │ ├── SampleCPP.cpp
│ │ ├── SampleCSS.css
│ │ ├── SampleCSV.csv
│ │ ├── SampleCUR.cur
│ │ ├── SampleDISCO.disco
│ │ ├── SampleDOC.DOC
│ │ ├── SampleDOCX.docx
│ │ ├── SampleHTM.htm
│ │ ├── SampleHTML.html
│ │ ├── SampleICO.ico
│ │ ├── SampleJPEG.jpg
│ │ ├── SampleJPG.jpg
│ │ ├── SampleJS.js
│ │ ├── SamplePNG.png
│ │ └── Unknown.Unknown
│ ├── Default.aspx
│ ├── Dir1
│ │ ├── Default.html
│ │ ├── EmptyFile.txt
│ │ ├── RangeRequest.txt
│ │ ├── TextFile1.txt
│ │ └── Unknown.Unknown
│ ├── Dir2
│ │ ├── TextFile2.txt
│ │ └── Unknown.Unknown
│ ├── Dir3
│ │ ├── Dir31
│ │ │ └── TextFile311.txt
│ │ ├── Dir32
│ │ │ └── TextFile321.txt
│ │ ├── TextFile3.txt
│ │ └── TextFile4.txt
│ ├── Dir4
│ │ └── TextFile41.txt
│ ├── EmbeddedResources
│ │ ├── SampleAVI.avi
│ │ ├── SampleC.c
│ │ ├── SampleCHM.CHM
│ │ ├── SampleCPP.cpp
│ │ ├── SampleCSS.css
│ │ ├── SampleCSV.csv
│ │ ├── SampleCUR.cur
│ │ ├── SampleDISCO.disco
│ │ ├── SampleDOC.DOC
│ │ ├── SampleDOCX.docx
│ │ ├── SampleHTM.htm
│ │ ├── SampleHTML.html
│ │ ├── SampleICO.ico
│ │ ├── SampleJPEG.jpg
│ │ ├── SampleJPG.jpg
│ │ ├── SampleJS.js
│ │ ├── SamplePNG.png
│ │ └── Unknown.Unknown
│ ├── IntegratedPipelineTest.aspx
│ └── Templates
│ │ ├── Login.html
│ │ ├── Logout.html
│ │ └── MainPage.html
└── packages.config
├── Microsoft.Owin.Cors.Tests
├── CorsMiddlewareTests.cs
└── Microsoft.Owin.Cors.Tests.csproj
├── Microsoft.Owin.FileSystems.Tests
├── EmbeddedResourceFileSystemTests.cs
├── File.txt
├── Microsoft.Owin.FileSystems.Tests.csproj
├── PhysicalFileSystemTests.cs
├── Resources
│ ├── File.txt
│ └── ResourcesInSubdirectory
│ │ └── File3.txt
└── sub
│ └── File2.txt
├── Microsoft.Owin.Host.HttpListener.Tests
├── CleanupProject.bat
├── HttpsServerTestCertificate.pfx
├── Microsoft.Owin.Host.HttpListener.Tests.csproj
├── OwinHttpListenerRequestTests.cs
├── OwinHttpListenerResponseTests.cs
├── OwinHttpListenerTests.cs
├── OwinWebSocketTests.cs
├── Properties
│ └── AssemblyInfo.cs
├── ServerFactoryTests.cs
├── SetVariables.bat
├── SetupProject.bat
└── packages.config
├── Microsoft.Owin.Host.IntegrationTests
├── ClientCertificateTests.cs
├── Content
│ └── TextFile.txt
├── DictionaryExtensions.cs
├── ExceptionsTests.cs
├── HostPropertyTests.cs
├── IntegratedPipelineTests.cs
├── Microsoft.Owin.Host.IntegrationTests.csproj
├── PathEscapingTests.cs
├── QueryEscapingTests.cs
├── RequestBodyTests.cs
├── RequestHeadersTests.cs
├── ResponseBodyTests.cs
├── ResponseHeadersTests.cs
├── RouteTableTests.cs
├── SecurityTests.cs
├── SelfSignedClientCert.pfx
├── SimpleGetTests.cs
├── StaticFilesTests.cs
├── SystemWebChunkingCookieManagerTests.cs
├── SystemWebCookieManagerTests.cs
├── SystemWebIntegrationTests.cs
├── TestBase.cs
├── TestBaseWorks.cs
├── applicationHost.config
├── web.config
└── web.routetable.config
├── Microsoft.Owin.Host.SystemWeb.Tests
├── CallEnvironment
│ └── AspNetEnvironmentTests.cs
├── CallHeaders
│ └── AspNetRequestHeadersTests.cs
├── DictionaryExtensions.cs
├── EnvironmentContentTests.cs
├── FakeN
│ ├── FakeHttpContext.cs
│ ├── FakeHttpContextEx.cs
│ ├── FakeHttpRequest.cs
│ ├── FakeHttpRequestEx.cs
│ ├── FakeHttpResponse.cs
│ └── FakeHttpResponseEx.cs
├── Microsoft.Owin.Host.SystemWeb.Tests.csproj
├── OwinHttpHandlerTests.cs
├── OwinRouteHandlerTests.cs
├── OwinRouteTests.cs
└── TestsBase.cs
├── Microsoft.Owin.Hosting.Tests
├── App.config
├── App_Packages
│ └── TinyIoC.cs
├── Containers
│ ├── AutofacContainerTests.cs
│ ├── ContainerTestsBase.cs
│ ├── DefaultServicesTests.cs
│ ├── ReplaceDefaultServiceWithTextFileTests.cs
│ ├── ReplaceDefaultServiceWithTextFileTests.txt
│ ├── StructureMapContainerTests.cs
│ └── TinyIoCContainerTests.cs
├── HostingEngineTests.cs
├── Microsoft.Owin.Hosting.Tests.csproj
├── ServerFactories
│ ├── InstanceServerFactory.cs
│ ├── OwinServerFactory.cs
│ └── StaticServerFactory.cs
├── ServerFactoryAdapterTests.cs
├── ServerFactoryLoaderTests.cs
├── Settings.txt
├── SettingsTests.cs
├── StartParametersTests.cs
├── TestAppLoader1.cs
├── TestAppLoader2.cs
└── TestHostingStarter.cs
├── Microsoft.Owin.Security.Tests
├── CertificateSubjectKeyIdentifierValidatorTests.cs
├── CertificateSubjectPublicKeyInfoValidatorTests.cs
├── CertificateThumbprintValidatorTests.cs
├── Cookies
│ └── CookieMiddlewareTests.cs
├── DataHandler
│ └── Base64UrlTextEncoderTests.cs
├── Facebook
│ └── FacebookMiddlewareTests.cs
├── GlobalSuppressions.cs
├── Google
│ └── GoogleOAuth2MiddlewareTests.cs
├── JwtHandlerTests.cs
├── Microsoft.Owin.Security.Tests.csproj
├── MicrosoftAccount
│ └── MicrosoftAccountMiddlewareTests.cs
├── OAuth
│ ├── OAuth2AuthorizationClientCredentialsGrantTests.cs
│ ├── OAuth2AuthorizationCustomGrantTests.cs
│ ├── OAuth2AuthorizationServerAuthorizationCodeGrantTests.cs
│ ├── OAuth2AuthorizationServerImplicitGrantTests.cs
│ ├── OAuth2AuthorizationServerResourceOwnerCredentialsGrantTests.cs
│ ├── OAuth2BearerTokenTests.cs
│ └── OAuth2TestServer.cs
├── OpenIdConnect
│ └── OpenIdConnectMiddlewareTests.cs
├── Properties
│ ├── Resources.Designer.cs
│ └── Resources.resx
├── SecurityHelperTests.cs
├── TestClock.cs
├── Twitter
│ └── TwitterMiddlewareTests.cs
├── app.config
├── katanatest.redmond.corp.microsoft.com.cer
├── packages.config
└── selfSigned.cer
├── Microsoft.Owin.StaticFiles.Tests
├── CacheHeaderTests.cs
├── DefaultContentTypeProviderTests.cs
├── DefaultFilesMiddlewareTests.cs
├── DirectoryBrowserMiddlewareTests.cs
├── Microsoft.Owin.StaticFiles.Tests.csproj
├── RangeHeaderTests.cs
├── SendFileResponseExtensionsTests.cs
├── StaticFileMiddlewareTests.cs
├── SubFolder
│ ├── Default.html
│ ├── Extra.xml
│ ├── Ranges.txt
│ └── 你好
│ │ ├── Default.html
│ │ └── 世界
│ │ └── Default.html
├── TestRootFile.xml
└── Utilities.cs
├── Microsoft.Owin.Testing.Tests
├── Microsoft.Owin.Testing.Tests.csproj
├── OwinClientHandlerTests.cs
├── RequestBuilderTests.cs
├── Startup.cs
├── TestServerTests.cs
└── packages.config
├── Microsoft.Owin.Tests
├── Builder
│ ├── AppBuilderCookieTests.cs
│ ├── AppBuilderTestExtensions.cs
│ └── AppBuilderTests.cs
├── CookieChunkingTests.cs
├── FormsTests.cs
├── HeaderTests.cs
├── HostStringTests.cs
├── Mapping
│ ├── MapPathMiddlewareTests.cs
│ └── MapPredicateMiddlewareTests.cs
├── Microsoft.Owin.Tests.csproj
├── PathStringTests.cs
├── QueryStringTests.cs
├── QueryTests.cs
├── RequestCookieTests.cs
├── Security
│ └── AuthenticationManagerTests.cs
└── UriTests.cs
├── Owin.Loader.Tests
├── DefaultConfigurationLoaderTests.cs
├── DoesNotFollowConvention.cs
├── Owin.Loader.Tests.csproj
├── Startup.cs
└── packages.config
└── OwinHost.Tests
├── CommandLineParsingTests.cs
├── Microsoft.Owin.Hosting.settings
└── OwinHost.Tests.csproj
/.azuredevops/dependabot.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | enable-campaigned-updates: false
3 | enable-security-updates: false
4 |
--------------------------------------------------------------------------------
/.config/tsaoptions.json:
--------------------------------------------------------------------------------
1 | {
2 | "areaPath": "DevDiv\\ASP.NET Core\\Policy Violations",
3 | "codebaseName": "AspNetKatana",
4 | "instanceUrl": "https://devdiv.visualstudio.com/",
5 | "iterationPath": "DevDiv",
6 | "notificationAliases": [
7 | "aspnetcore-build@microsoft.com"
8 | ],
9 | "projectName": "DEVDIV",
10 | "repositoryName": "AspNetKatana",
11 | "template": "TFSDEVDIV"
12 | }
13 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | bin
2 | obj
3 | *.suo
4 | *.user
5 | _ReSharper.*
6 | *.DS_Store
7 | *.userprefs
8 | *.pidb
9 | *.vspx
10 | *.psess
11 | TestResults/*
12 | TestResult.xml
13 | nugetkey
14 | packages
15 | target
16 | artifacts
17 | StyleCop.Cache
18 | node_modules
19 | *.snk
20 | .nuget/NuGet.exe
21 | docs/build
22 | .vs
23 | .dotnet
24 | .packages
--------------------------------------------------------------------------------
/CODE-OF-CONDUCT.md:
--------------------------------------------------------------------------------
1 | # Code of Conduct
2 |
3 | This project has adopted the code of conduct defined by the Contributor Covenant
4 | to clarify expected behavior in our community.
5 |
6 | For more information, see the [.NET Foundation Code of Conduct](https://dotnetfoundation.org/code-of-conduct).
7 |
--------------------------------------------------------------------------------
/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Contributing
2 | ======
3 |
4 | Information on contributing to this repo is in the [Contributing Guide](https://github.com/aspnet/Home/blob/dev/CONTRIBUTING.md) in the Home repo.
5 |
--------------------------------------------------------------------------------
/CredScanSuppressions.json:
--------------------------------------------------------------------------------
1 | {
2 | "tool": "Credential Scanner",
3 | "suppressions": [
4 | {
5 | "_justification": "Legitimate key/cert used for testing",
6 | "file": [
7 | "tests/Microsoft.Owin.Host.HttpListener.Tests/HttpsServerTestCertificate.pfx",
8 | "tests/Microsoft.Owin.Host.IntegrationTests/SelfSignedClientCert.pfx"
9 | ]
10 | }
11 | ]
12 | }
--------------------------------------------------------------------------------
/Directory.Build.targets:
--------------------------------------------------------------------------------
1 | <Project>
2 | <Import Project="Sdk.targets" Sdk="Microsoft.DotNet.Arcade.Sdk" />
3 | </Project>
--------------------------------------------------------------------------------
/NuGet.Config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <configuration>
3 | <packageSources>
4 | <clear />
5 | <!-- Feed to use to restore the Arcade SDK from -->
6 | <add key="dotnet-eng" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-eng/nuget/v3/index.json" />
7 | <!-- Feeds to use to restore dependent packages from -->
8 | <add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
9 | <add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
10 | </packageSources>
11 | <disabledPackageSources>
12 | <clear />
13 | </disabledPackageSources>
14 | </configuration>
15 |
--------------------------------------------------------------------------------
/SECURITY.md:
--------------------------------------------------------------------------------
1 | # Security Policy
2 |
3 | ## Supported Versions
4 |
5 | The .NET Core and ASP.NET Core support policy, including supported versions can be found at the [.NET Core Support Policy Page](https://dotnet.microsoft.com/platform/support/policy/dotnet-core).
6 |
7 | ## Reporting a Vulnerability
8 |
9 | Security issues and bugs should be reported privately to the Microsoft Security Response Center (MSRC), either by emailing secure@microsoft.com or via the portal at https://msrc.microsoft.com.
10 | You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your
11 | original message. Further information, including the MSRC PGP key, can be found in the [MSRC Report an Issue FAQ](https://www.microsoft.com/en-us/msrc/faqs-report-an-issue).
12 |
13 | Reports via MSRC may qualify for the .NET Core Bug Bounty. Details of the .NET Core Bug Bounty including terms and conditions are at [https://aka.ms/corebounty](https://aka.ms/corebounty).
14 |
15 | Please do not open issues for anything you think might have a security implication.
16 |
--------------------------------------------------------------------------------
/azure-pipelines.yml:
--------------------------------------------------------------------------------
1 | #
2 | # See https://docs.microsoft.com/azure/devops/pipelines/yaml-schema for details
3 | #
4 |
5 | variables:
6 | - name: _TeamName
7 | value: AspNetCore
8 | - name: DOTNET_SKIP_FIRST_TIME_EXPERIENCE
9 | value: true
10 | - name: _PublishUsingPipelines
11 | value: true
12 | - name: _BuildConfig
13 | value: Release
14 |
15 | # used for post-build phases, internal builds only
16 | - ${{ if and(ne(variables['System.TeamProject'], 'public'), notin(variables['Build.Reason'], 'PullRequest')) }}:
17 | - group: AspNetKatana-SDLValidation-Params
18 |
19 | # CI and PR triggers
20 | trigger:
21 | batch: true
22 | branches:
23 | include:
24 | - main
25 | - release/*
26 | - internal/release/*
27 |
28 | pr:
29 | autoCancel: false
30 | branches:
31 | include:
32 | - '*'
33 |
34 | stages:
35 | - stage: build
36 | displayName: Build
37 | jobs:
38 | - template: /eng/templates/default-build.yml
--------------------------------------------------------------------------------
/build.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build %*"
3 |
--------------------------------------------------------------------------------
/eng/Build.props:
--------------------------------------------------------------------------------
1 | <Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
2 | <ItemGroup>
3 | <ProjectToBuild Include="$(RepoRoot)src\**\*.csproj" />
4 | <ProjectToBuild Include="$(RepoRoot)tests\**\*.csproj" />
5 | </ItemGroup>
6 | </Project>
7 |
--------------------------------------------------------------------------------
/eng/Publishing.props:
--------------------------------------------------------------------------------
1 | <Project>
2 | <PropertyGroup>
3 | <PublishingVersion>3</PublishingVersion>
4 | </PropertyGroup>
5 | </Project>
6 |
--------------------------------------------------------------------------------
/eng/Signing.props:
--------------------------------------------------------------------------------
1 | <Project>
2 | <!--
3 | These are third party libraries that we use in Arcade. We need to sign them even if they
4 | are already signed. However, they must be signed with a 3rd party certificate.
5 | -->
6 | <ItemGroup>
7 | <FileSignInfo Include="Owin.dll" CertificateName="3PartySHA2" />
8 | </ItemGroup>
9 | </Project>
10 |
--------------------------------------------------------------------------------
/eng/Version.Details.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <Dependencies>
3 | <ToolsetDependencies>
4 | <Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="6.0.0-beta.25468.4">
5 | <Uri>https://github.com/dotnet/arcade</Uri>
6 | <Sha>4fd02da57297248915f054a69990409bf79021ae</Sha>
7 | </Dependency>
8 | </ToolsetDependencies>
9 | </Dependencies>
10 |
--------------------------------------------------------------------------------
/eng/Versions.props:
--------------------------------------------------------------------------------
1 | <Project>
2 | <PropertyGroup>
3 | <!-- This repo version -->
4 | <VersionPrefix>4.2.3</VersionPrefix>
5 | <PreReleaseVersionLabel>rtw</PreReleaseVersionLabel>
6 | <PreReleaseVersionIteration>
7 | </PreReleaseVersionIteration>
8 | <DotNetFinalVersionKind Condition="'$(PreReleaseVersionLabel)' == 'rtw'">release</DotNetFinalVersionKind>
9 | <!-- Opt-out repo features -->
10 | <UsingToolXliff>false</UsingToolXliff>
11 | <!-- Libs -->
12 | <OwinVersion>1.0.0</OwinVersion>
13 | <ShouldlyVersion>1.1.1.1</ShouldlyVersion>
14 | <NewtonsoftJsonVersion>13.0.1</NewtonsoftJsonVersion>
15 | <IdentityModelVersion>5.7.0</IdentityModelVersion>
16 | </PropertyGroup>
17 | </Project>
18 |
--------------------------------------------------------------------------------
/eng/common/CIBuild.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0Build.ps1""" -restore -build -test -sign -pack -publish -ci %*"
--------------------------------------------------------------------------------
/eng/common/PSScriptAnalyzerSettings.psd1:
--------------------------------------------------------------------------------
1 | @{
2 | IncludeRules=@('PSAvoidUsingCmdletAliases',
3 | 'PSAvoidUsingWMICmdlet',
4 | 'PSAvoidUsingPositionalParameters',
5 | 'PSAvoidUsingInvokeExpression',
6 | 'PSUseDeclaredVarsMoreThanAssignments',
7 | 'PSUseCmdletCorrectly',
8 | 'PSStandardDSCFunctionsInResource',
9 | 'PSUseIdenticalMandatoryParametersForDSC',
10 | 'PSUseIdenticalParametersForDSC')
11 | }
--------------------------------------------------------------------------------
/eng/common/cibuild.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | source="${BASH_SOURCE[0]}"
4 |
5 | # resolve $SOURCE until the file is no longer a symlink
6 | while [[ -h $source ]]; do
7 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
8 | source="$(readlink "$source")"
9 |
10 | # if $source was a relative symlink, we need to resolve it relative to the path where
11 | # the symlink file was located
12 | [[ $source != /* ]] && source="$scriptroot/$source"
13 | done
14 | scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
15 |
16 | . "$scriptroot/build.sh" --restore --build --test --pack --publish --ci $@
--------------------------------------------------------------------------------
/eng/common/cross/arm/sources.list.bionic:
--------------------------------------------------------------------------------
1 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
2 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
3 |
4 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
5 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
6 |
7 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
8 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
9 |
10 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
11 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
12 |
--------------------------------------------------------------------------------
/eng/common/cross/arm/sources.list.jessie:
--------------------------------------------------------------------------------
1 | # Debian (sid) # UNSTABLE
2 | deb http://ftp.debian.org/debian/ sid main contrib non-free
3 | deb-src http://ftp.debian.org/debian/ sid main contrib non-free
4 |
--------------------------------------------------------------------------------
/eng/common/cross/arm/sources.list.xenial:
--------------------------------------------------------------------------------
1 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
2 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
3 |
4 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
5 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
6 |
7 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
8 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
9 |
10 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
11 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
--------------------------------------------------------------------------------
/eng/common/cross/arm/sources.list.zesty:
--------------------------------------------------------------------------------
1 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
2 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
3 |
4 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
5 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
6 |
7 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
8 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
9 |
10 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
11 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
12 |
--------------------------------------------------------------------------------
/eng/common/cross/arm64/sources.list.bionic:
--------------------------------------------------------------------------------
1 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
2 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
3 |
4 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
5 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
6 |
7 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
8 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
9 |
10 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
11 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
12 |
--------------------------------------------------------------------------------
/eng/common/cross/arm64/sources.list.buster:
--------------------------------------------------------------------------------
1 | deb http://deb.debian.org/debian buster main
2 | deb-src http://deb.debian.org/debian buster main
3 |
4 | deb http://deb.debian.org/debian-security/ buster/updates main
5 | deb-src http://deb.debian.org/debian-security/ buster/updates main
6 |
7 | deb http://deb.debian.org/debian buster-updates main
8 | deb-src http://deb.debian.org/debian buster-updates main
9 |
10 | deb http://deb.debian.org/debian buster-backports main contrib non-free
11 | deb-src http://deb.debian.org/debian buster-backports main contrib non-free
12 |
--------------------------------------------------------------------------------
/eng/common/cross/arm64/sources.list.stretch:
--------------------------------------------------------------------------------
1 | deb http://deb.debian.org/debian stretch main
2 | deb-src http://deb.debian.org/debian stretch main
3 |
4 | deb http://deb.debian.org/debian-security/ stretch/updates main
5 | deb-src http://deb.debian.org/debian-security/ stretch/updates main
6 |
7 | deb http://deb.debian.org/debian stretch-updates main
8 | deb-src http://deb.debian.org/debian stretch-updates main
9 |
10 | deb http://deb.debian.org/debian stretch-backports main contrib non-free
11 | deb-src http://deb.debian.org/debian stretch-backports main contrib non-free
12 |
13 |
--------------------------------------------------------------------------------
/eng/common/cross/arm64/sources.list.xenial:
--------------------------------------------------------------------------------
1 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
2 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial main restricted universe
3 |
4 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
5 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-updates main restricted universe
6 |
7 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
8 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-backports main restricted
9 |
10 | deb http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
11 | deb-src http://ports.ubuntu.com/ubuntu-ports/ xenial-security main restricted universe multiverse
--------------------------------------------------------------------------------
/eng/common/cross/arm64/sources.list.zesty:
--------------------------------------------------------------------------------
1 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
2 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty main restricted universe
3 |
4 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
5 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-updates main restricted universe
6 |
7 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
8 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-backports main restricted
9 |
10 | deb http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
11 | deb-src http://ports.ubuntu.com/ubuntu-ports/ zesty-security main restricted universe multiverse
12 |
--------------------------------------------------------------------------------
/eng/common/cross/arm64/tizen-build-rootfs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -e
3 |
4 | __CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5 | __TIZEN_CROSSDIR="$__CrossDir/tizen"
6 |
7 | if [[ -z "$ROOTFS_DIR" ]]; then
8 | echo "ROOTFS_DIR is not defined."
9 | exit 1;
10 | fi
11 |
12 | TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp
13 | mkdir -p $TIZEN_TMP_DIR
14 |
15 | # Download files
16 | echo ">>Start downloading files"
17 | VERBOSE=1 $__CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR
18 | echo "<<Finish downloading files"
19 |
20 | echo ">>Start constructing Tizen rootfs"
21 | TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm`
22 | cd $ROOTFS_DIR
23 | for f in $TIZEN_RPM_FILES; do
24 | rpm2cpio $f | cpio -idm --quiet
25 | done
26 | echo "<<Finish constructing Tizen rootfs"
27 |
28 | # Cleanup tmp
29 | rm -rf $TIZEN_TMP_DIR
30 |
31 | # Configure Tizen rootfs
32 | echo ">>Start configuring Tizen rootfs"
33 | ln -sfn asm-arm64 ./usr/include/asm
34 | patch -p1 < $__TIZEN_CROSSDIR/tizen.patch
35 | echo "<<Finish configuring Tizen rootfs"
36 |
--------------------------------------------------------------------------------
/eng/common/cross/arm64/tizen/tizen.patch:
--------------------------------------------------------------------------------
1 | diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so
2 | --- a/usr/lib64/libc.so 2016-12-30 23:00:08.284951863 +0900
3 | +++ b/usr/lib64/libc.so 2016-12-30 23:00:32.140951815 +0900
4 | @@ -2,4 +2,4 @@
5 | Use the shared library, but some functions are only in
6 | the static library, so try that secondarily. */
7 | OUTPUT_FORMAT(elf64-littleaarch64)
8 | -GROUP ( /lib64/libc.so.6 /usr/lib64/libc_nonshared.a AS_NEEDED ( /lib/ld-linux-aarch64.so.1 ) )
9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux-aarch64.so.1 ) )
10 |
--------------------------------------------------------------------------------
/eng/common/cross/armel/sources.list.jessie:
--------------------------------------------------------------------------------
1 | # Debian (jessie) # Stable
2 | deb http://ftp.debian.org/debian/ jessie main contrib non-free
3 | deb-src http://ftp.debian.org/debian/ jessie main contrib non-free
4 |
--------------------------------------------------------------------------------
/eng/common/cross/armel/tizen-build-rootfs.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 | set -e
3 |
4 | __ARM_SOFTFP_CrossDir=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
5 | __TIZEN_CROSSDIR="$__ARM_SOFTFP_CrossDir/tizen"
6 |
7 | if [[ -z "$ROOTFS_DIR" ]]; then
8 | echo "ROOTFS_DIR is not defined."
9 | exit 1;
10 | fi
11 |
12 | TIZEN_TMP_DIR=$ROOTFS_DIR/tizen_tmp
13 | mkdir -p $TIZEN_TMP_DIR
14 |
15 | # Download files
16 | echo ">>Start downloading files"
17 | VERBOSE=1 $__ARM_SOFTFP_CrossDir/tizen-fetch.sh $TIZEN_TMP_DIR
18 | echo "<<Finish downloading files"
19 |
20 | echo ">>Start constructing Tizen rootfs"
21 | TIZEN_RPM_FILES=`ls $TIZEN_TMP_DIR/*.rpm`
22 | cd $ROOTFS_DIR
23 | for f in $TIZEN_RPM_FILES; do
24 | rpm2cpio $f | cpio -idm --quiet
25 | done
26 | echo "<<Finish constructing Tizen rootfs"
27 |
28 | # Cleanup tmp
29 | rm -rf $TIZEN_TMP_DIR
30 |
31 | # Configure Tizen rootfs
32 | echo ">>Start configuring Tizen rootfs"
33 | ln -sfn asm-arm ./usr/include/asm
34 | patch -p1 < $__TIZEN_CROSSDIR/tizen.patch
35 | echo "<<Finish configuring Tizen rootfs"
36 |
--------------------------------------------------------------------------------
/eng/common/cross/armel/tizen/tizen-dotnet.ks:
--------------------------------------------------------------------------------
1 | lang en_US.UTF-8
2 | keyboard us
3 | timezone --utc Asia/Seoul
4 |
5 | part / --fstype="ext4" --size=3500 --ondisk=mmcblk0 --label rootfs --fsoptions=defaults,noatime
6 |
7 | rootpw tizen
8 | desktop --autologinuser=root
9 | user --name root --groups audio,video --password 'tizen'
10 |
11 | repo --name=standard --baseurl=http://download.tizen.org/releases/milestone/tizen/unified/latest/repos/standard/packages/ --ssl_verify=no
12 | repo --name=base --baseurl=http://download.tizen.org/releases/milestone/tizen/base/latest/repos/standard/packages/ --ssl_verify=no
13 |
14 | %packages
15 | tar
16 | gzip
17 |
18 | sed
19 | grep
20 | gawk
21 | perl
22 |
23 | binutils
24 | findutils
25 | util-linux
26 | lttng-ust
27 | userspace-rcu
28 | procps-ng
29 | tzdata
30 | ca-certificates
31 |
32 |
33 | ### Core FX
34 | libicu
35 | libunwind
36 | iputils
37 | zlib
38 | krb5
39 | libcurl
40 | libopenssl
41 |
42 | %end
43 |
44 | %post
45 |
46 | ### Update /tmp privilege
47 | chmod 777 /tmp
48 | ####################################
49 |
50 | %end
51 |
--------------------------------------------------------------------------------
/eng/common/cross/armel/tizen/tizen.patch:
--------------------------------------------------------------------------------
1 | diff -u -r a/usr/lib/libc.so b/usr/lib/libc.so
2 | --- a/usr/lib/libc.so 2016-12-30 23:00:08.284951863 +0900
3 | +++ b/usr/lib/libc.so 2016-12-30 23:00:32.140951815 +0900
4 | @@ -2,4 +2,4 @@
5 | Use the shared library, but some functions are only in
6 | the static library, so try that secondarily. */
7 | OUTPUT_FORMAT(elf32-littlearm)
8 | -GROUP ( /lib/libc.so.6 /usr/lib/libc_nonshared.a AS_NEEDED ( /lib/ld-linux.so.3 ) )
9 | +GROUP ( libc.so.6 libc_nonshared.a AS_NEEDED ( ld-linux.so.3 ) )
10 |
--------------------------------------------------------------------------------
/eng/common/cross/s390x/sources.list.bionic:
--------------------------------------------------------------------------------
1 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
2 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic main restricted universe
3 |
4 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
5 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-updates main restricted universe
6 |
7 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
8 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-backports main restricted
9 |
10 | deb http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
11 | deb-src http://ports.ubuntu.com/ubuntu-ports/ bionic-security main restricted universe multiverse
12 |
--------------------------------------------------------------------------------
/eng/common/cross/x86/sources.list.bionic:
--------------------------------------------------------------------------------
1 | deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe
2 | deb-src http://archive.ubuntu.com/ubuntu/ bionic main restricted universe
3 |
4 | deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe
5 | deb-src http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe
6 |
7 | deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted
8 | deb-src http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted
9 |
10 | deb http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
11 | deb-src http://archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse
12 |
--------------------------------------------------------------------------------
/eng/common/cross/x86/sources.list.xenial:
--------------------------------------------------------------------------------
1 | deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
2 | deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe
3 |
4 | deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe
5 | deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe
6 |
7 | deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted
8 | deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted
9 |
10 | deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
11 | deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
12 |
--------------------------------------------------------------------------------
/eng/common/dotnet-install.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0dotnet-install.ps1""" %*"
--------------------------------------------------------------------------------
/eng/common/dotnet-install.ps1:
--------------------------------------------------------------------------------
1 | [CmdletBinding(PositionalBinding=$false)]
2 | Param(
3 | [string] $verbosity = 'minimal',
4 | [string] $architecture = '',
5 | [string] $version = 'Latest',
6 | [string] $runtime = 'dotnet',
7 | [string] $RuntimeSourceFeed = '',
8 | [string] $RuntimeSourceFeedKey = ''
9 | )
10 |
11 | . $PSScriptRoot\tools.ps1
12 |
13 | $dotnetRoot = Join-Path $RepoRoot '.dotnet'
14 |
15 | $installdir = $dotnetRoot
16 | try {
17 | if ($architecture -and $architecture.Trim() -eq 'x86') {
18 | $installdir = Join-Path $installdir 'x86'
19 | }
20 | InstallDotNet $installdir $version $architecture $runtime $true -RuntimeSourceFeed $RuntimeSourceFeed -RuntimeSourceFeedKey $RuntimeSourceFeedKey
21 | }
22 | catch {
23 | Write-Host $_.ScriptStackTrace
24 | Write-PipelineTelemetryError -Category 'InitializeToolset' -Message $_
25 | ExitWithExitCode 1
26 | }
27 |
28 | ExitWithExitCode 0
29 |
--------------------------------------------------------------------------------
/eng/common/enable-cross-org-publishing.ps1:
--------------------------------------------------------------------------------
1 | param(
2 | [string] $token
3 | )
4 |
5 |
6 | . $PSScriptRoot\pipeline-logging-functions.ps1
7 |
8 | # Write-PipelineSetVariable will no-op if a variable named $ci is not defined
9 | # Since this script is only ever called in AzDO builds, just universally set it
10 | $ci = $true
11 |
12 | Write-PipelineSetVariable -Name 'VSS_NUGET_ACCESSTOKEN' -Value $token -IsMultiJobVariable $false
13 | Write-PipelineSetVariable -Name 'VSS_NUGET_URI_PREFIXES' -Value 'https://dnceng.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/dnceng/;https://devdiv.pkgs.visualstudio.com/;https://pkgs.dev.azure.com/devdiv/' -IsMultiJobVariable $false
14 |
--------------------------------------------------------------------------------
/eng/common/helixpublish.proj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.DotNet.Helix.Sdk" DefaultTargets="Test">
2 |
3 | <PropertyGroup>
4 | <Language>msbuild</Language>
5 | </PropertyGroup>
6 |
7 | <ItemGroup>
8 | <HelixCorrelationPayload Include="$(CorrelationPayloadDirectory)">
9 | <PayloadDirectory>%(Identity)</PayloadDirectory>
10 | </HelixCorrelationPayload>
11 | </ItemGroup>
12 |
13 | <ItemGroup>
14 | <HelixWorkItem Include="WorkItem" Condition="'$(WorkItemDirectory)' != ''">
15 | <PayloadDirectory>$(WorkItemDirectory)</PayloadDirectory>
16 | <Command>$(WorkItemCommand)</Command>
17 | <Timeout Condition="'$(WorkItemTimeout)' != ''">$(WorkItemTimeout)</Timeout>
18 | </HelixWorkItem>
19 | </ItemGroup>
20 |
21 | <ItemGroup>
22 | <XUnitProject Include="$(XUnitProjects.Split(';'))">
23 | <Arguments />
24 | </XUnitProject>
25 | </ItemGroup>
26 | </Project>
27 |
--------------------------------------------------------------------------------
/eng/common/init-tools-native.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -NoProfile -NoLogo -ExecutionPolicy ByPass -command "& """%~dp0init-tools-native.ps1""" %*"
3 | exit /b %ErrorLevel%
--------------------------------------------------------------------------------
/eng/common/internal/Directory.Build.props:
--------------------------------------------------------------------------------
1 | <!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. -->
2 | <Project>
3 | <Import Project="Sdk.props" Sdk="Microsoft.DotNet.Arcade.Sdk" />
4 | </Project>
5 |
--------------------------------------------------------------------------------
/eng/common/internal/NuGet.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <configuration>
3 | <packageSources>
4 | <clear />
5 | <add key="dotnet-core-internal-tooling" value="https://pkgs.dev.azure.com/devdiv/_packaging/dotnet-core-internal-tooling/nuget/v3/index.json" />
6 | </packageSources>
7 | </configuration>
8 |
--------------------------------------------------------------------------------
/eng/common/msbuild.ps1:
--------------------------------------------------------------------------------
1 | [CmdletBinding(PositionalBinding=$false)]
2 | Param(
3 | [string] $verbosity = 'minimal',
4 | [bool] $warnAsError = $true,
5 | [bool] $nodeReuse = $true,
6 | [switch] $ci,
7 | [switch] $prepareMachine,
8 | [switch] $excludePrereleaseVS,
9 | [Parameter(ValueFromRemainingArguments=$true)][String[]]$extraArgs
10 | )
11 |
12 | . $PSScriptRoot\tools.ps1
13 |
14 | try {
15 | if ($ci) {
16 | $nodeReuse = $false
17 | }
18 |
19 | MSBuild @extraArgs
20 | }
21 | catch {
22 | Write-Host $_.ScriptStackTrace
23 | Write-PipelineTelemetryError -Category 'Build' -Message $_
24 | ExitWithExitCode 1
25 | }
26 |
27 | ExitWithExitCode 0
--------------------------------------------------------------------------------
/eng/common/post-build/nuget-validation.ps1:
--------------------------------------------------------------------------------
1 | # This script validates NuGet package metadata information using this
2 | # tool: https://github.com/NuGet/NuGetGallery/tree/jver-verify/src/VerifyMicrosoftPackage
3 |
4 | param(
5 | [Parameter(Mandatory=$true)][string] $PackagesPath # Path to where the packages to be validated are
6 | )
7 |
8 | try {
9 | & $PSScriptRoot\nuget-verification.ps1 ${PackagesPath}\*.nupkg
10 | }
11 | catch {
12 | Write-Host $_.ScriptStackTrace
13 | Write-PipelineTelemetryError -Category 'NuGetValidation' -Message $_
14 | ExitWithExitCode 1
15 | }
16 |
--------------------------------------------------------------------------------
/eng/common/sdl/NuGet.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <configuration>
3 | <solution>
4 | <add key="disableSourceControlIntegration" value="true" />
5 | </solution>
6 | <packageSources>
7 | <clear />
8 | <add key="guardian" value="https://securitytools.pkgs.visualstudio.com/_packaging/Guardian/nuget/v3/index.json" />
9 | </packageSources>
10 | <disabledPackageSources>
11 | <clear />
12 | </disabledPackageSources>
13 | </configuration>
14 |
--------------------------------------------------------------------------------
/eng/common/sdl/packages.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <packages>
3 | <package id="Microsoft.Guardian.Cli" version="0.199.0"/>
4 | </packages>
5 |
--------------------------------------------------------------------------------
/eng/common/templates-official/post-build/common-variables.yml:
--------------------------------------------------------------------------------
1 | variables:
2 | - group: AzureDevOps-Artifact-Feeds-Pats
3 | - group: DotNet-Blob-Feed
4 | - group: DotNet-DotNetCli-Storage
5 | - group: Publish-Build-Assets
6 |
7 | # Whether the build is internal or not
8 | - name: IsInternalBuild
9 | value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
10 |
11 | # Default Maestro++ API Endpoint and API Version
12 | - name: MaestroApiEndPoint
13 | value: "https://maestro.dot.net"
14 | - name: MaestroApiVersion
15 | value: "2020-02-20"
16 |
17 | - name: SourceLinkCLIVersion
18 | value: 3.0.0
19 | - name: SymbolToolVersion
20 | value: 1.0.1
21 |
22 | - name: runCodesignValidationInjection
23 | value: false
24 |
--------------------------------------------------------------------------------
/eng/common/templates-official/steps/component-governance.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | disableComponentGovernance: false
3 |
4 | steps:
5 | - ${{ if eq(parameters.disableComponentGovernance, 'true') }}:
6 | - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true"
7 | displayName: Set skipComponentGovernanceDetection variable
8 | - ${{ if ne(parameters.disableComponentGovernance, 'true') }}:
9 | - task: ComponentGovernanceComponentDetection@0
10 | continueOnError: true
--------------------------------------------------------------------------------
/eng/common/templates-official/steps/enable-internal-runtimes.yml:
--------------------------------------------------------------------------------
1 | # Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64'
2 | # variable with the base64-encoded SAS token, by default
3 |
4 | parameters:
5 | - name: federatedServiceConnection
6 | type: string
7 | default: 'dotnetbuilds-internal-read'
8 | - name: outputVariableName
9 | type: string
10 | default: 'dotnetbuilds-internal-container-read-token-base64'
11 | - name: expiryInHours
12 | type: number
13 | default: 1
14 | - name: base64Encode
15 | type: boolean
16 | default: true
17 |
18 | steps:
19 | - ${{ if ne(variables['System.TeamProject'], 'public') }}:
20 | - template: /eng/common/templates-official/steps/get-delegation-sas.yml
21 | parameters:
22 | federatedServiceConnection: ${{ parameters.federatedServiceConnection }}
23 | outputVariableName: ${{ parameters.outputVariableName }}
24 | expiryInHours: ${{ parameters.expiryInHours }}
25 | base64Encode: ${{ parameters.base64Encode }}
26 | storageAccount: dotnetbuilds
27 | container: internal
28 | permissions: rl
29 |
--------------------------------------------------------------------------------
/eng/common/templates-official/steps/publish-logs.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | StageLabel: ''
3 | JobLabel: ''
4 |
5 | steps:
6 | - task: Powershell@2
7 | displayName: Prepare Binlogs to Upload
8 | inputs:
9 | targetType: inline
10 | script: |
11 | New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
12 | Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
13 | continueOnError: true
14 | condition: always()
15 |
16 | - task: 1ES.PublishBuildArtifacts@1
17 | displayName: Publish Logs
18 | inputs:
19 | PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
20 | PublishLocation: Container
21 | ArtifactName: PostBuildLogs
22 | continueOnError: true
23 | condition: always()
24 |
--------------------------------------------------------------------------------
/eng/common/templates-official/variables/sdl-variables.yml:
--------------------------------------------------------------------------------
1 | variables:
2 | # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in
3 | # sync with the packages.config file.
4 | - name: DefaultGuardianVersion
5 | value: 0.110.1
6 | - name: GuardianPackagesConfigFile
7 | value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
--------------------------------------------------------------------------------
/eng/common/templates/post-build/common-variables.yml:
--------------------------------------------------------------------------------
1 | variables:
2 | - group: AzureDevOps-Artifact-Feeds-Pats
3 | - group: DotNet-Blob-Feed
4 | - group: DotNet-DotNetCli-Storage
5 | - group: Publish-Build-Assets
6 |
7 | # Whether the build is internal or not
8 | - name: IsInternalBuild
9 | value: ${{ and(ne(variables['System.TeamProject'], 'public'), contains(variables['Build.SourceBranch'], 'internal')) }}
10 |
11 | # Default Maestro++ API Endpoint and API Version
12 | - name: MaestroApiEndPoint
13 | value: "https://maestro.dot.net"
14 | - name: MaestroApiVersion
15 | value: "2020-02-20"
16 |
17 | - name: SourceLinkCLIVersion
18 | value: 3.0.0
19 | - name: SymbolToolVersion
20 | value: 1.0.1
21 |
22 | - name: runCodesignValidationInjection
23 | value: false
24 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/build-reason.yml:
--------------------------------------------------------------------------------
1 | # build-reason.yml
2 | # Description: runs steps if build.reason condition is valid. conditions is a string of valid build reasons
3 | # to include steps (',' separated).
4 | parameters:
5 | conditions: ''
6 | steps: []
7 |
8 | steps:
9 | - ${{ if and( not(startsWith(parameters.conditions, 'not')), contains(parameters.conditions, variables['build.reason'])) }}:
10 | - ${{ parameters.steps }}
11 | - ${{ if and( startsWith(parameters.conditions, 'not'), not(contains(parameters.conditions, variables['build.reason']))) }}:
12 | - ${{ parameters.steps }}
13 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/component-governance.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | disableComponentGovernance: false
3 |
4 | steps:
5 | - ${{ if eq(parameters.disableComponentGovernance, 'true') }}:
6 | - script: echo "##vso[task.setvariable variable=skipComponentGovernanceDetection]true"
7 | displayName: Set skipComponentGovernanceDetection variable
8 | - ${{ if ne(parameters.disableComponentGovernance, 'true') }}:
9 | - task: ComponentGovernanceComponentDetection@0
10 | continueOnError: true
--------------------------------------------------------------------------------
/eng/common/templates/steps/enable-internal-runtimes.yml:
--------------------------------------------------------------------------------
1 | # Obtains internal runtime download credentials and populates the 'dotnetbuilds-internal-container-read-token-base64'
2 | # variable with the base64-encoded SAS token, by default
3 |
4 | parameters:
5 | - name: federatedServiceConnection
6 | type: string
7 | default: 'dotnetbuilds-internal-read'
8 | - name: outputVariableName
9 | type: string
10 | default: 'dotnetbuilds-internal-container-read-token-base64'
11 | - name: expiryInHours
12 | type: number
13 | default: 1
14 | - name: base64Encode
15 | type: boolean
16 | default: true
17 |
18 | steps:
19 | - ${{ if ne(variables['System.TeamProject'], 'public') }}:
20 | - template: /eng/common/templates/steps/get-delegation-sas.yml
21 | parameters:
22 | federatedServiceConnection: ${{ parameters.federatedServiceConnection }}
23 | outputVariableName: ${{ parameters.outputVariableName }}
24 | expiryInHours: ${{ parameters.expiryInHours }}
25 | base64Encode: ${{ parameters.base64Encode }}
26 | storageAccount: dotnetbuilds
27 | container: internal
28 | permissions: rl
29 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/publish-logs.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | StageLabel: ''
3 | JobLabel: ''
4 |
5 | steps:
6 | - task: Powershell@2
7 | displayName: Prepare Binlogs to Upload
8 | inputs:
9 | targetType: inline
10 | script: |
11 | New-Item -ItemType Directory $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
12 | Move-Item -Path $(Build.SourcesDirectory)/artifacts/log/Debug/* $(Build.SourcesDirectory)/PostBuildLogs/${{parameters.StageLabel}}/${{parameters.JobLabel}}/
13 | continueOnError: true
14 | condition: always()
15 |
16 | - task: PublishBuildArtifacts@1
17 | displayName: Publish Logs
18 | inputs:
19 | PathtoPublish: '$(Build.SourcesDirectory)/PostBuildLogs'
20 | PublishLocation: Container
21 | ArtifactName: PostBuildLogs
22 | continueOnError: true
23 | condition: always()
24 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/run-on-unix.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | agentOs: ''
3 | steps: []
4 |
5 | steps:
6 | - ${{ if ne(parameters.agentOs, 'Windows_NT') }}:
7 | - ${{ parameters.steps }}
8 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/run-on-windows.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | agentOs: ''
3 | steps: []
4 |
5 | steps:
6 | - ${{ if eq(parameters.agentOs, 'Windows_NT') }}:
7 | - ${{ parameters.steps }}
8 |
--------------------------------------------------------------------------------
/eng/common/templates/steps/run-script-ifequalelse.yml:
--------------------------------------------------------------------------------
1 | parameters:
2 | # if parameter1 equals parameter 2, run 'ifScript' command, else run 'elsescript' command
3 | parameter1: ''
4 | parameter2: ''
5 | ifScript: ''
6 | elseScript: ''
7 |
8 | # name of script step
9 | name: Script
10 |
11 | # display name of script step
12 | displayName: If-Equal-Else Script
13 |
14 | # environment
15 | env: {}
16 |
17 | # conditional expression for step execution
18 | condition: ''
19 |
20 | steps:
21 | - ${{ if and(ne(parameters.ifScript, ''), eq(parameters.parameter1, parameters.parameter2)) }}:
22 | - script: ${{ parameters.ifScript }}
23 | name: ${{ parameters.name }}
24 | displayName: ${{ parameters.displayName }}
25 | env: ${{ parameters.env }}
26 | condition: ${{ parameters.condition }}
27 |
28 | - ${{ if and(ne(parameters.elseScript, ''), ne(parameters.parameter1, parameters.parameter2)) }}:
29 | - script: ${{ parameters.elseScript }}
30 | name: ${{ parameters.name }}
31 | displayName: ${{ parameters.displayName }}
32 | env: ${{ parameters.env }}
33 | condition: ${{ parameters.condition }}
--------------------------------------------------------------------------------
/eng/common/templates/variables/sdl-variables.yml:
--------------------------------------------------------------------------------
1 | variables:
2 | # The Guardian version specified in 'eng/common/sdl/packages.config'. This value must be kept in
3 | # sync with the packages.config file.
4 | - name: DefaultGuardianVersion
5 | value: 0.110.1
6 | - name: GuardianPackagesConfigFile
7 | value: $(Build.SourcesDirectory)\eng\common\sdl\packages.config
--------------------------------------------------------------------------------
/es-metadata.yml:
--------------------------------------------------------------------------------
1 | schemaVersion: 0.0.1
2 | isProduction: true
3 | accountableOwners:
4 | service: 4db45fa9-fb0f-43ce-b523-ad1da773dfbc
5 | routing:
6 | defaultAreaPath:
7 | org: devdiv
8 | path: DevDiv\ASP.NET Core
9 |
--------------------------------------------------------------------------------
/global.json:
--------------------------------------------------------------------------------
1 | {
2 | "sdk": {
3 | "version": "8.0.411"
4 | },
5 | "tools": {
6 | "dotnet": "8.0.411"
7 | },
8 | "msbuild-sdks": {
9 | "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.25468.4"
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/pack.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore -build -pack %*"
3 |
--------------------------------------------------------------------------------
/restore.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -restore %*"
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.Selfhost/App.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <configuration>
3 | <startup>
4 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
5 | </startup>
6 | </configuration>
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.Selfhost/Program.cs:
--------------------------------------------------------------------------------
1 |
2 | using System;
3 | using System.Collections.Generic;
4 | using System.Linq;
5 | using System.Text;
6 | using System.Threading.Tasks;
7 | using Microsoft.Owin;
8 | using Microsoft.Owin.Hosting;
9 | using Microsoft.Owin.Host.HttpListener;
10 | using Owin;
11 |
12 | namespace Katana.Sandbox.Selfhost
13 | {
14 | class Program
15 | {
16 | static void Main()
17 | {
18 | var address = "http://localhost:8000/";
19 | using (var server = WebApp.Start(address, appBuilder =>
20 | {
21 | var owinHttpListener = appBuilder.Properties[typeof(OwinHttpListener).FullName] as OwinHttpListener;
22 | appBuilder.Use(async (context, next) => await context.Response.WriteAsync("Hello world!"));
23 | }))
24 | {
25 | Console.WriteLine("Listening on " + address);
26 | Console.ReadKey();
27 | }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.Selfhost/packages.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <packages>
3 | <package id="Owin" version="1.0" targetFramework="net45" />
4 | </packages>
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.WebClient/ClientPageSignIn.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 | <html xmlns="http://www.w3.org/1999/xhtml">
3 | <head>
4 | <title>Katana.Sandbox.WebClient - Client Page</title>
5 | </head>
6 | <body style="background-color: azure">
7 | <h1>Katana.Sandbox.WebClient</h1>
8 | <h2>Client Page</h2>
9 | <p>Welcome back!</p>
10 | <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
11 | <script src="ClientPageSignIn.js"></script>
12 | </body>
13 | </html>
14 |
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.WebClient/ClientPageSignIn.js:
--------------------------------------------------------------------------------
1 |
2 | (function ($) {
3 | var query = {};
4 | window.location.search.substring(1).split('&').forEach(function (term) {
5 | var index = term.indexOf('=');
6 | if (index != -1) {
7 | query[decodeURIComponent(term.substring(0, index))] = decodeURIComponent(term.substring(index + 1));
8 | }
9 | });
10 | window.opener.$('#Authorize').trigger('signin.' + query['state'], { 'query': query });
11 | window.close();
12 | })(jQuery);
13 |
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.WebClient/packages.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <packages>
3 | <package id="DotNetOpenAuth.Core" version="4.3.1.13153" targetFramework="net45" />
4 | <package id="DotNetOpenAuth.OAuth2.Client" version="4.3.1.13153" targetFramework="net45" />
5 | <package id="DotNetOpenAuth.OAuth2.ClientAuthorization" version="4.3.1.13153" targetFramework="net45" />
6 | <package id="DotNetOpenAuth.OAuth2.Core" version="4.3.1.13153" targetFramework="net45" />
7 | <package id="Microsoft.Bcl" version="1.1.6" targetFramework="net45" />
8 | <package id="Microsoft.Bcl.Build" version="1.0.13" targetFramework="net45" />
9 | <package id="Microsoft.Net.Http" version="2.2.18" targetFramework="net45" />
10 | </packages>
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.WebServer/AuthorizeError.cshtml:
--------------------------------------------------------------------------------
1 | @using System
2 | @using System.Security.Claims
3 | @using System.Web
4 | @using Microsoft.Owin
5 | @{
6 | IOwinContext owinContext = Context.GetOwinContext();
7 | var error = owinContext.Get<string>("oauth.Error");
8 | var errorDescription = owinContext.Get<string>("oauth.ErrorDescription");
9 | var errorUri = owinContext.Get<string>("oauth.ErrorUri");
10 | }
11 | <!DOCTYPE html>
12 | <html xmlns="http://www.w3.org/1999/xhtml">
13 | <head>
14 | <title>Authorize Error</title>
15 | </head>
16 | <body>
17 | <h1>Katana.Sandbox.WebServer</h1>
18 | <h2>OAuth2 Authorize Error</h2>
19 | <p>Error: @error</p>
20 | <p>@errorDescription</p>
21 | </body>
22 | </html>
23 |
24 |
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.WebServer/Logout.cshtml:
--------------------------------------------------------------------------------
1 | @using System
2 | <!DOCTYPE html>
3 | <html xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <title>Logout</title>
6 | </head>
7 | <body>
8 | <p>Hello world</p>
9 | </body>
10 | </html>
11 |
--------------------------------------------------------------------------------
/samples/Katana.Sandbox.WebServer/packages.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <packages>
3 | <package id="Microsoft.IdentityModel.JsonWebTokens" version="5.7.0" targetFramework="net45" />
4 | <package id="Microsoft.IdentityModel.Logging" version="5.7.0" targetFramework="net45" />
5 | <package id="Microsoft.IdentityModel.Tokens" version="5.7.0" targetFramework="net45" />
6 | <package id="Newtonsoft.Json" version="13.0.1" targetFramework="net45" />
7 | <package id="Owin" version="1.0" targetFramework="net45" />
8 | <package id="System.IdentityModel.Tokens.Jwt" version="5.7.0" targetFramework="net45" />
9 | </packages>
--------------------------------------------------------------------------------
/src/Directory.Build.props:
--------------------------------------------------------------------------------
1 | <Project>
2 | <!-- Recurse up. -->
3 | <Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
4 |
5 | <PropertyGroup>
6 | <IsPackable>true</IsPackable>
7 | <GenerateDocumentationFile>True</GenerateDocumentationFile>
8 | </PropertyGroup>
9 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Cors/ICorsPolicyProvider.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Threading.Tasks;
5 | using System.Web.Cors;
6 |
7 | namespace Microsoft.Owin.Cors
8 | {
9 | /// <summary>
10 | /// Defines how to select a CORS policy for a given request.
11 | /// </summary>
12 | public interface ICorsPolicyProvider
13 | {
14 | /// <summary>
15 | /// Selects a CORS policy to apply for the given request.
16 | /// </summary>
17 | /// <param name="request"></param>
18 | /// <returns>The CORS policy to apply to the request, or null if no policy applies and
19 | /// the request should be passed through to the next middleware.</returns>
20 | Task<CorsPolicy> GetCorsPolicyAsync(IOwinRequest request);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Cors/Microsoft.Owin.Cors.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Cors</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>This package contains the components to enable Cross-Origin Resource Sharing (CORS) in OWIN middleware.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
10 | <PackageReference Include="Microsoft.AspNet.Cors" Version="5.0.0" />
11 | </ItemGroup>
12 | <ItemGroup>
13 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
14 | </ItemGroup>
15 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Cors/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Diagnostics
5 | {
6 | internal static class Constants
7 | {
8 | internal const string HostAppMode = "host.AppMode";
9 | internal const string DevMode = "development";
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/DiagnosticsPageOptions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | #if DEBUG
5 | namespace Microsoft.Owin.Diagnostics
6 | {
7 | /// <summary>
8 | /// Options for the DiagnosticsPageMiddleware
9 | /// </summary>
10 | public class DiagnosticsPageOptions
11 | {
12 | /// <summary>
13 | /// Specifies which requests paths will be responded to. Exact matches only. Leave null to handle all requests.
14 | /// </summary>
15 | public PathString Path { get; set; }
16 | }
17 | }
18 | #endif
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/Microsoft.Owin.Diagnostics.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Diagnostics</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Provides middleware components to assist in developing OWIN-based applications.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
10 | </ItemGroup>
11 | <ItemGroup>
12 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
13 | </ItemGroup>
14 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/Views/DiagnosticsPage.cshtml:
--------------------------------------------------------------------------------
1 | @using System
2 | @using System.Globalization
3 | @{
4 | Response.ContentType = "text/html";
5 | string error = Request.Query.Get("error");
6 | if (!string.IsNullOrWhiteSpace(error))
7 | {
8 | throw new InvalidOperationException(string.Format(CultureInfo.InvariantCulture, "User requested error '{0}'", error));
9 | }
10 | }
11 | <!DOCTYPE html>
12 |
13 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
14 | <head>
15 | <meta charset="utf-8" />
16 | <title>@Resources.DiagnosticsPageHtml_Title</title>
17 | </head>
18 | <body>
19 | <div class="main">
20 | <h1>@Resources.DiagnosticsPageHtml_Title</h1>
21 | <p>@Resources.DiagnosticsPageHtml_Information</p>
22 | </div>
23 | <div class="errors">
24 | <h2>@Resources.DiagnosticsPageHtml_TestErrorSection</h2>
25 | <p><a href="@Request.PathBase@Request.Path?error=@Resources.DiagnosticsPageHtml_TestErrorMessage">throw InvalidOperationException</a></p>
26 | </div>
27 | </body>
28 | </html>
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/Views/DiagnosticsPage.tt:
--------------------------------------------------------------------------------
1 | <#@ template debug="false" hostspecific="true" language="C#" #>
2 | <#@ assembly name="System.Core" #>
3 | <#@ assembly name="System.Web.Razor" #>
4 | <#@ import namespace="System.Linq" #>
5 | <#@ import namespace="System.Text" #>
6 | <#@ import namespace="System.Collections.Generic" #>
7 | <#@ import namespace="System.Web.Razor" #>
8 | <#@ import namespace="System.Web.Razor.Text" #>
9 | <#@ output extension=".cs" #>
10 | <#
11 | var host = new RazorEngineHost(new CSharpRazorCodeLanguage());
12 | host.DefaultBaseClass = "Microsoft.Owin.Diagnostics.Views.BaseView";
13 | var engine = new RazorTemplateEngine(host);
14 | var path = Host.ResolvePath("DiagnosticsPage.cshtml");
15 |
16 | var code = engine.GenerateCode(
17 | new System.IO.StreamReader(path),
18 | "DiagnosticsPage",
19 | "Microsoft.Owin.Diagnostics.Views",
20 | @"DiagnosticsPage.cshtml");
21 |
22 | var provider = new Microsoft.CSharp.CSharpCodeProvider();
23 | var writer = new System.IO.StringWriter();
24 | provider.GenerateCodeFromCompileUnit(code.GeneratedCode, writer, null);
25 | #>
26 | <#=writer.ToString()#>
27 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/Views/ErrorDetails.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Linq;
7 | using System.Text;
8 | using Microsoft.Owin.Diagnostics.Views;
9 |
10 | namespace Microsoft.Owin.Diagnostics.Views
11 | {
12 | /// <summary>
13 | /// Contains details for individual exception messages.
14 | /// </summary>
15 | public class ErrorDetails
16 | {
17 | /// <summary>
18 | /// An individual exception
19 | /// </summary>
20 | public Exception Error { get; set; }
21 |
22 | /// <summary>
23 | /// The generated stack frames
24 | /// </summary>
25 | public IEnumerable<StackFrame> StackFrames { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Diagnostics/WelcomePageOptions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Diagnostics
5 | {
6 | /// <summary>
7 | /// Options for the WelcomePageMiddleware.
8 | /// </summary>
9 | public class WelcomePageOptions
10 | {
11 | /// <summary>
12 | /// Specifies which requests paths will be responded to. Exact matches only. Leave null to handle all requests.
13 | /// </summary>
14 | public PathString Path { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.FileSystems/Microsoft.Owin.FileSystems.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.FileSystems</RootNamespace>
5 | <TargetFramework>net4.5</TargetFramework>
6 | <description>This package contains file system abstractions and implementations.</description>
7 | </PropertyGroup>
8 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.FileSystems/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.HttpListener/DictionaryExtensions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace System.Collections.Generic
5 | {
6 | internal static class DictionaryExtensions
7 | {
8 | internal static T Get<T>(this IDictionary<string, object> dictionary, string key)
9 | {
10 | object value;
11 | return dictionary.TryGetValue(key, out value) ? (T)value : default(T);
12 | }
13 |
14 | internal static T Get<T>(this IDictionary<string, object> dictionary, string subDictionaryKey, string key)
15 | {
16 | var subDictionary = dictionary.Get<IDictionary<string, object>>(subDictionaryKey);
17 | if (subDictionary == null)
18 | {
19 | return default(T);
20 | }
21 |
22 | return subDictionary.Get<T>(key);
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.HttpListener/Microsoft.Owin.Host.HttpListener.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Host.HttpListener</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
7 | <description>OWIN server built on the .NET Framework's HttpListener class. Currently the default server used for self-hosting.</description>
8 | </PropertyGroup>
9 | <ItemGroup>
10 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
11 | <InternalsVisibleTo Include="Microsoft.Owin.Host.HttpListener.Tests" />
12 | </ItemGroup>
13 | <ItemGroup>
14 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
15 | </ItemGroup>
16 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.HttpListener/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.HttpListener/PumpLimits.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Host.HttpListener
5 | {
6 | internal class PumpLimits
7 | {
8 | internal PumpLimits(int maxAccepts, int maxRequests)
9 | {
10 | MaxOutstandingAccepts = maxAccepts;
11 | MaxOutstandingRequests = maxRequests;
12 | }
13 |
14 | internal int MaxOutstandingAccepts { get; private set; }
15 |
16 | internal int MaxOutstandingRequests { get; private set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/DataProtection/MachineKeyDataProtector.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Text;
5 | using System.Web.Security;
6 |
7 | namespace Microsoft.Owin.Host.SystemWeb.DataProtection
8 | {
9 | internal class MachineKeyDataProtector
10 | {
11 | private readonly string[] _purposes;
12 |
13 | public MachineKeyDataProtector(params string[] purposes)
14 | {
15 | _purposes = purposes;
16 | }
17 |
18 | public virtual byte[] Protect(byte[] userData)
19 | {
20 | return MachineKey.Protect(userData, _purposes);
21 | }
22 |
23 | public virtual byte[] Unprotect(byte[] protectedData)
24 | {
25 | return MachineKey.Unprotect(protectedData, _purposes);
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/DictionaryExtensions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace System.Collections.Generic
5 | {
6 | internal static class DictionaryExtensions
7 | {
8 | internal static T Get<T>(this IDictionary<string, object> dictionary, string key, T fallback = default(T))
9 | {
10 | object value;
11 | return dictionary.TryGetValue(key, out value) ? (T)value : fallback;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/src/Microsoft.Owin.Host.SystemWeb/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/HttpContextItemKeys.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Host.SystemWeb
5 | {
6 | internal static class HttpContextItemKeys
7 | {
8 | public static readonly string OwinEnvironmentKey = "owin.Environment";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Infrastructure/DefaultTrace.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Diagnostics;
5 |
6 | namespace Microsoft.Owin.Host.SystemWeb.Infrastructure
7 | {
8 | internal class DefaultTrace : ITrace
9 | {
10 | private readonly TraceSource _traceSource;
11 |
12 | public DefaultTrace(TraceSource traceSource)
13 | {
14 | _traceSource = traceSource;
15 | }
16 |
17 | public void Write(TraceEventType eventType, string format, params object[] args)
18 | {
19 | _traceSource.TraceEvent(eventType, 0, format, args);
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Infrastructure/ErrorState.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Runtime.ExceptionServices;
6 |
7 | namespace Microsoft.Owin.Host.SystemWeb.Infrastructure
8 | {
9 | internal class ErrorState
10 | {
11 | private readonly ExceptionDispatchInfo _exceptionDispatchInfo;
12 |
13 | private ErrorState(ExceptionDispatchInfo exceptionDispatchInfo)
14 | {
15 | _exceptionDispatchInfo = exceptionDispatchInfo;
16 | }
17 |
18 | public static ErrorState Capture(Exception exception)
19 | {
20 | ExceptionDispatchInfo exceptionDispatchInfo = ExceptionDispatchInfo.Capture(exception);
21 | return new ErrorState(exceptionDispatchInfo);
22 | }
23 |
24 | public void Rethrow()
25 | {
26 | _exceptionDispatchInfo.Throw();
27 | }
28 | }
29 | }
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Infrastructure/ITrace.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Diagnostics;
5 |
6 | namespace Microsoft.Owin.Host.SystemWeb.Infrastructure
7 | {
8 | internal interface ITrace
9 | {
10 | void Write(TraceEventType eventType, string format, params object[] args);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Infrastructure/ITraceFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Host.SystemWeb.Infrastructure
5 | {
6 | internal interface ITraceFactory
7 | {
8 | ITrace Create(string name);
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Infrastructure/ReferencedAssemblyWrapper.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 | using System.Linq;
6 | using System.Reflection;
7 | using System.Web.Compilation;
8 |
9 | namespace Microsoft.Owin.Host.SystemWeb.Infrastructure
10 | {
11 | internal class ReferencedAssembliesWrapper : IEnumerable<Assembly>
12 | {
13 | public IEnumerator<Assembly> GetEnumerator()
14 | {
15 | return BuildManager.GetReferencedAssemblies().Cast<Assembly>().GetEnumerator();
16 | }
17 |
18 | System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
19 | {
20 | return GetEnumerator();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Infrastructure/TraceExtensions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Diagnostics;
6 |
7 | namespace Microsoft.Owin.Host.SystemWeb.Infrastructure
8 | {
9 | internal static class TraceExtensions
10 | {
11 | public static void WriteError(this ITrace trace, string message, Exception error)
12 | {
13 | trace.Write(TraceEventType.Error, "{0}\r\n{1}", message, error);
14 | }
15 |
16 | public static void WriteWarning(this ITrace trace, string message, Exception error)
17 | {
18 | trace.Write(TraceEventType.Warning, "{0}\r\n{1}", message, error);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Infrastructure/TraceFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Host.SystemWeb.Infrastructure
5 | {
6 | internal static class TraceFactory
7 | {
8 | private static ITraceFactory _instance = new DefaultTraceFactory();
9 |
10 | public static ITraceFactory Instance
11 | {
12 | get { return _instance; }
13 | set { _instance = value; }
14 | }
15 |
16 | public static ITrace Create(string name)
17 | {
18 | return Instance.Create(name);
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/IntegratedPipeline/IntegratedPipelineBlueprintStage.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading.Tasks;
7 |
8 | namespace Microsoft.Owin.Host.SystemWeb.IntegratedPipeline
9 | {
10 | internal class IntegratedPipelineBlueprintStage
11 | {
12 | public string Name { get; set; }
13 | public IntegratedPipelineBlueprintStage NextStage { get; set; }
14 |
15 | public Func<IDictionary<string, object>, Task> EntryPoint { get; set; }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Host.SystemWeb/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Builder/AppBuilderFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Builder;
5 | using Owin;
6 |
7 | namespace Microsoft.Owin.Hosting.Builder
8 | {
9 | /// <summary>
10 | /// Provides an IAppBuilder instance based on Microsoft.Owin.Builder.AppBuilder.
11 | /// </summary>
12 | public class AppBuilderFactory : IAppBuilderFactory
13 | {
14 | /// <summary>
15 | /// Create a new IAppBuilder instance based on Microsoft.Owin.Builder.AppBuilder.
16 | /// </summary>
17 | /// <returns></returns>
18 | public virtual IAppBuilder Create()
19 | {
20 | return new AppBuilder();
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Builder/IAppActivator.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.Builder
7 | {
8 | /// <summary>
9 | /// Used to instantiate the application entry point. e.g. the Startup class.
10 | /// </summary>
11 | public interface IAppActivator
12 | {
13 | /// <summary>
14 | /// Instantiate an instance of the given type.
15 | /// </summary>
16 | /// <param name="type"></param>
17 | /// <returns></returns>
18 | object Activate(Type type);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Builder/IAppBuilderFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Owin;
5 |
6 | namespace Microsoft.Owin.Hosting.Builder
7 | {
8 | /// <summary>
9 | /// Provides an IAppBuilder instance.
10 | /// </summary>
11 | public interface IAppBuilderFactory
12 | {
13 | /// <summary>
14 | /// Create a new IAppBuilder instance.
15 | /// </summary>
16 | /// <returns></returns>
17 | IAppBuilder Create();
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Engine/IHostingEngine.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.Engine
7 | {
8 | /// <summary>
9 | /// Initializes and starts a web application.
10 | /// </summary>
11 | public interface IHostingEngine
12 | {
13 | /// <summary>
14 | /// Initializes and starts a web application.
15 | /// </summary>
16 | /// <param name="context"></param>
17 | /// <returns></returns>
18 | IDisposable Start(StartContext context);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Diagnostics.CodeAnalysis;
5 |
6 | [assembly: SuppressMessage("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode", Scope = "member", Target = "Owin.Loader.DefaultLoader.#.ctor(System.Func`2<System.String,System.Action`1<Owin.IAppBuilder>>)", Justification = "Dependency included by source")]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Loader/IAppLoader.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using Owin;
7 |
8 | namespace Microsoft.Owin.Hosting.Loader
9 | {
10 | /// <summary>
11 | /// Attempts to find the entry point for an app.
12 | /// </summary>
13 | public interface IAppLoader
14 | {
15 | /// <summary>
16 | /// Attempts to find the entry point for a given configuration string.
17 | /// </summary>
18 | /// <param name="appName"></param>
19 | /// <param name="errors"></param>
20 | /// <returns></returns>
21 | Action<IAppBuilder> Load(string appName, IList<string> errors);
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Loader/IAppLoaderFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using Owin;
7 |
8 | namespace Microsoft.Owin.Hosting.Loader
9 | {
10 | using AppLoaderFunc = Func<string, IList<string>, Action<IAppBuilder>>;
11 |
12 | /// <summary>
13 | /// Initializes a new app loader.
14 | /// </summary>
15 | public interface IAppLoaderFactory
16 | {
17 | /// <summary>
18 | /// Not currently used.
19 | /// </summary>
20 | int Order { get; }
21 |
22 | /// <summary>
23 | /// Create a new chained app loader.
24 | /// </summary>
25 | /// <param name="nextLoader"></param>
26 | /// <returns></returns>
27 | AppLoaderFunc Create(AppLoaderFunc nextLoader);
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Microsoft.Owin.Hosting.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Hosting</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Provides default infrastructure types for hosting and running OWIN-based applications.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <Compile Include="..\Owin.Loader\Constants.cs" Link="Loader\Constants.cs" />
10 | <Compile Include="..\Owin.Loader\DefaultLoader.cs" Link="Loader\DefaultLoader.cs" />
11 | <Compile Include="..\Owin.Loader\NullLoader.cs" Link="Loader\NullLoader.cs" />
12 | </ItemGroup>
13 | <ItemGroup>
14 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
15 | <InternalsVisibleTo Include="Microsoft.Owin.Hosting.Tests" />
16 | </ItemGroup>
17 | <ItemGroup>
18 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
19 | </ItemGroup>
20 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/ServerFactory/IServerFactoryActivator.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.ServerFactory
7 | {
8 | /// <summary>
9 | /// Used to instantiate the server factory.
10 | /// </summary>
11 | public interface IServerFactoryActivator
12 | {
13 | /// <summary>
14 | /// Instantiate an instance of the given type.
15 | /// </summary>
16 | /// <param name="type"></param>
17 | /// <returns></returns>
18 | object Activate(Type type);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/ServerFactory/IServerFactoryAdapter.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Owin;
6 |
7 | namespace Microsoft.Owin.Hosting.ServerFactory
8 | {
9 | /// <summary>
10 | /// The basic ServerFactory contract.
11 | /// </summary>
12 | public interface IServerFactoryAdapter
13 | {
14 | /// <summary>
15 | /// An optional method that allows the server factory to specify its capabilities.
16 | /// </summary>
17 | /// <param name="builder"></param>
18 | void Initialize(IAppBuilder builder);
19 |
20 | /// <summary>
21 | /// Starts a server with the given app instance.
22 | /// </summary>
23 | /// <param name="builder"></param>
24 | /// <returns></returns>
25 | IDisposable Create(IAppBuilder builder);
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/ServerFactory/IServerFactoryLoader.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Hosting.ServerFactory
5 | {
6 | /// <summary>
7 | /// Used to locate and load the named server factory.
8 | /// </summary>
9 | public interface IServerFactoryLoader
10 | {
11 | /// <summary>
12 | /// Used to locate and load the named server factory.
13 | /// </summary>
14 | /// <param name="serverName"></param>
15 | /// <returns></returns>
16 | IServerFactoryAdapter Load(string serverName);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Services/ServiceProviderExtensions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.Services
7 | {
8 | /// <summary>
9 | /// Extension methods for IServiceProvider.
10 | /// </summary>
11 | public static class ServiceProviderExtensions
12 | {
13 | /// <summary>
14 | /// Retrieve a service of type T from the IServiceProvider.
15 | /// </summary>
16 | /// <typeparam name="T"></typeparam>
17 | /// <param name="services"></param>
18 | /// <returns></returns>
19 | public static T GetService<T>(this IServiceProvider services)
20 | {
21 | if (services == null)
22 | {
23 | throw new ArgumentNullException("services");
24 | }
25 |
26 | return (T)services.GetService(typeof(T));
27 | }
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Starter/HostingStarterAttribute.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.Starter
7 | {
8 | /// <summary>
9 | /// This attribute is used to identify custom hosting starters that may be loaded at runtime.
10 | /// </summary>
11 | [AttributeUsage(AttributeTargets.Assembly)]
12 | public sealed class HostingStarterAttribute : Attribute
13 | {
14 | /// <summary>
15 | ///
16 | /// </summary>
17 | /// <param name="hostingStarterType"></param>
18 | public HostingStarterAttribute(Type hostingStarterType)
19 | {
20 | HostingStarterType = hostingStarterType;
21 | }
22 |
23 | /// <summary>
24 | ///
25 | /// </summary>
26 | public Type HostingStarterType { get; private set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Starter/IHostingStarter.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.Starter
7 | {
8 | /// <summary>
9 | /// Performs any necessary environment setup prior to executing the IHostingEngine.
10 | /// </summary>
11 | public interface IHostingStarter
12 | {
13 | /// <summary>
14 | /// Performs any necessary environment setup prior to executing the IHostingEngine.
15 | /// </summary>
16 | /// <param name="options"></param>
17 | /// <returns></returns>
18 | IDisposable Start(StartOptions options);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Starter/IHostingStarterActivator.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.Starter
7 | {
8 | /// <summary>
9 | /// Instantiates instances of the IHostingStarter.
10 | /// </summary>
11 | public interface IHostingStarterActivator
12 | {
13 | /// <summary>
14 | /// Instantiates instances of the IHostingStarter.
15 | /// </summary>
16 | /// <param name="type"></param>
17 | /// <returns></returns>
18 | IHostingStarter Activate(Type type);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Starter/IHostingStarterFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Hosting.Starter
5 | {
6 | /// <summary>
7 | /// Creates a IHostingStarter for the given identifier.
8 | /// </summary>
9 | public interface IHostingStarterFactory
10 | {
11 | /// <summary>
12 | /// Creates a IHostingStarter for the given identifier.
13 | /// </summary>
14 | /// <param name="name"></param>
15 | /// <returns></returns>
16 | IHostingStarter Create(string name);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Tracing/ITraceOutputFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.IO;
5 |
6 | namespace Microsoft.Owin.Hosting.Tracing
7 | {
8 | /// <summary>
9 | /// Used to create the trace output.
10 | /// </summary>
11 | public interface ITraceOutputFactory
12 | {
13 | /// <summary>
14 | /// Used to create the trace output.
15 | /// </summary>
16 | /// <param name="outputFile"></param>
17 | /// <returns></returns>
18 | TextWriter Create(string outputFile);
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Tracing/TraceOutputFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.IO;
6 |
7 | namespace Microsoft.Owin.Hosting.Tracing
8 | {
9 | /// <summary>
10 | /// Opens a stream writer for the given file.
11 | /// </summary>
12 | public class TraceOutputFactory : ITraceOutputFactory
13 | {
14 | /// <summary>
15 | /// Opens a stream writer for the given file.
16 | /// </summary>
17 | /// <param name="outputFile"></param>
18 | /// <returns></returns>
19 | public virtual TextWriter Create(string outputFile)
20 | {
21 | return string.IsNullOrWhiteSpace(outputFile)
22 | ? (TextWriter)new DualWriter(Console.Error)
23 | : new StreamWriter(outputFile, true);
24 | }
25 |
26 | // Writes to Debug and the given text writer
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Hosting/Utilities/Disposable.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Hosting.Utilities
7 | {
8 | internal sealed class Disposable : MarshalByRefObject, IDisposable
9 | {
10 | private readonly Action _dispose;
11 |
12 | public Disposable(Action dispose)
13 | {
14 | _dispose = dispose;
15 | }
16 |
17 | public void Dispose()
18 | {
19 | _dispose.Invoke();
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.ActiveDirectory/IssuerSigningKeys.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 | using Microsoft.IdentityModel.Tokens;
6 |
7 | namespace Microsoft.Owin.Security.ActiveDirectory
8 | {
9 | /// <summary>
10 | /// Signing metadata parsed from a WSFed endpoint.
11 | /// </summary>
12 | internal class IssuerSigningKeys
13 | {
14 | /// <summary>
15 | /// The token issuer.
16 | /// </summary>
17 | public string Issuer { get; set; }
18 |
19 | /// <summary>
20 | /// Signing tokens.
21 | /// </summary>
22 | public IEnumerable<SecurityKey> Keys { get; set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.ActiveDirectory/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Cookies/IAuthenticationSessionStore.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Security.Claims;
6 | using System.Threading.Tasks;
7 |
8 | namespace Microsoft.Owin.Security.Cookies
9 | {
10 | public interface IAuthenticationSessionStore
11 | {
12 | Task<string> StoreAsync(AuthenticationTicket ticket);
13 | Task RenewAsync(string key, AuthenticationTicket ticket);
14 | Task<AuthenticationTicket> RetrieveAsync(string key);
15 | Task RemoveAsync(string key);
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Cookies/Microsoft.Owin.Security.Cookies.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Security.Cookies</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Middleware that enables an application to use cookie based authentication, similar to ASP.NET's forms authentication.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
10 | </ItemGroup>
11 | <ItemGroup>
12 | <ProjectReference Include="..\Microsoft.Owin.Security\Microsoft.Owin.Security.csproj" />
13 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
14 | </ItemGroup>
15 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Cookies/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Facebook/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Facebook
5 | {
6 | internal static class Constants
7 | {
8 | public const string DefaultAuthenticationType = "Facebook";
9 |
10 | // https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow#login
11 | internal const string AuthorizationEndpoint = "https://www.facebook.com/v10.0/dialog/oauth";
12 | internal const string TokenEndpoint = "https://graph.facebook.com/v10.0/oauth/access_token";
13 | internal const string UserInformationEndpoint = "https://graph.facebook.com/v10.0/me";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Facebook/Microsoft.Owin.Security.Facebook.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Security.Facebook</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Middleware that enables an application to support Facebook's OAuth 2.0 authentication workflow.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
10 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
11 | </ItemGroup>
12 | <ItemGroup>
13 | <ProjectReference Include="..\Microsoft.Owin.Security\Microsoft.Owin.Security.csproj" />
14 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
15 | </ItemGroup>
16 | <ItemGroup>
17 | <Reference Include="System.Net.Http" />
18 | <Reference Include="System.Net.Http.WebRequest" />
19 | </ItemGroup>
20 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Facebook/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Facebook/Provider/FacebookReturnEndpointContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Security.Provider;
5 |
6 | namespace Microsoft.Owin.Security.Facebook
7 | {
8 | /// <summary>
9 | /// Provides context information to middleware providers.
10 | /// </summary>
11 | public class FacebookReturnEndpointContext : ReturnEndpointContext
12 | {
13 | /// <summary>
14 | ///
15 | /// </summary>
16 | /// <param name="context">OWIN environment</param>
17 | /// <param name="ticket">The authentication ticket</param>
18 | public FacebookReturnEndpointContext(
19 | IOwinContext context,
20 | AuthenticationTicket ticket)
21 | : base(context, ticket)
22 | {
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Google/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Google
5 | {
6 | internal static class Constants
7 | {
8 | internal const string DefaultAuthenticationType = "Google";
9 |
10 | // https://developers.google.com/identity/protocols/oauth2/web-server#httprest
11 | internal const string AuthorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth";
12 | internal const string TokenEndpoint = "https://oauth2.googleapis.com/token";
13 | internal const string UserInformationEndpoint = "https://www.googleapis.com/oauth2/v2/userinfo";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Google/Microsoft.Owin.Security.Google.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Security.Google</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Contains middlewares to support Google's OAuth 2.0 authentication workflow.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
10 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
11 | </ItemGroup>
12 | <ItemGroup>
13 | <ProjectReference Include="..\Microsoft.Owin.Security\Microsoft.Owin.Security.csproj" />
14 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
15 | </ItemGroup>
16 | <ItemGroup>
17 | <Reference Include="System.Net.Http" />
18 | <Reference Include="System.Net.Http.WebRequest" />
19 | </ItemGroup>
20 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Google/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Jwt/CustomDictionary.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <Dictionary>
3 | <Words>
4 | <Recognized>
5 | <Word>Symmetic</Word>
6 | </Recognized>
7 | </Words>
8 | </Dictionary>
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Jwt/IIssuerSecurityKeyProvider.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 | using Microsoft.IdentityModel.Tokens;
6 |
7 | namespace Microsoft.Owin.Security.Jwt
8 | {
9 | /// <summary>
10 | /// Provides security key information to the implementing class.
11 | /// </summary>
12 | public interface IIssuerSecurityKeyProvider
13 | {
14 | /// <summary>
15 | /// Gets the issuer the credentials are for.
16 | /// </summary>
17 | /// <value>
18 | /// The issuer the credentials are for.
19 | /// </value>
20 | string Issuer { get; }
21 |
22 | /// <summary>
23 | /// Gets all known security keys.
24 | /// </summary>
25 | /// <value>
26 | /// All known security keys.
27 | /// </value>
28 | IEnumerable<SecurityKey> SecurityKeys { get; }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Jwt/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.MicrosoftAccount/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.MicrosoftAccount
5 | {
6 | internal static class Constants
7 | {
8 | internal const string DefaultAuthenticationType = "Microsoft";
9 |
10 | // https://developer.microsoft.com/en-us/graph/docs/concepts/auth_v2_user
11 | internal const string AuthorizationEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/authorize";
12 | internal const string TokenEndpoint = "https://login.microsoftonline.com/common/oauth2/v2.0/token";
13 | internal const string UserInformationEndpoint = "https://graph.microsoft.com/v1.0/me";
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.MicrosoftAccount/Microsoft.Owin.Security.MicrosoftAccount.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Security.MicrosoftAccount</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Middleware that enables an application to support the Microsoft Account authentication workflow.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
10 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
11 | </ItemGroup>
12 | <ItemGroup>
13 | <ProjectReference Include="..\Microsoft.Owin.Security\Microsoft.Owin.Security.csproj" />
14 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
15 | </ItemGroup>
16 | <ItemGroup>
17 | <Reference Include="System.Net.Http" />
18 | <Reference Include="System.Net.Http.WebRequest" />
19 | </ItemGroup>
20 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.MicrosoftAccount/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.MicrosoftAccount/Provider/MicrosoftAccountReturnEndpointContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Security.Provider;
5 |
6 | namespace Microsoft.Owin.Security.MicrosoftAccount
7 | {
8 | /// <summary>
9 | /// Provides context information to middleware providers.
10 | /// </summary>
11 | public class MicrosoftAccountReturnEndpointContext : ReturnEndpointContext
12 | {
13 | /// <summary>
14 | /// Initializes a new <see cref="MicrosoftAccountReturnEndpointContext"/>.
15 | /// </summary>
16 | /// <param name="context">OWIN environment</param>
17 | /// <param name="ticket">The authentication ticket</param>
18 | public MicrosoftAccountReturnEndpointContext(
19 | IOwinContext context,
20 | AuthenticationTicket ticket)
21 | : base(context, ticket)
22 | {
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/CustomDictionary.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <Dictionary>
3 | <Words>
4 | <Unrecognized>
5 | </Unrecognized>
6 | <Recognized>
7 | <Word>Auth</Word>
8 | <Word>OAuth</Word>
9 | </Recognized>
10 | <DiscreteExceptions>
11 | <Term>Auth</Term>
12 | <Term>OAuth</Term>
13 | </DiscreteExceptions>
14 | </Words>
15 | <Acronyms>
16 | <CasingExceptions>
17 | <Acronym>Auth</Acronym>
18 | <Acronym>OAuth</Acronym>
19 | </CasingExceptions>
20 | </Acronyms>
21 | </Dictionary>
22 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Messages/TokenEndpointRequestClientCredentials.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 | using System.Diagnostics.CodeAnalysis;
6 |
7 | namespace Microsoft.Owin.Security.OAuth.Messages
8 | {
9 | /// <summary>
10 | /// Data object used by TokenEndpointRequest when the "grant_type" is "client_credentials".
11 | /// </summary>
12 | public class TokenEndpointRequestClientCredentials
13 | {
14 | /// <summary>
15 | /// The value passed to the Token endpoint in the "scope" parameter
16 | /// </summary>
17 | [SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly", Justification = "This class is just for passing data through.")]
18 | public IList<string> Scope { get; set; }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Messages/TokenEndpointRequestCustomExtension.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.OAuth.Messages
5 | {
6 | /// <summary>
7 | /// Data object used by TokenEndpointRequest which contains parameter information when the "grant_type" is unrecognized.
8 | /// </summary>
9 | public class TokenEndpointRequestCustomExtension
10 | {
11 | /// <summary>
12 | /// The parameter information when the "grant_type" is unrecognized.
13 | /// </summary>
14 | public IReadableStringCollection Parameters { get; set; }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Microsoft.Owin.Security.OAuth.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Security.OAuth</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Middleware that enables an application to support any standard OAuth 2.0 authentication workflow.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
10 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
11 | </ItemGroup>
12 | <ItemGroup>
13 | <ProjectReference Include="..\Microsoft.Owin.Security\Microsoft.Owin.Security.csproj" />
14 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
15 | </ItemGroup>
16 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/OAuthDefaults.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.OAuth
5 | {
6 | /// <summary>
7 | /// Default values used by authorization server and bearer authentication.
8 | /// </summary>
9 | public static class OAuthDefaults
10 | {
11 | /// <summary>
12 | /// Default value for AuthenticationType property in the OAuthBearerAuthenticationOptions and
13 | /// OAuthAuthorizationServerOptions.
14 | /// </summary>
15 | public const string AuthenticationType = "Bearer";
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Provider/IOAuthAuthorizationServerProvider.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/src/Microsoft.Owin.Security.OAuth/Provider/IOAuthAuthorizationServerProvider.cs
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Provider/OAuthAuthorizationServerProvider.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/src/Microsoft.Owin.Security.OAuth/Provider/OAuthAuthorizationServerProvider.cs
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Provider/OAuthGrantAuthorizationCodeContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.OAuth
5 | {
6 | /// <summary>
7 | /// Provides context information when handling an OAuth authorization code grant.
8 | /// </summary>
9 | public class OAuthGrantAuthorizationCodeContext : BaseValidatingTicketContext<OAuthAuthorizationServerOptions>
10 | {
11 | /// <summary>
12 | /// Initializes a new instance of the <see cref="OAuthGrantAuthorizationCodeContext"/> class
13 | /// </summary>
14 | /// <param name="context"></param>
15 | /// <param name="options"></param>
16 | /// <param name="ticket"></param>
17 | public OAuthGrantAuthorizationCodeContext(
18 | IOwinContext context,
19 | OAuthAuthorizationServerOptions options,
20 | AuthenticationTicket ticket) : base(context, options, ticket)
21 | {
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OAuth/Provider/OAuthValidateIdentityContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.OAuth
5 | {
6 | /// <summary>
7 | /// Contains the authentication ticket data from an OAuth bearer token.
8 | /// </summary>
9 | public class OAuthValidateIdentityContext : BaseValidatingTicketContext<OAuthBearerAuthenticationOptions>
10 | {
11 | /// <summary>
12 | /// Initializes a new instance of the <see cref="OAuthValidateIdentityContext"/> class
13 | /// </summary>
14 | /// <param name="context"></param>
15 | /// <param name="options"></param>
16 | /// <param name="ticket"></param>
17 | public OAuthValidateIdentityContext(
18 | IOwinContext context,
19 | OAuthBearerAuthenticationOptions options,
20 | AuthenticationTicket ticket) : base(context, options, ticket)
21 | {
22 | }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OpenIdConnect/CustomDictionary.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <Dictionary>
3 | <Words>
4 | <Recognized>
5 | <Word>OpenIdConnect</Word>
6 | </Recognized>
7 | </Words>
8 | </Dictionary>
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OpenIdConnect/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/src/Microsoft.Owin.Security.OpenIdConnect/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.OpenIdConnect/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Twitter/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Twitter
5 | {
6 | internal static class Constants
7 | {
8 | public const string DefaultAuthenticationType = "Twitter";
9 | }
10 | }
11 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Twitter/Messages/AccessToken.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Twitter.Messages
5 | {
6 | /// <summary>
7 | /// Twitter access token
8 | /// </summary>
9 | public class AccessToken : RequestToken
10 | {
11 | /// <summary>
12 | /// Gets or sets the Twitter User ID
13 | /// </summary>
14 | public string UserId { get; set; }
15 |
16 | /// <summary>
17 | /// Gets or sets the Twitter screen name
18 | /// </summary>
19 | public string ScreenName { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Twitter/Messages/RequestToken.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Twitter.Messages
5 | {
6 | /// <summary>
7 | /// Twitter request token
8 | /// </summary>
9 | public class RequestToken
10 | {
11 | /// <summary>
12 | /// Gets or sets the Twitter token
13 | /// </summary>
14 | public string Token { get; set; }
15 |
16 | /// <summary>
17 | /// Gets or sets the Twitter token secret
18 | /// </summary>
19 | public string TokenSecret { get; set; }
20 |
21 | public bool CallbackConfirmed { get; set; }
22 |
23 | /// <summary>
24 | /// Gets or sets a property bag for common authentication properties
25 | /// </summary>
26 | public AuthenticationProperties Properties { get; set; }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Twitter/Messages/Serializers.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Security.DataHandler.Serializer;
5 |
6 | namespace Microsoft.Owin.Security.Twitter.Messages
7 | {
8 | /// <summary>
9 | /// Provides access to a request token serializer
10 | /// </summary>
11 | public static class Serializers
12 | {
13 | static Serializers()
14 | {
15 | RequestToken = new RequestTokenSerializer();
16 | }
17 |
18 | /// <summary>
19 | /// Gets or sets a statically-avaliable serializer object. The value for this property will be <see cref="RequestTokenSerializer"/> by default.
20 | /// </summary>
21 | public static IDataSerializer<RequestToken> RequestToken { get; set; }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Twitter/Microsoft.Owin.Security.Twitter.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Security.Twitter</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Middleware that enables an application to support Twitter's OAuth 1.0 authentication workflow.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonVersion)" />
10 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
11 | </ItemGroup>
12 | <ItemGroup>
13 | <ProjectReference Include="..\Microsoft.Owin.Security\Microsoft.Owin.Security.csproj" />
14 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
15 | </ItemGroup>
16 | <ItemGroup>
17 | <Reference Include="System.Net.Http" />
18 | <Reference Include="System.Net.Http.WebRequest" />
19 | </ItemGroup>
20 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Twitter/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.Twitter/Provider/TwitterReturnEndpointContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Security.Provider;
5 |
6 | namespace Microsoft.Owin.Security.Twitter
7 | {
8 | /// <summary>
9 | /// Provides context information to middleware providers.
10 | /// </summary>
11 | public class TwitterReturnEndpointContext : ReturnEndpointContext
12 | {
13 | /// <summary>
14 | /// Initializes a new <see cref="TwitterReturnEndpointContext"/>.
15 | /// </summary>
16 | /// <param name="context">OWIN environment</param>
17 | /// <param name="ticket">The authentication ticket</param>
18 | public TwitterReturnEndpointContext(
19 | IOwinContext context,
20 | AuthenticationTicket ticket)
21 | : base(context, ticket)
22 | {
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.WsFederation/CustomDictionary.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <Dictionary>
3 | <Words>
4 | <Recognized>
5 | <Word>Ws</Word>
6 | <Word>Wreply</Word>
7 | <Word>Wtrealm</Word>
8 | </Recognized>
9 | </Words>
10 | </Dictionary>
11 |
12 |
13 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security.WsFederation/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/AuthenticationMode.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security
5 | {
6 | /// <summary>
7 | /// Controls the behavior of authentication middleware
8 | /// </summary>
9 | public enum AuthenticationMode
10 | {
11 | /// <summary>
12 | /// In Active mode the authentication middleware will alter the user identity as the request arrives, and
13 | /// will also alter a plain 401 as the response leaves.
14 | /// </summary>
15 | Active,
16 |
17 | /// <summary>
18 | /// In Passive mode the authentication middleware will only provide user identity when asked, and will only
19 | /// alter 401 responses where the authentication type named in the extra challenge data.
20 | /// </summary>
21 | Passive
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security
5 | {
6 | /// <summary>
7 | /// String constants used only by the Security assembly
8 | /// </summary>
9 | internal static class Constants
10 | {
11 | /// <summary>
12 | /// Used by middleware extension methods to coordinate the default value Options property SignInAsAuthenticationType
13 | /// </summary>
14 | public const string DefaultSignInAsAuthenticationType = "Microsoft.Owin.Security.Constants.DefaultSignInAsAuthenticationType";
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/Encoder/Base64TextEncoder.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Security.DataHandler.Encoder
7 | {
8 | public class Base64TextEncoder : ITextEncoder
9 | {
10 | public string Encode(byte[] data)
11 | {
12 | return Convert.ToBase64String(data);
13 | }
14 |
15 | public byte[] Decode(string text)
16 | {
17 | return Convert.FromBase64String(text);
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/Encoder/ITextEncoder.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.DataHandler.Encoder
5 | {
6 | public interface ITextEncoder
7 | {
8 | string Encode(byte[] data);
9 | byte[] Decode(string text);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/Encoder/TextEncodings.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.DataHandler.Encoder
5 | {
6 | public static class TextEncodings
7 | {
8 | private static readonly ITextEncoder Base64Instance = new Base64TextEncoder();
9 | private static readonly ITextEncoder Base64UrlInstance = new Base64UrlTextEncoder();
10 |
11 | public static ITextEncoder Base64
12 | {
13 | get { return Base64Instance; }
14 | }
15 |
16 | public static ITextEncoder Base64Url
17 | {
18 | get { return Base64UrlInstance; }
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/ISecureDataFormat.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security
5 | {
6 | public interface ISecureDataFormat<TData>
7 | {
8 | string Protect(TData data);
9 | TData Unprotect(string protectedText);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/PropertiesDataFormat.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Security.DataHandler.Encoder;
5 | using Microsoft.Owin.Security.DataHandler.Serializer;
6 | using Microsoft.Owin.Security.DataProtection;
7 |
8 | namespace Microsoft.Owin.Security.DataHandler
9 | {
10 | public class PropertiesDataFormat : SecureDataFormat<AuthenticationProperties>
11 | {
12 | public PropertiesDataFormat(IDataProtector protector)
13 | : base(DataSerializers.Properties, protector, TextEncodings.Base64Url)
14 | {
15 | }
16 | }
17 | }
18 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/Serializer/DataSerializers.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.DataHandler.Serializer
5 | {
6 | public static class DataSerializers
7 | {
8 | static DataSerializers()
9 | {
10 | Properties = new PropertiesSerializer();
11 | Ticket = new TicketSerializer();
12 | }
13 |
14 | public static IDataSerializer<AuthenticationProperties> Properties { get; set; }
15 |
16 | public static IDataSerializer<AuthenticationTicket> Ticket { get; set; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/Serializer/IDataSerializer.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.DataHandler.Serializer
5 | {
6 | public interface IDataSerializer<TModel>
7 | {
8 | byte[] Serialize(TModel model);
9 | TModel Deserialize(byte[] data);
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataHandler/TicketDataFormat.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Security.DataHandler.Encoder;
5 | using Microsoft.Owin.Security.DataHandler.Serializer;
6 | using Microsoft.Owin.Security.DataProtection;
7 |
8 | namespace Microsoft.Owin.Security.DataHandler
9 | {
10 | public class TicketDataFormat : SecureDataFormat<AuthenticationTicket>
11 | {
12 | public TicketDataFormat(IDataProtector protector) : base(DataSerializers.Ticket, protector, TextEncodings.Base64Url)
13 | {
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/DataProtection/IDataProtectionProvider.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.DataProtection
5 | {
6 | /// <summary>
7 | /// Factory used to create IDataProtection instances
8 | /// </summary>
9 | public interface IDataProtectionProvider
10 | {
11 | /// <summary>
12 | /// Returns a new instance of IDataProtection for the provider.
13 | /// </summary>
14 | /// <param name="purposes">Additional entropy used to ensure protected data may only be unprotected for the correct purposes.</param>
15 | /// <returns>An instance of a data protection service</returns>
16 | IDataProtector Create(params string[] purposes);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Infrastructure/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Infrastructure
5 | {
6 | internal static class Constants
7 | {
8 | public static string SecurityAuthenticate = "security.Authenticate";
9 | internal const string CorrelationPrefix = ".AspNet.Correlation.";
10 | }
11 | }
12 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Infrastructure/IAuthenticationTokenProvider.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Threading.Tasks;
5 |
6 | namespace Microsoft.Owin.Security.Infrastructure
7 | {
8 | public interface IAuthenticationTokenProvider
9 | {
10 | void Create(AuthenticationTokenCreateContext context);
11 | Task CreateAsync(AuthenticationTokenCreateContext context);
12 | void Receive(AuthenticationTokenReceiveContext context);
13 | Task ReceiveAsync(AuthenticationTokenReceiveContext context);
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Microsoft.Owin.Security.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Security</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Common types which are shared by the various authentication middleware components.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
10 | </ItemGroup>
11 | <ItemGroup>
12 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
13 | </ItemGroup>
14 | <ItemGroup>
15 | <Reference Include="System.Security" />
16 | </ItemGroup>
17 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Notifications/AuthenticationFailedNotification.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Security.Notifications
7 | {
8 | public class AuthenticationFailedNotification<TMessage, TOptions> : BaseNotification<TOptions>
9 | {
10 | public AuthenticationFailedNotification(IOwinContext context, TOptions options)
11 | : base(context, options)
12 | {
13 | }
14 |
15 | public TMessage ProtocolMessage { get; set; }
16 |
17 | public Exception Exception { get; set; }
18 | }
19 | }
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Notifications/MessageReceivedNotification.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Notifications
5 | {
6 | public class MessageReceivedNotification<TMessage, TOptions> : BaseNotification<TOptions>
7 | {
8 | public MessageReceivedNotification(IOwinContext context, TOptions options)
9 | : base(context, options)
10 | {
11 | }
12 |
13 | public TMessage ProtocolMessage { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Notifications/NotificationResultState.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Notifications
5 | {
6 | public enum NotificationResultState
7 | {
8 | /// <summary>
9 | /// Continue with normal processing.
10 | /// </summary>
11 | Continue,
12 |
13 | /// <summary>
14 | /// Discontinue processing the request in the current middleware and pass control to the next one.
15 | /// </summary>
16 | Skipped,
17 |
18 | /// <summary>
19 | /// Discontinue all processing for this request.
20 | /// </summary>
21 | HandledResponse,
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Notifications/SecurityTokenReceivedNotification.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Notifications
5 | {
6 | public class SecurityTokenReceivedNotification<TMessage, TOptions> : BaseNotification<TOptions>
7 | {
8 | public SecurityTokenReceivedNotification(IOwinContext context, TOptions options)
9 | : base(context, options)
10 | {
11 | }
12 |
13 | public TMessage ProtocolMessage { get; set; }
14 | }
15 | }
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Notifications/SecurityTokenValidatedNotification.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Notifications
5 | {
6 | public class SecurityTokenValidatedNotification<TMessage, TOptions> : BaseNotification<TOptions>
7 | {
8 | public SecurityTokenValidatedNotification(IOwinContext context, TOptions options)
9 | : base(context, options)
10 | {
11 | }
12 |
13 | /// <summary>
14 | /// Gets or set the <see cref="AuthenticationTicket"/>
15 | /// </summary>
16 | public AuthenticationTicket AuthenticationTicket { get; set; }
17 |
18 | /// <summary>
19 | /// Gets or sets the Protocol message
20 | /// </summary>
21 | public TMessage ProtocolMessage { get; set; }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Provider/BaseContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Provider
5 | {
6 | public abstract class BaseContext
7 | {
8 | protected BaseContext(IOwinContext context)
9 | {
10 | OwinContext = context;
11 | }
12 |
13 | public IOwinContext OwinContext { get; private set; }
14 |
15 | public IOwinRequest Request
16 | {
17 | get { return OwinContext.Request; }
18 | }
19 |
20 | public IOwinResponse Response
21 | {
22 | get { return OwinContext.Response; }
23 | }
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Provider/BaseContext`1.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Provider
5 | {
6 | /// <summary>
7 | /// Base class used for certain event contexts
8 | /// </summary>
9 | public abstract class BaseContext<TOptions>
10 | {
11 | protected BaseContext(IOwinContext context, TOptions options)
12 | {
13 | OwinContext = context;
14 | Options = options;
15 | }
16 |
17 | public IOwinContext OwinContext { get; private set; }
18 |
19 | public TOptions Options { get; private set; }
20 |
21 | public IOwinRequest Request
22 | {
23 | get { return OwinContext.Request; }
24 | }
25 |
26 | public IOwinResponse Response
27 | {
28 | get { return OwinContext.Response; }
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/Provider/EndpointContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security.Provider
5 | {
6 | public abstract class EndpointContext : BaseContext
7 | {
8 | protected EndpointContext(IOwinContext context)
9 | : base(context)
10 | {
11 | }
12 |
13 | public bool IsRequestCompleted { get; private set; }
14 |
15 | public void RequestCompleted()
16 | {
17 | IsRequestCompleted = true;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Security/SubjectPublicKeyInfoAlgorithm.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Security
5 | {
6 | /// <summary>
7 | /// The algorithm used to generate the subject public key information blob hashes.
8 | /// </summary>
9 | public enum SubjectPublicKeyInfoAlgorithm
10 | {
11 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Sha", Justification = "It is correct.")] Sha1,
12 | [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Sha", Justification = "It is correct.")] Sha256
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.SelfHost/README.md:
--------------------------------------------------------------------------------
1 | # Getting started with Microsoft OWIN self-host libraries:
2 |
3 | This package contains libraries for hosting OWIN compatible HTTP components in your own process.
4 |
5 | An example Startup class is included below. The Startup class can be called from your application as follows:
6 |
7 | ```c#
8 | using (WebApp.Start<Startup>("http://localhost:12345"))
9 | {
10 | Console.ReadLine();
11 | }
12 |
13 | public class Startup
14 | {
15 | public void Configuration(IAppBuilder app)
16 | {
17 | #if DEBUG
18 | app.UseErrorPage();
19 | #endif
20 | app.UseWelcomePage("/");
21 | }
22 | }
23 | ```
24 |
25 | For additional information see:
26 | https://github.com/aspnet/aspnetkatana
27 | http://www.owin.org/
--------------------------------------------------------------------------------
/src/Microsoft.Owin.StaticFiles/ContentTypes/IContentTypeProvider.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.StaticFiles.ContentTypes
5 | {
6 | /// <summary>
7 | /// Used to look up MIME types given a file path
8 | /// </summary>
9 | public interface IContentTypeProvider
10 | {
11 | /// <summary>
12 | /// Given a file path, determine the MIME type
13 | /// </summary>
14 | /// <param name="subpath">A file path</param>
15 | /// <param name="contentType">The resulting MIME type</param>
16 | /// <returns>True if MIME type could be determined</returns>
17 | bool TryGetContentType(string subpath, out string contentType);
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.StaticFiles/CustomDictionary.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <Dictionary>
3 | <Words>
4 | <Recognized>
5 | <Word>Owin</Word>
6 | </Recognized>
7 | </Words>
8 | </Dictionary>
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.StaticFiles/DirectoryFormatters/IDirectoryFormatter.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 | using System.Threading.Tasks;
6 | using Microsoft.Owin.FileSystems;
7 |
8 | namespace Microsoft.Owin.StaticFiles.DirectoryFormatters
9 | {
10 | /// <summary>
11 | /// Generates the view for a directory
12 | /// </summary>
13 | public interface IDirectoryFormatter
14 | {
15 | /// <summary>
16 | /// Generates the view for a directory.
17 | /// Implementers should properly handle HEAD requests.
18 | /// Implementers should set all necessary response headers (e.g. Content-Type, Content-Length, etc.).
19 | /// </summary>
20 | Task GenerateContentAsync(IOwinContext context, IEnumerable<IFileInfo> contents);
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.StaticFiles/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | // This file is used by Code Analysis to maintain SuppressMessage
5 | // attributes that are applied to this project.
6 | // Project-level suppressions either have no target or are given
7 | // a specific target and scoped to a namespace, type, member, etc.
8 | //
9 | // To add a suppression to this file, right-click the message in the
10 | // Code Analysis results, point to "Suppress Message", and click
11 | // "In Suppression File".
12 | // You do not need to add suppressions to this file manually.
13 |
14 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1703:ResourceStringsShouldBeSpelledCorrectly", MessageId = "sendfile", Scope = "resource", Target = "Microsoft.Owin.StaticFiles.Resources.resources", Justification = "Standard key name.")]
15 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.StaticFiles/Microsoft.Owin.StaticFiles.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.StaticFiles</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>This package contains OWIN middleware that handle requests for file system resources including files and directories.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
10 | </ItemGroup>
11 | <ItemGroup>
12 | <ProjectReference Include="..\Microsoft.Owin.FileSystems\Microsoft.Owin.FileSystems.csproj" />
13 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
14 | </ItemGroup>
15 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.StaticFiles/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.StaticFiles/StaticFileResponseContext.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Microsoft.Owin.FileSystems;
6 |
7 | namespace Microsoft.Owin.StaticFiles
8 | {
9 | /// <summary>
10 | /// Contains information about the request and the file that will be served in response.
11 | /// </summary>
12 | public class StaticFileResponseContext
13 | {
14 | /// <summary>
15 | /// The request and response information.
16 | /// </summary>
17 | public IOwinContext OwinContext { get; internal set; }
18 |
19 | /// <summary>
20 | /// The file to be served.
21 | /// </summary>
22 | public IFileInfo File { get; internal set; }
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Testing/CustomDictionary.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <Dictionary>
3 | <Words>
4 | <Recognized>
5 | <Word>Owin</Word>
6 | </Recognized>
7 | </Words>
8 | </Dictionary>
9 |
10 |
11 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Testing/Microsoft.Owin.Testing.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Testing</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Provides helper classes for unit testing OWIN components.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
10 | </ItemGroup>
11 | <ItemGroup>
12 | <ProjectReference Include="..\Microsoft.Owin.Hosting\Microsoft.Owin.Hosting.csproj" />
13 | <ProjectReference Include="..\Microsoft.Owin\Microsoft.Owin.csproj" />
14 | </ItemGroup>
15 | <ItemGroup>
16 | <Reference Include="System.Net.Http" />
17 | </ItemGroup>
18 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin.Testing/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Builder/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Builder
5 | {
6 | internal static class Constants
7 | {
8 | internal const string BuilderAddConversion = "builder.AddSignatureConversion";
9 | internal const string BuilderDefaultApp = "builder.DefaultApp";
10 |
11 | internal const string Invoke = "Invoke";
12 | internal const string Initialize = "Initialize";
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Builder/NotFound.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 | using System.Threading.Tasks;
6 |
7 | namespace Microsoft.Owin.Builder
8 | {
9 | /// <summary>
10 | /// Simple object used by AppBuilder as seed OWIN callable if the
11 | /// builder.Properties["builder.DefaultApp"] is not set
12 | /// </summary>
13 | internal class NotFound
14 | {
15 | private static readonly Task Completed = CreateCompletedTask();
16 |
17 | private static Task CreateCompletedTask()
18 | {
19 | var tcs = new TaskCompletionSource<object>();
20 | tcs.SetResult(null);
21 | return tcs.Task;
22 | }
23 |
24 | public Task Invoke(IDictionary<string, object> env)
25 | {
26 | env["owin.ResponseStatusCode"] = 404;
27 | return Completed;
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/BuilderProperties/AppProperties.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/src/Microsoft.Owin/BuilderProperties/AppProperties.cs
--------------------------------------------------------------------------------
/src/Microsoft.Owin/CookieOptions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/src/Microsoft.Owin/CookieOptions.cs
--------------------------------------------------------------------------------
/src/Microsoft.Owin/FormCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 |
6 | namespace Microsoft.Owin
7 | {
8 | /// <summary>
9 | /// Contains the parsed form values.
10 | /// </summary>
11 | public class FormCollection : ReadableStringCollection, IFormCollection
12 | {
13 | /// <summary>
14 | /// Initializes a new instance of the <see cref="T:Microsoft.Owin.FormCollection" /> class.
15 | /// </summary>
16 | /// <param name="store">The store for the form.</param>
17 | public FormCollection(IDictionary<string, string[]> store)
18 | : base(store)
19 | {
20 | }
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1724:TypeNamesShouldNotMatchNamespaces", Scope = "type", Target = "Microsoft.Owin.Builder.AppBuilder", Justification = "By design")]
5 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1711:IdentifiersShouldNotHaveIncorrectSuffix", Scope = "type", Target = "Microsoft.Owin.ResponseCookieCollection", Justification = "It is a collection")]
6 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Helpers/WebHelpers.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin.Infrastructure;
5 |
6 | namespace Microsoft.Owin.Helpers
7 | {
8 | /// <summary>
9 | /// Provides helper methods for processing requests.
10 | /// </summary>
11 | public static class WebHelpers
12 | {
13 | /// <summary>
14 | /// Parses an HTTP form body.
15 | /// </summary>
16 | /// <param name="text">The HTTP form body to parse.</param>
17 | /// <returns>The <see cref="T:Microsoft.Owin.IFormCollection" /> object containing the parsed HTTP form body.</returns>
18 | public static IFormCollection ParseForm(string text)
19 | {
20 | return OwinHelpers.GetForm(text);
21 | }
22 | }
23 | }
--------------------------------------------------------------------------------
/src/Microsoft.Owin/IFormCollection.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin
5 | {
6 | /// <summary>
7 | /// Contains the parsed form values.
8 | /// </summary>
9 | public interface IFormCollection : IReadableStringCollection
10 | {
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Infrastructure/ISystemClock.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Infrastructure
7 | {
8 | /// <summary>
9 | /// Abstracts the system clock to facilitate testing.
10 | /// </summary>
11 | public interface ISystemClock
12 | {
13 | /// <summary>
14 | /// Retrieves the current system time in UTC.
15 | /// </summary>
16 | DateTimeOffset UtcNow { get; }
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Infrastructure/SystemClock.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Infrastructure
7 | {
8 | /// <summary>
9 | /// Provides access to the normal system clock.
10 | /// </summary>
11 | public class SystemClock : ISystemClock
12 | {
13 | /// <summary>
14 | /// Retrieves the current system time in UTC.
15 | /// </summary>
16 | public DateTimeOffset UtcNow
17 | {
18 | get
19 | {
20 | // the clock measures whole seconds only, to have integral expires_in results, and
21 | // because milliseconds do not round-trip serialization formats
22 | DateTimeOffset utcNow = DateTimeOffset.UtcNow;
23 | return utcNow.AddMilliseconds(-utcNow.Millisecond);
24 | }
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Logging/DiagnosticsLogger.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Diagnostics;
6 |
7 | namespace Microsoft.Owin.Logging
8 | {
9 | internal class DiagnosticsLogger : ILogger
10 | {
11 | private readonly TraceSource _traceSource;
12 |
13 | public DiagnosticsLogger(TraceSource traceSource)
14 | {
15 | _traceSource = traceSource;
16 | }
17 |
18 | public bool WriteCore(TraceEventType eventType, int eventId, object state, Exception exception, Func<object, Exception, string> formatter)
19 | {
20 | if (!_traceSource.Switch.ShouldTrace(eventType))
21 | {
22 | return false;
23 | }
24 | else if (formatter != null)
25 | {
26 | _traceSource.TraceEvent(eventType, eventId, formatter(state, exception));
27 | }
28 | return true;
29 | }
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Logging/ILoggerFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Logging
5 | {
6 | /// <summary>
7 | /// Used to create logger instances of the given name.
8 | /// </summary>
9 | public interface ILoggerFactory
10 | {
11 | /// <summary>
12 | /// Creates a new ILogger instance of the given name.
13 | /// </summary>
14 | /// <param name="name"></param>
15 | /// <returns></returns>
16 | ILogger Create(string name);
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Logging/LoggerFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Microsoft.Owin.Logging
5 | {
6 | /// <summary>
7 | /// Provides a default ILoggerFactory.
8 | /// </summary>
9 | public static class LoggerFactory
10 | {
11 | static LoggerFactory()
12 | {
13 | Default = new DiagnosticsLoggerFactory();
14 | }
15 |
16 | /// <summary>
17 | /// Provides a default ILoggerFactory based on System.Diagnostics.TraceSorce.
18 | /// </summary>
19 | public static ILoggerFactory Default { get; set; }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Mapping/MapOptions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading.Tasks;
7 |
8 | namespace Microsoft.Owin.Mapping
9 | {
10 | using AppFunc = Func<IDictionary<string, object>, Task>;
11 |
12 | /// <summary>
13 | /// Options for the Map middleware
14 | /// </summary>
15 | public class MapOptions
16 | {
17 | /// <summary>
18 | /// The path to match
19 | /// </summary>
20 | public PathString PathMatch { get; set; }
21 |
22 | /// <summary>
23 | /// The branch taken for a positive match
24 | /// </summary>
25 | public AppFunc Branch { get; set; }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Microsoft.Owin.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <description>Provides a set of helper types and abstractions for simplifying the creation of OWIN components.</description>
7 | </PropertyGroup>
8 | <ItemGroup>
9 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
10 | </ItemGroup>
11 | </Project>
--------------------------------------------------------------------------------
/src/Microsoft.Owin/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Microsoft.Owin/SameSiteMode.cs:
--------------------------------------------------------------------------------
1 | namespace Microsoft.Owin
2 | {
3 | /// <summary>
4 | /// Indicates if the client should include a cookie on "same-site" or "cross-site" requests.
5 | /// </summary>
6 | public enum SameSiteMode
7 | {
8 | /// <summary>
9 | /// Indicates the client should send the cookie with every requests coming from any origin.
10 | /// </summary>
11 | None = 0,
12 | /// <summary>
13 | /// Indicates the client should send the cookie with "same-site" requests, and with "cross-site" top-level navigations.
14 | /// </summary>
15 | Lax,
16 | /// <summary>
17 | /// Indicates the client should only send the cookie with "same-site" requests.
18 | /// </summary>
19 | Strict
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/src/Owin.Loader/Constants.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace Owin.Loader
5 | {
6 | internal static class Constants
7 | {
8 | internal const string OwinStartupAttribute = "OwinStartupAttribute";
9 | internal const string StartupType = "StartupType";
10 | internal const string FriendlyName = "FriendlyName";
11 | internal const string MethodName = "MethodName";
12 |
13 | internal const string Startup = "Startup";
14 | internal const string Configuration = "Configuration";
15 |
16 | internal const string HostAppName = "host.AppName";
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/src/Owin.Loader/CopyResources.bat:
--------------------------------------------------------------------------------
1 | rem The loder code is shared between projects, but the resource files cannot be due to msbuild constraints.
2 | rem To add or edit resources, do so in Owin.Loader, run this script to copy the resx file,
3 | rem and then touch the resx files in the destination projects so they regenerate the designer files.
4 | rem In the future fix this by moving loader into a shared assembly.
5 | copy LoaderResources.resx ..\Microsoft.Owin.Hosting\App_Packages\Owin.Loader\LoaderResources.resx
6 | copy LoaderResources.resx ..\Microsoft.Owin.Host.SystemWeb\App_Packages\Owin.Loader\LoaderResources.resx
7 | pause
--------------------------------------------------------------------------------
/src/Owin.Loader/Owin.Loader.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Owin.Loader</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTargetFramework)</TargetFramework>
6 | <IsShipping>false</IsShipping>
7 | <IsPackable>false</IsPackable>
8 | </PropertyGroup>
9 | <ItemGroup>
10 | <PackageReference Include="Owin" Version="$(OwinVersion)" />
11 | <InternalsVisibleTo Include="Owin.Loader.Tests" />
12 | </ItemGroup>
13 | </Project>
--------------------------------------------------------------------------------
/src/OwinHost/App.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0"?>
2 | <configuration>
3 | <runtime>
4 | <gcServer enabled="true"/>
5 | </runtime>
6 | <startup>
7 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
8 | </startup>
9 | </configuration>
10 |
--------------------------------------------------------------------------------
/src/OwinHost/Package/tools/OwinHost.exe.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <configuration>
3 | <runtime>
4 | <gcServer enabled="true"/>
5 | </runtime>
6 | <startup>
7 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/>
8 | </startup>
9 | </configuration>
10 |
--------------------------------------------------------------------------------
/src/OwinHost/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | [assembly: CLSCompliant(true)]
7 |
--------------------------------------------------------------------------------
/src/Tools/CertificateInstaller/CertInstaller/App.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0"?>
2 | <configuration>
3 | <system.diagnostics>
4 | <trace autoflush="true" indentsize="2">
5 | <listeners>
6 | <add name="ConsoleListener" type="System.Diagnostics.ConsoleTraceListener"/>
7 | <!--<add name="FileListener" type="System.Diagnostics.TextWriterTraceListener" initializeData="CertInstaller.Trace.log" />-->
8 | </listeners>
9 | </trace>
10 | </system.diagnostics>
11 | <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5"/></startup></configuration>
12 |
--------------------------------------------------------------------------------
/src/Tools/CertificateInstaller/CertInstaller/CertInstaller.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Exe</OutputType>
4 | <RootNamespace>CertInstaller</RootNamespace>
5 | <TargetFramework>net4.5</TargetFramework>
6 | <ApplicationManifest>app.manifest</ApplicationManifest>
7 | <IsShipping>false</IsShipping>
8 | <IsPackable>false</IsPackable>
9 | </PropertyGroup>
10 | </Project>
--------------------------------------------------------------------------------
/src/Tools/CertificateInstaller/CertificateInstaller.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 11.00
3 | # Visual Studio 10
4 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CertInstaller", "CertInstaller\CertInstaller.csproj", "{558F65BE-E09D-4A9B-9DA8-C0983445726F}"
5 | EndProject
6 | Global
7 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
8 | Debug|Any CPU = Debug|Any CPU
9 | Release|Any CPU = Release|Any CPU
10 | EndGlobalSection
11 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
12 | {558F65BE-E09D-4A9B-9DA8-C0983445726F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
13 | {558F65BE-E09D-4A9B-9DA8-C0983445726F}.Debug|Any CPU.Build.0 = Debug|Any CPU
14 | {558F65BE-E09D-4A9B-9DA8-C0983445726F}.Release|Any CPU.ActiveCfg = Release|Any CPU
15 | {558F65BE-E09D-4A9B-9DA8-C0983445726F}.Release|Any CPU.Build.0 = Release|Any CPU
16 | EndGlobalSection
17 | GlobalSection(SolutionProperties) = preSolution
18 | HideSolutionNode = FALSE
19 | EndGlobalSection
20 | EndGlobal
21 |
--------------------------------------------------------------------------------
/startvs.cmd:
--------------------------------------------------------------------------------
1 | @ECHO OFF
2 | SETLOCAL
3 |
4 | :: This command launches a Visual Studio solution with environment variables required to use a local version of the .NET Core SDK.
5 |
6 | :: This tells .NET Core to use the same dotnet.exe that build scripts use
7 | SET DOTNET_ROOT=%~dp0.dotnet
8 | SET DOTNET_ROOT(x86)=%~dp0.dotnet\x86
9 |
10 | :: This tells .NET Core not to go looking for .NET Core in other places
11 | SET DOTNET_MULTILEVEL_LOOKUP=0
12 |
13 | :: Put our local dotnet.exe on PATH first so Visual Studio knows which one to use
14 | SET PATH=%DOTNET_ROOT%;%PATH%
15 |
16 | SET sln=%~1
17 |
18 | IF "%sln%"=="" (
19 | echo Solution not specified, using katana.sln
20 | SET sln=%~dp0katana.sln
21 | )
22 |
23 | IF NOT EXIST "%DOTNET_ROOT%\dotnet.exe" (
24 | echo .NET Core has not yet been installed. Run `%~dp0restore.cmd` to install tools
25 | exit /b 1
26 | )
27 |
28 | start "" "%sln%"
29 |
--------------------------------------------------------------------------------
/test.cmd:
--------------------------------------------------------------------------------
1 | @echo off
2 | powershell -ExecutionPolicy ByPass -NoProfile -command "& """%~dp0eng\common\Build.ps1""" -test %*"
--------------------------------------------------------------------------------
/tests/Directory.Build.props:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <Project>
3 | <!-- Recurse up. -->
4 | <Import Project="$(MSBuildThisFileDirectory)..\Directory.Build.props" />
5 |
6 | <PropertyGroup>
7 | <IsTestProject>true</IsTestProject>
8 | </PropertyGroup>
9 | </Project>
--------------------------------------------------------------------------------
/tests/FunctionalTests/Common/HostType.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace FunctionalTests.Common
5 | {
6 | public enum HostType
7 | {
8 | HttpListener,
9 | IIS
10 | }
11 | }
--------------------------------------------------------------------------------
/tests/FunctionalTests/Facts/OwinHost/OwinStartupAttribute.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace FunctionalTests.Facts.OwinHost
7 | {
8 | [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = true)]
9 | public sealed class OwinStartupAttribute : Attribute
10 | {
11 | public OwinStartupAttribute(string friendlyName, Type startupType)
12 | {
13 | this._friendlyName = friendlyName;
14 | this._startupType = startupType;
15 | }
16 |
17 | private Type _startupType;
18 | public Type StartupType { get { return this._startupType; } }
19 |
20 | private string _friendlyName;
21 | public string FriendlyName { get { return this._friendlyName; } }
22 | }
23 | }
--------------------------------------------------------------------------------
/tests/FunctionalTests/Facts/Security/Common/CustomCertificateValidator.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Net;
5 | using System.Net.Security;
6 | using System.Security.Cryptography.X509Certificates;
7 | using Microsoft.Owin.Security;
8 |
9 | namespace FunctionalTests.Facts.Security.Common
10 | {
11 | public class CustomCertificateValidator : ICertificateValidator
12 | {
13 | public bool Validate(object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors)
14 | {
15 | var requestHeaders = ((HttpWebRequest)sender).Headers;
16 | if (requestHeaders["InvalidCert"] != null)
17 | {
18 | return !bool.Parse(requestHeaders["InvalidCert"]);
19 | }
20 | else
21 | {
22 | return true;
23 | }
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tests/FunctionalTests/OwinWebConfigTemplate.txt:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <configuration>
3 | <system.web>
4 | <compilation debug="true" targetFramework="4.5" />
5 | <httpRuntime targetFramework="4.5" />
6 | </system.web>
7 |
8 | <appSettings>
9 | <add key="owin:AutomaticAppStartup" value="true" />
10 | <add key="owin:AppStartup" value="" />
11 | </appSettings>
12 | </configuration>
--------------------------------------------------------------------------------
/tests/FunctionalTests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Xunit;
5 |
6 | [assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)]
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/BlockedFiles/TextFile.txt:
--------------------------------------------------------------------------------
1 | BlockedFiles\TextFile
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/BlockedFiles/clock$.txt:
--------------------------------------------------------------------------------
1 | BlockedFiles\clock$.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleAVI.avi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleAVI.avi
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleC.c:
--------------------------------------------------------------------------------
1 | #include <stdio.h>
2 | int main()
3 | {
4 | printf( "I am alive! Beware.\n" );
5 | getchar();
6 | return 0;
7 | }
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleCHM.CHM:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleCHM.CHM
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleCPP.cpp:
--------------------------------------------------------------------------------
1 | #include <stdio.h>
2 | int main()
3 | {
4 | printf( "I am alive! Beware.\n" );
5 | getchar();
6 | return 0;
7 | }
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleCSV.csv:
--------------------------------------------------------------------------------
1 | a,b,c
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleCUR.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleCUR.cur
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleDISCO.disco:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
3 | <contractRef ref="http://localhost/WcfService1/Service1.svc?wsdl" docRef="http://localhost/WcfService1/Service1.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
4 | </discovery>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleDOC.DOC:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleDOC.DOC
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleDOCX.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleDOCX.docx
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleHTM.htm:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | SampleHTM
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleHTML.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | SampleHTML
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleICO.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleICO.ico
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleJPEG.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleJPEG.jpg
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleJPG.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleJPG.jpg
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SampleJS.js:
--------------------------------------------------------------------------------
1 | intellisense.annotate(test, {
2 | 'func': function () {
3 | }
4 | });
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/SamplePNG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/ContentTypes/SamplePNG.png
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/ContentTypes/Unknown.Unknown:
--------------------------------------------------------------------------------
1 | ContentTypes\Unknown.Unknown
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Default.aspx:
--------------------------------------------------------------------------------
1 | <%@ Page Language="C#" %>
2 |
3 | <!DOCTYPE html>
4 |
5 | <html xmlns="http://www.w3.org/1999/xhtml">
6 | <head id="Head1" runat="server">
7 | <title>Asp.net Test page</title>
8 | </head>
9 | <body>
10 | <form id="form1" runat="server">
11 | <div>
12 |
13 | </div>
14 | </form>
15 | </body>
16 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir1/Default.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | Dir1\Default.html
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir1/EmptyFile.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/Dir1/EmptyFile.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir1/TextFile1.txt:
--------------------------------------------------------------------------------
1 | Dir1\Textfile1.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir1/Unknown.Unknown:
--------------------------------------------------------------------------------
1 | Dir1\Unknown.Unknown
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir2/TextFile2.txt:
--------------------------------------------------------------------------------
1 | Dir2\TextFile2.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir2/Unknown.Unknown:
--------------------------------------------------------------------------------
1 | Dir2\Unknown.Unknown
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir3/Dir31/TextFile311.txt:
--------------------------------------------------------------------------------
1 | Dir3\Dir31\TextFile311.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir3/Dir32/TextFile321.txt:
--------------------------------------------------------------------------------
1 | Dir3\Dir32\TextFile321.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir3/TextFile3.txt:
--------------------------------------------------------------------------------
1 | Dir3\TextFile3.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir3/TextFile4.txt:
--------------------------------------------------------------------------------
1 | Dir3\Textfile4.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Dir4/TextFile41.txt:
--------------------------------------------------------------------------------
1 | Dir4\TextFile41.txt
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleAVI.avi:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleAVI.avi
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleC.c:
--------------------------------------------------------------------------------
1 | #include <stdio.h>
2 | int main()
3 | {
4 | printf( "I am alive! Beware.\n" );
5 | getchar();
6 | return 0;
7 | }
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleCHM.CHM:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleCHM.CHM
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleCPP.cpp:
--------------------------------------------------------------------------------
1 | #include <stdio.h>
2 | int main()
3 | {
4 | printf( "I am alive! Beware.\n" );
5 | getchar();
6 | return 0;
7 | }
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleCSV.csv:
--------------------------------------------------------------------------------
1 | a,b,c
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleCUR.cur:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleCUR.cur
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleDISCO.disco:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <discovery xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/disco/">
3 | <contractRef ref="http://localhost/WcfService1/Service1.svc?wsdl" docRef="http://localhost/WcfService1/Service1.svc" xmlns="http://schemas.xmlsoap.org/disco/scl/" />
4 | </discovery>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleDOC.DOC:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleDOC.DOC
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleDOCX.docx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleDOCX.docx
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleHTM.htm:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | SampleHTM
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleHTML.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | SampleHTML
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleICO.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleICO.ico
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleJPEG.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleJPEG.jpg
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleJPG.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SampleJPG.jpg
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SamplePNG.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/FunctionalTests/RequirementFiles/EmbeddedResources/SamplePNG.png
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/EmbeddedResources/Unknown.Unknown:
--------------------------------------------------------------------------------
1 | ContentTypes\Unknown.Unknown
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/IntegratedPipelineTest.aspx:
--------------------------------------------------------------------------------
1 | <%@ Page Language="C#" %>
2 | <%@ Import Namespace="System.Web" %>
3 | <!DOCTYPE html>
4 |
5 | <html xmlns="http://www.w3.org/1999/xhtml">
6 | <head id="Head1" runat="server">
7 | <title>IntegratedPipelineTest</title>
8 | <script runat="server">
9 | public string GetOwinPipelineOrder()
10 | {
11 | var stackItems = new List<int>(HttpContext.Current.GetOwinContext().Get<Stack<int>>("stack").ToArray());
12 | stackItems.Reverse();
13 | return string.Join<int>(";", stackItems.ToArray());
14 | }
15 | </script>
16 | </head>
17 | <body>
18 | <form id="form1" runat="server">
19 | <%= GetOwinPipelineOrder() %>
20 | </form>
21 | </body>
22 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Templates/Login.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
3 | <head>
4 | <meta charset="utf-8" />
5 | <title>Login page</title>
6 | </head>
7 | <body>
8 | <form method="post">
9 | UserName: <input type="text" name="userName" /><br />
10 | Password: <input type="password" name="password" /><br />
11 | <input type="submit" name="submit" />
12 | </form>
13 | </body>
14 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Templates/Logout.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 |
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/FunctionalTests/RequirementFiles/Templates/MainPage.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | Welcome to my application<br />
10 | Application Type : {AppType} <br />
11 | User : {UserName} <br />
12 | Administrator : {IsAdmin} <br />
13 | <a href="Templates\Logout.html">Logout</a>
14 | </body>
15 | </html>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Cors.Tests/Microsoft.Owin.Cors.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Cors.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <ProjectReference Include="..\..\src\Microsoft.Owin.Cors\Microsoft.Owin.Cors.csproj" />
9 | <ProjectReference Include="..\..\src\Microsoft.Owin\Microsoft.Owin.csproj" />
10 | </ItemGroup>
11 | </Project>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.FileSystems.Tests/File.txt:
--------------------------------------------------------------------------------
1 | Hello
2 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.FileSystems.Tests/Microsoft.Owin.FileSystems.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.FileSystems.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <PackageReference Include="Shouldly" Version="$(ShouldlyVersion)" />
9 | </ItemGroup>
10 | <ItemGroup>
11 | <ProjectReference Include="..\..\src\Microsoft.Owin.FileSystems\Microsoft.Owin.FileSystems.csproj" />
12 | </ItemGroup>
13 | <ItemGroup>
14 | <Content Include="File.txt">
15 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16 | </Content>
17 | <EmbeddedResource Include="Resources\ResourcesInSubdirectory\File3.txt" />
18 | <EmbeddedResource Include="Resources\File.txt" />
19 | <Content Include="sub\File2.txt">
20 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
21 | </Content>
22 | </ItemGroup>
23 | </Project>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.FileSystems.Tests/Resources/File.txt:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.FileSystems.Tests/Resources/ResourcesInSubdirectory/File3.txt:
--------------------------------------------------------------------------------
1 | Hello3
2 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.FileSystems.Tests/sub/File2.txt:
--------------------------------------------------------------------------------
1 | Hello2
2 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.HttpListener.Tests/HttpsServerTestCertificate.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/Microsoft.Owin.Host.HttpListener.Tests/HttpsServerTestCertificate.pfx
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.HttpListener.Tests/Microsoft.Owin.Host.HttpListener.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Host.HttpListener.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <ProjectReference Include="..\..\src\Microsoft.Owin.Host.HttpListener\Microsoft.Owin.Host.HttpListener.csproj" />
9 | </ItemGroup>
10 | <ItemGroup>
11 | <Reference Include="System.Net.Http.WebRequest" />
12 | </ItemGroup>
13 | </Project>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.HttpListener.Tests/Properties/AssemblyInfo.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Xunit;
5 |
6 | [assembly: CollectionBehavior(CollectionBehavior.CollectionPerAssembly)]
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.HttpListener.Tests/SetVariables.bat:
--------------------------------------------------------------------------------
1 | echo ------ Set required variables
2 | set HttpServer_HttpPort=8080
3 | set HttpServer_HttpsPort=9090
4 | set HttpServer_HttpsCertFileName=HttpsServerTestCertificate.pfx
5 | rem [SuppressMessage("Microsoft.Security", "CS002:SecretInNextLine", Justification="Unit test dummy credentials.")]
6 | set HttpServer_HttpsCertFilePassword=katana
7 | set HttpServer_CertHash=c7306ce743cf189e984cf804eb1d14fb62bd4f4e
8 | rem If this file is not executed from a BVT console, assume msbuild.exe is in the path (i.e. SDK console)
9 | if "%DD_NdpInstallPath%"=="" (set HttpServer_MsBuildPath=msbuild.exe) else (set HttpServer_MsBuildPath=%DD_NdpInstallPath%\msbuild.exe)
10 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.HttpListener.Tests/packages.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <packages>
3 | <package id="Owin" version="1.0" targetFramework="net45" />
4 | <package id="xunit" version="1.9.2" targetFramework="net45" />
5 | <package id="xunit.extensions" version="1.9.2" targetFramework="net45" />
6 | <package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net45" />
7 | </packages>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.IntegrationTests/Content/TextFile.txt:
--------------------------------------------------------------------------------
1 | This is TextFile.txt.
2 | It has some random content, but nothing interesting.
3 | If you're reading this, I have to wonder why.
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.IntegrationTests/DictionaryExtensions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace System.Collections.Generic
5 | {
6 | internal static class DictionaryExtensions
7 | {
8 | internal static T Get<T>(this IDictionary<string, object> dictionary, string key, T fallback = default(T))
9 | {
10 | object value;
11 | return dictionary.TryGetValue(key, out value) ? (T)value : fallback;
12 | }
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.IntegrationTests/SelfSignedClientCert.pfx:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/Microsoft.Owin.Host.IntegrationTests/SelfSignedClientCert.pfx
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.IntegrationTests/web.config:
--------------------------------------------------------------------------------
1 | <configuration>
2 | <appSettings>
3 | <add key="owin:AutomaticAppStartup" value="true"/>
4 | <add key="owin:AppStartup" value="TheApplicationName"/>
5 | </appSettings>
6 | <system.web>
7 | <httpRuntime targetFramework="4.5"></httpRuntime>
8 | </system.web>
9 | <system.webServer>
10 | <modules runAllManagedModulesForAllRequests="true" />
11 | </system.webServer>
12 | </configuration>
13 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.IntegrationTests/web.routetable.config:
--------------------------------------------------------------------------------
1 | <configuration>
2 | <appSettings>
3 | <add key="owin:AutomaticAppStartup" value="true"/>
4 | <add key="owin:AppStartup" value="TheApplicationName"/>
5 | </appSettings>
6 | <system.web>
7 | <httpRuntime targetFramework="4.5"></httpRuntime>
8 | </system.web>
9 | </configuration>
10 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.SystemWeb.Tests/DictionaryExtensions.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | namespace System.Collections.Generic
5 | {
6 | internal static class DictionaryExtensions
7 | {
8 | internal static T Get<T>(this IDictionary<string, object> dictionary, string key)
9 | {
10 | object value;
11 | return dictionary.TryGetValue(key, out value) ? (T)value : default(T);
12 | }
13 |
14 | internal static T Get<T>(this IDictionary<string, object> dictionary, string subDictionaryKey, string key)
15 | {
16 | var subDictionary = dictionary.Get<IDictionary<string, object>>(subDictionaryKey);
17 | if (subDictionary == null)
18 | {
19 | return default(T);
20 | }
21 |
22 | object value;
23 | return dictionary.TryGetValue(key, out value) ? (T)value : default(T);
24 | }
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.SystemWeb.Tests/FakeN/FakeHttpContextEx.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 |
6 | namespace Microsoft.Owin.Host.SystemWeb.Tests.FakeN
7 | {
8 | public class FakeHttpContextEx : FakeHttpContext
9 | {
10 | public FakeHttpContextEx()
11 | : this(new FakeHttpRequestEx(), new FakeHttpResponseEx())
12 | {
13 | }
14 |
15 | public FakeHttpContextEx(FakeHttpRequestEx request, FakeHttpResponseEx response)
16 | : base(request, response)
17 | {
18 | }
19 |
20 | public override bool IsDebuggingEnabled
21 | {
22 | get { return true; }
23 | }
24 |
25 | public override bool IsWebSocketRequest
26 | {
27 | get { return true; }
28 | }
29 |
30 | public override object GetService(Type serviceType)
31 | {
32 | return null;
33 | }
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.SystemWeb.Tests/FakeN/FakeHttpResponse.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Specialized;
5 | using System.Web;
6 |
7 | namespace Microsoft.Owin.Host.SystemWeb.Tests.FakeN
8 | {
9 |
10 | public class FakeHttpResponse : HttpResponseBase
11 | {
12 | private readonly NameValueCollection _headers = new();
13 |
14 | public override NameValueCollection Headers => _headers;
15 |
16 | public override bool TrySkipIisCustomErrors { get => false; set { } }
17 |
18 | public override string StatusDescription { get; set; }
19 | }
20 | }
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.SystemWeb.Tests/FakeN/FakeHttpResponseEx.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.IO;
5 | using System.Threading;
6 |
7 | namespace Microsoft.Owin.Host.SystemWeb.Tests.FakeN
8 | {
9 | public class FakeHttpResponseEx : FakeHttpResponse
10 | {
11 | private readonly Stream _outputStream = Stream.Null;
12 | private int _status;
13 |
14 | public override int StatusCode
15 | {
16 | get { return _status; }
17 | set { _status = value; }
18 | }
19 |
20 | public override Stream OutputStream
21 | {
22 | get { return _outputStream; }
23 | }
24 |
25 | public override CancellationToken ClientDisconnectedToken
26 | {
27 | get { return CancellationToken.None; }
28 | }
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Host.SystemWeb.Tests/Microsoft.Owin.Host.SystemWeb.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Host.SystemWeb.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <PackageReference Include="Shouldly" Version="$(ShouldlyVersion)" />
9 | </ItemGroup>
10 | <ItemGroup>
11 | <ProjectReference Include="..\..\src\Microsoft.Owin.Host.SystemWeb\Microsoft.Owin.Host.SystemWeb.csproj" />
12 | </ItemGroup>
13 | <ItemGroup>
14 | <Reference Include="System.Configuration" />
15 | <Reference Include="System.Web" />
16 | </ItemGroup>
17 | </Project>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/App.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 | <configuration>
3 | <appSettings>
4 | <add key="UpperCase" value="UpperCaseValue"/>
5 | </appSettings>
6 | </configuration>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/Containers/DefaultServicesTests.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Microsoft.Owin.Hosting.Loader;
6 | using Microsoft.Owin.Hosting.Services;
7 |
8 | namespace Microsoft.Owin.Hosting.Tests.Containers
9 | {
10 | public class DefaultServicesTests : ContainerTestsBase
11 | {
12 | public override Func<Type, object> CreateContainer()
13 | {
14 | IServiceProvider services = ServicesFactory.Create(reg => reg
15 | .Add<IAppLoaderFactory, TestAppLoader1>()
16 | .Add<IAppLoaderFactory, TestAppLoader2>());
17 | return services.GetService;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/Containers/ReplaceDefaultServiceWithTextFileTests.txt:
--------------------------------------------------------------------------------
1 |
2 | # using a custom hosting starter factory
3 | Microsoft.Owin.Hosting.Starter.IHostingStarterFactory = Microsoft.Owin.Hosting.Tests.Containers.ReplaceDefaultServiceWithTextFileTests+CustomStarterFactory, Microsoft.Owin.Hosting.Tests
4 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/ServerFactories/InstanceServerFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading.Tasks;
7 |
8 | namespace Microsoft.Owin.Hosting.Tests
9 | {
10 | using AppFunc = Func<IDictionary<string, object>, Task>;
11 |
12 | // Used for the DefaultServerFactoryLoaderTests discovery
13 | public class InstanceServerFactory
14 | {
15 | public void Create(AppFunc appFunc, IDictionary<string, object> properties)
16 | {
17 | properties["create.server"] = GetType().FullName;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/ServerFactories/OwinServerFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading.Tasks;
7 |
8 | namespace Microsoft.Owin.Hosting.Tests
9 | {
10 | using AppFunc = Func<IDictionary<string, object>, Task>;
11 |
12 | // Used to test the ServerFactoryLoader auto-discovery
13 | public class OwinServerFactory
14 | {
15 | public void Create(AppFunc appFunc, IDictionary<string, object> properties)
16 | {
17 | properties["create.server"] = GetType().FullName;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/ServerFactories/StaticServerFactory.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Collections.Generic;
6 | using System.Threading.Tasks;
7 |
8 | namespace Microsoft.Owin.Hosting.Tests
9 | {
10 | using AppFunc = Func<IDictionary<string, object>, Task>;
11 |
12 | // Used for the DefaultServerFactoryLoaderTests discovery
13 | public static class StaticServerFactory
14 | {
15 | public static void Create(AppFunc appFunc, IDictionary<string, object> properties)
16 | {
17 | properties["create.server"] = typeof(StaticServerFactory).FullName;
18 | }
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/Settings.txt:
--------------------------------------------------------------------------------
1 |
2 | # ignore this comment line
3 | UpperCase = UpperCaseValue
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Hosting.Tests/TestHostingStarter.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Microsoft.Owin.Hosting.Engine;
6 | using Microsoft.Owin.Hosting.Starter;
7 | using Microsoft.Owin.Hosting.Tests;
8 |
9 | [assembly: HostingStarter(typeof(TestHostingStarter))]
10 |
11 | namespace Microsoft.Owin.Hosting.Tests
12 | {
13 | public class TestHostingStarter : IHostingStarter
14 | {
15 | private readonly IHostingEngine _engine;
16 |
17 | public TestHostingStarter(IHostingEngine engine)
18 | {
19 | _engine = engine;
20 | }
21 |
22 | public IDisposable Start(StartOptions options)
23 | {
24 | throw new NotImplementedException();
25 | }
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Security.Tests/GlobalSuppressions.cs:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/Microsoft.Owin.Security.Tests/GlobalSuppressions.cs
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Security.Tests/TestClock.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using Microsoft.Owin.Infrastructure;
6 |
7 | namespace Microsoft.Owin.Security.Tests
8 | {
9 | public class TestClock : ISystemClock
10 | {
11 | public TestClock()
12 | {
13 | UtcNow = new DateTimeOffset(2013, 6, 11, 12, 34, 56, 789, TimeSpan.Zero);
14 | }
15 |
16 | public DateTimeOffset UtcNow { get; set; }
17 |
18 | public void Add(TimeSpan timeSpan)
19 | {
20 | UtcNow = UtcNow + timeSpan;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Security.Tests/app.config:
--------------------------------------------------------------------------------
1 | <configuration>
2 | <system.diagnostics>
3 | <sources>
4 | <source name="Microsoft.Owin" switchValue="Verbose">
5 | <listeners>
6 | <add name="console" type="System.Diagnostics.ConsoleTraceListener" />
7 | </listeners>
8 | </source>
9 | </sources>
10 | </system.diagnostics>
11 | </configuration>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Security.Tests/katanatest.redmond.corp.microsoft.com.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/Microsoft.Owin.Security.Tests/katanatest.redmond.corp.microsoft.com.cer
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Security.Tests/selfSigned.cer:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/aspnet/AspNetKatana/922982c2b547cbe968649facf77f71a939a6b780/tests/Microsoft.Owin.Security.Tests/selfSigned.cer
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.StaticFiles.Tests/SubFolder/Default.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | Hello World
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.StaticFiles.Tests/SubFolder/Extra.xml:
--------------------------------------------------------------------------------
1 | <xml/>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.StaticFiles.Tests/SubFolder/Ranges.txt:
--------------------------------------------------------------------------------
1 | 0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.StaticFiles.Tests/SubFolder/你好/Default.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | Hello World
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.StaticFiles.Tests/SubFolder/你好/世界/Default.html:
--------------------------------------------------------------------------------
1 | <!DOCTYPE html>
2 |
3 | <html lang="en" xmlns="http://www.w3.org/1999/xhtml">
4 | <head>
5 | <meta charset="utf-8" />
6 | <title></title>
7 | </head>
8 | <body>
9 | Hello World
10 | </body>
11 | </html>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.StaticFiles.Tests/TestRootFile.xml:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8" ?>
2 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.StaticFiles.Tests/Utilities.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System;
5 | using System.Reflection;
6 | using Xunit;
7 |
8 | namespace Microsoft.Owin.StaticFiles.Tests
9 | {
10 | internal class Utilities
11 | {
12 | internal static void Throws<TException>(Action action) where TException : Exception
13 | {
14 | try
15 | {
16 | action();
17 | Assert.False(true, "No Exception");
18 | }
19 | catch (TargetInvocationException tex)
20 | {
21 | Assert.IsType<TException>(tex.InnerException);
22 | }
23 | catch (TException)
24 | {
25 | }
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Testing.Tests/Microsoft.Owin.Testing.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Testing.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <ProjectReference Include="..\..\src\Microsoft.Owin.Diagnostics\Microsoft.Owin.Diagnostics.csproj" />
9 | <ProjectReference Include="..\..\src\Microsoft.Owin.Testing\Microsoft.Owin.Testing.csproj" />
10 | </ItemGroup>
11 | <ItemGroup>
12 | <Reference Include="System.Net.Http" />
13 | </ItemGroup>
14 | </Project>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Testing.Tests/Startup.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using System.Collections.Generic;
5 | using System.Net.Http;
6 | using System.Threading.Tasks;
7 | using Owin;
8 |
9 | namespace Microsoft.Owin.Testing.Tests
10 | {
11 | public class Startup
12 | {
13 | public void Configuration(IAppBuilder app)
14 | {
15 | app.Run(context =>
16 | {
17 | return context.Response.WriteAsync("Startup.Configration");
18 | });
19 | }
20 | }
21 | }
22 |
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Testing.Tests/packages.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <packages>
3 | <package id="Owin" version="1.0" targetFramework="net45" />
4 | <package id="xunit" version="1.9.2" targetFramework="net45" />
5 | <package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net45" />
6 | </packages>
--------------------------------------------------------------------------------
/tests/Microsoft.Owin.Tests/Microsoft.Owin.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Microsoft.Owin.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <PackageReference Include="Shouldly" Version="$(ShouldlyVersion)" />
9 | </ItemGroup>
10 | <ItemGroup>
11 | <ProjectReference Include="..\..\src\Microsoft.Owin\Microsoft.Owin.csproj" />
12 | </ItemGroup>
13 | </Project>
--------------------------------------------------------------------------------
/tests/Owin.Loader.Tests/DoesNotFollowConvention.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Owin;
5 |
6 | namespace DifferentNamespace
7 | {
8 | public class DoesNotFollowConvention
9 | {
10 | public static int ConfigurationCalls;
11 | public static int AlternateConfigurationCalls;
12 |
13 | public static void Configuration(IAppBuilder builder)
14 | {
15 | ConfigurationCalls += 1;
16 | }
17 |
18 | public static void AlternateConfiguration(IAppBuilder builder)
19 | {
20 | AlternateConfigurationCalls += 1;
21 | }
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/tests/Owin.Loader.Tests/Owin.Loader.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>Owin.Loader.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <ProjectReference Include="..\..\src\Microsoft.Owin\Microsoft.Owin.csproj" />
9 | <ProjectReference Include="..\..\src\Owin.Loader\Owin.Loader.csproj" />
10 | </ItemGroup>
11 | </Project>
--------------------------------------------------------------------------------
/tests/Owin.Loader.Tests/Startup.cs:
--------------------------------------------------------------------------------
1 | // Copyright (c) .NET Foundation. All rights reserved.
2 | // Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
3 |
4 | using Microsoft.Owin;
5 | using Owin.Loader.Tests;
6 |
7 | [assembly: OwinStartup(typeof(Startup))]
8 | [assembly: OwinStartup("AFriendlyName", typeof(Startup))]
9 | [assembly: OwinStartup("AlternateConfiguration", typeof(Startup), "AlternateConfiguration")]
10 |
11 | namespace Owin.Loader.Tests
12 | {
13 | public class Startup
14 | {
15 | public static int ConfigurationCalls { get; set; }
16 | public static int AlternateConfigurationCalls { get; set; }
17 |
18 | public void Configuration(IAppBuilder builder)
19 | {
20 | ConfigurationCalls++;
21 | }
22 |
23 | public void AlternateConfiguration(IAppBuilder builder)
24 | {
25 | AlternateConfigurationCalls++;
26 | }
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/tests/Owin.Loader.Tests/packages.config:
--------------------------------------------------------------------------------
1 | <?xml version="1.0" encoding="utf-8"?>
2 | <packages>
3 | <package id="Owin" version="1.0" targetFramework="net45" />
4 | <package id="xunit" version="1.9.2" targetFramework="net45" />
5 | <package id="xunit.runner.visualstudio" version="2.1.0" targetFramework="net45" />
6 | </packages>
--------------------------------------------------------------------------------
/tests/OwinHost.Tests/Microsoft.Owin.Hosting.settings:
--------------------------------------------------------------------------------
1 | alpha=42
2 |
--------------------------------------------------------------------------------
/tests/OwinHost.Tests/OwinHost.Tests.csproj:
--------------------------------------------------------------------------------
1 | <Project Sdk="Microsoft.NET.Sdk">
2 | <PropertyGroup>
3 | <OutputType>Library</OutputType>
4 | <RootNamespace>OwinHost.Tests</RootNamespace>
5 | <TargetFramework>$(DefaultNetFxTestTargetFramework)</TargetFramework>
6 | </PropertyGroup>
7 | <ItemGroup>
8 | <PackageReference Include="Shouldly" Version="$(ShouldlyVersion)" />
9 | </ItemGroup>
10 | <ItemGroup>
11 | <ProjectReference Include="..\..\src\Microsoft.Owin\Microsoft.Owin.csproj" />
12 | <ProjectReference Include="..\..\src\OwinHost\OwinHost.csproj" />
13 | </ItemGroup>
14 | <ItemGroup>
15 | <None Update="Microsoft.Owin.Hosting.settings">
16 | <Generator></Generator>
17 | <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
18 | </None>
19 | </ItemGroup>
20 | </Project>
--------------------------------------------------------------------------------