Remove Microsoft.Owin.Security.Interop and Microsoft.AspNet.Identity.AspNetCoreCompat (#4479)

This commit is contained in:
Chris Ross 2018-12-07 09:59:36 -08:00 committed by GitHub
parent d570a71e9f
commit f1aacdbaa8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
21 changed files with 2 additions and 2296 deletions

View File

@ -77,11 +77,9 @@
<PackageArtifact Include="Microsoft.Extensions.Identity.Stores" Category="ship" />
<!-- Packages for internal use only. -->
<PackageArtifact Include="Microsoft.Owin.Security.Interop" Category="noship" />
<PackageArtifact Include="AspNetCoreRuntime.3.0.$(SharedFxArchitecture)" Category="noship" Condition=" '$(SharedFxRid)' == 'win-x64' OR '$(SharedFxRid)' == 'win-x86' " />
<PackageArtifact Include="Internal.AspNetCore.Universe.Lineup" Category="noship" />
<PackageArtifact Include="Internal.WebHostBuilderFactory.Sources" Category="noship" />
<PackageArtifact Include="Microsoft.AspNet.Identity.AspNetCoreCompat" Category="noship" />
<PackageArtifact Include="Microsoft.AspNetCore.Antiforgery" Category="noship" />
<PackageArtifact Include="Microsoft.AspNetCore.ApiAuthorization.IdentityServer" Category="noship" />
<PackageArtifact Include="Microsoft.AspNetCore.AspNetCoreModule" Category="noship" Condition=" '$(OS)' == 'Windows_NT' " />

View File

@ -29,8 +29,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Identi
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Identity.EntityFrameworkCore", "src\EF\Microsoft.AspNetCore.Identity.EntityFrameworkCore.csproj", "{4490894C-3572-4E63-86F1-EE5105CE8A06}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNet.Identity.AspNetCoreCompat", "src\AspNetCoreCompat\Microsoft.AspNet.Identity.AspNetCoreCompat.csproj", "{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Identity.Specification.Tests", "src\Specification.Tests\Microsoft.AspNetCore.Identity.Specification.Tests.csproj", "{5608E828-DD54-4E2A-B73C-FC22268BE797}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Extensions.Identity.Core", "src\Core\Microsoft.Extensions.Identity.Core.csproj", "{D5905D78-A32E-44B8-8F21-EDAEDC95D9B8}"
@ -246,30 +244,6 @@ Global
{4490894C-3572-4E63-86F1-EE5105CE8A06}.ReleaseNoWPF|x64.Build.0 = Release|Any CPU
{4490894C-3572-4E63-86F1-EE5105CE8A06}.ReleaseNoWPF|x86.ActiveCfg = Release|Any CPU
{4490894C-3572-4E63-86F1-EE5105CE8A06}.ReleaseNoWPF|x86.Build.0 = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|x64.ActiveCfg = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|x64.Build.0 = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|x86.ActiveCfg = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Debug|x86.Build.0 = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.DebugNoWPF|Any CPU.ActiveCfg = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.DebugNoWPF|Any CPU.Build.0 = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.DebugNoWPF|x64.ActiveCfg = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.DebugNoWPF|x64.Build.0 = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.DebugNoWPF|x86.ActiveCfg = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.DebugNoWPF|x86.Build.0 = Debug|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|Any CPU.Build.0 = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|x64.ActiveCfg = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|x64.Build.0 = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|x86.ActiveCfg = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.Release|x86.Build.0 = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.ReleaseNoWPF|Any CPU.ActiveCfg = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.ReleaseNoWPF|Any CPU.Build.0 = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.ReleaseNoWPF|x64.ActiveCfg = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.ReleaseNoWPF|x64.Build.0 = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.ReleaseNoWPF|x86.ActiveCfg = Release|Any CPU
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475}.ReleaseNoWPF|x86.Build.0 = Release|Any CPU
{5608E828-DD54-4E2A-B73C-FC22268BE797}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5608E828-DD54-4E2A-B73C-FC22268BE797}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5608E828-DD54-4E2A-B73C-FC22268BE797}.Debug|x64.ActiveCfg = Debug|Any CPU
@ -522,7 +496,6 @@ Global
{37236EA3-915D-46D5-997C-DF513C500E4B} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E}
{EA7EB28F-53B8-4009-9C6B-74DB090CA8DD} = {52D59F18-62D2-4D17-8CF2-BE192445AF8E}
{4490894C-3572-4E63-86F1-EE5105CE8A06} = {0F647068-6602-4E24-B1DC-8ED91481A50A}
{6A74C6EA-B241-4D6B-BCE4-BF89EC1D2475} = {0F647068-6602-4E24-B1DC-8ED91481A50A}
{5608E828-DD54-4E2A-B73C-FC22268BE797} = {0F647068-6602-4E24-B1DC-8ED91481A50A}
{D5905D78-A32E-44B8-8F21-EDAEDC95D9B8} = {0F647068-6602-4E24-B1DC-8ED91481A50A}
{FADA11FC-DC06-4832-A569-7B2374A6CD42} = {0F647068-6602-4E24-B1DC-8ED91481A50A}

View File

@ -1,21 +0,0 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.IO;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Owin.Security;
using Microsoft.Owin.Security.Interop;
namespace Owin
{
public static class CookieInterop
{
public static ISecureDataFormat<AuthenticationTicket> CreateSharedDataFormat(DirectoryInfo keyDirectory, string authenticationType)
{
var dataProtector = DataProtectionProvider.Create(keyDirectory)
.CreateProtector("Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationMiddleware", // full name of the ASP.NET 5 type
authenticationType, "v2");
return new AspNetTicketDataFormat(new DataProtectorShim(dataProtector));
}
}
}

View File

@ -1,140 +0,0 @@
// Copyright (c) Microsoft Corporation, Inc. All rights reserved.
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Data.Common;
using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using System.Data.Entity.Validation;
using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNet.Identity.CoreCompat
{
public class IdentityDbContext<TUser> :
IdentityDbContext<TUser, IdentityRole, string,
IdentityUserLogin, IdentityUserRole, IdentityUserClaim, IdentityRoleClaim>
where TUser : IdentityUser
{
public IdentityDbContext() : base()
{
}
public IdentityDbContext(DbCompiledModel model)
: base(model)
{
}
public IdentityDbContext(string nameOrConnectionString)
: base(nameOrConnectionString)
{
}
public IdentityDbContext(string nameOrConnectionString, DbCompiledModel model)
: base(nameOrConnectionString, model)
{
}
public IdentityDbContext(DbConnection existingConnection, bool contextOwnsConnection)
: base(existingConnection, contextOwnsConnection)
{
}
//
// Summary:
// Constructs a new context instance using the existing connection to connect to
// a database, and initializes it from the given model. The connection will not
// be disposed when the context is disposed if contextOwnsConnection is false.
//
// Parameters:
// existingConnection:
// An existing connection to use for the new context.
//
// model:
// The model that will back this context.
//
// contextOwnsConnection:
// Constructs a new context instance using the existing connection to connect to
// a database, and initializes it from the given model. The connection will not
// be disposed when the context is disposed if contextOwnsConnection is false.
public IdentityDbContext(DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection)
: base(existingConnection, model, contextOwnsConnection)
{
}
}
public class IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim, TRoleClaim> :
IdentityDbContext<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TRole : IdentityRole<TKey, TUserRole>
where TUserLogin : IdentityUserLogin<TKey>
where TUserRole : IdentityUserRole<TKey>
where TUserClaim : IdentityUserClaim<TKey>
where TRoleClaim : IdentityRoleClaim<TKey>
{
public IdentityDbContext() : base()
{
}
public IdentityDbContext(DbCompiledModel model)
: base(model)
{
}
public IdentityDbContext(string nameOrConnectionString)
: base(nameOrConnectionString)
{
}
public IdentityDbContext(string nameOrConnectionString, DbCompiledModel model)
: base(nameOrConnectionString, model)
{
}
public IdentityDbContext(DbConnection existingConnection, bool contextOwnsConnection)
: base(existingConnection, contextOwnsConnection)
{
}
public IdentityDbContext(DbConnection existingConnection, DbCompiledModel model, bool contextOwnsConnection)
: base(existingConnection, model, contextOwnsConnection)
{
}
protected override void OnModelCreating(DbModelBuilder modelBuilder)
{
base.OnModelCreating(modelBuilder);
var userModel = modelBuilder.Entity<TUser>();
userModel.Property(x => x.LockoutEndDateUtc).HasColumnName("LockoutEnd");
userModel.Property(x => x.ConcurrencyStamp).IsConcurrencyToken(true);
modelBuilder.Entity<TRoleClaim>()
.HasKey(x => x.Id)
.Map(config => config.ToTable("AspNetRoleClaims"));
modelBuilder.Entity<TRole>().Property(x => x.ConcurrencyStamp).IsConcurrencyToken(true);
}
protected override DbEntityValidationResult ValidateEntity(DbEntityEntry entityEntry, IDictionary<object, object> items)
{
if (entityEntry.Entity is TUser && entityEntry.State == EntityState.Modified)
{
entityEntry.Cast<TUser>().Property(p => p.ConcurrencyStamp).CurrentValue = Guid.NewGuid().ToString();
}
else if (entityEntry.Entity is TRole && entityEntry.State == EntityState.Modified)
{
entityEntry.Cast<TRole>().Property(p => p.ConcurrencyStamp).CurrentValue = Guid.NewGuid().ToString();
}
return base.ValidateEntity(entityEntry, items);
}
public virtual IDbSet<TRoleClaim> RoleClaims { get; set; }
}
}

View File

@ -1,50 +0,0 @@
// Copyright (c) Microsoft Corporation, Inc. All rights reserved.
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNet.Identity.CoreCompat
{
public class IdentityRole : IdentityRole<string, IdentityUserRole>
{
/// <summary>
/// Constructor
/// </summary>
public IdentityRole()
{
Id = Guid.NewGuid().ToString();
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="roleName"></param>
public IdentityRole(string roleName)
: this()
{
Name = roleName;
}
}
public class IdentityRole<TKey, TUserRole> : Microsoft.AspNet.Identity.EntityFramework.IdentityRole<TKey, TUserRole>
where TUserRole : IdentityUserRole<TKey>
{
/// <summary>
/// Normalized role name
/// </summary>
public virtual string NormalizedName { get; set; }
/// <summary>
/// Concurrency stamp
/// </summary>
public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString();
/// <summary>
/// Navigation property for claims in the role
/// </summary>
public virtual ICollection<IdentityRoleClaim<TKey>> Claims { get; } = new List<IdentityRoleClaim<TKey>>();
}
}

View File

@ -1,35 +0,0 @@
// Copyright (c) Microsoft Corporation, Inc. All rights reserved.
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Identity.CoreCompat
{
public class IdentityRoleClaim : IdentityRoleClaim<string> { }
/// <summary>
/// EntityType that represents one specific role claim
/// </summary>
/// <typeparam name="TKey"></typeparam>
public class IdentityRoleClaim<TKey>
{
/// <summary>
/// Primary key
/// </summary>
public virtual int Id { get; set; }
/// <summary>
/// User Id for the role this claim belongs to
/// </summary>
public virtual TKey RoleId { get; set; }
/// <summary>
/// Claim type
/// </summary>
public virtual string ClaimType { get; set; }
/// <summary>
/// Claim value
/// </summary>
public virtual string ClaimValue { get; set; }
}
}

View File

@ -1,62 +0,0 @@
// Copyright (c) Microsoft Corporation, Inc. All rights reserved.
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
using System;
using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNet.Identity.CoreCompat
{
public class IdentityUser : IdentityUser<string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>
{
/// <summary>
/// Constructor which creates a new Guid for the Id
/// </summary>
public IdentityUser()
{
Id = Guid.NewGuid().ToString();
}
/// <summary>
/// Constructor that takes a userName
/// </summary>
/// <param name="userName"></param>
public IdentityUser(string userName)
: this()
{
UserName = userName;
NormalizedUserName = userName.ToUpperInvariant();
}
}
public class IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
: Microsoft.AspNet.Identity.EntityFramework.IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TUserLogin : IdentityUserLogin<TKey>
where TUserRole : IdentityUserRole<TKey>
where TUserClaim : IdentityUserClaim<TKey>
{
public string NormalizedUserName {
get
{
return UserName.ToUpperInvariant();
}
set { }
}
/// <summary>
/// Normalized email
/// </summary>
public string NormalizedEmail {
get
{
return Email.ToUpperInvariant();
}
set { }
}
/// <summary>
/// Concurrency stamp
/// </summary>
public virtual string ConcurrencyStamp { get; set; } = Guid.NewGuid().ToString();
}
}

View File

@ -1,19 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.AspNet.Identity.CoreCompat
{
public class IdentityUserLogin : IdentityUserLogin<string> { }
/// <summary>
/// Represents a login and its associated provider for a user.
/// </summary>
/// <typeparam name="TKey">The type of the primary key of the user associated with this login.</typeparam>
public class IdentityUserLogin<TKey> : EntityFramework.IdentityUserLogin<TKey>
{
/// <summary>
/// Gets or sets the friendly name used in a UI for this login.
/// </summary>
public virtual string ProviderDisplayName { get; set; }
}
}

View File

@ -1,21 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>A compatibility layer for sharing identity databases between Microsoft.AspNet.Identity.EntityFramework and Microsoft.AspNetCore.Identity.EntityFrameworkCore.</Description>
<VersionPrefix Condition="'$(ExperimentalVersionPrefix)' != ''">$(ExperimentalVersionPrefix)</VersionPrefix>
<VersionSuffix Condition="'$(ExperimentalVersionSuffix)' != ''">$(ExperimentalVersionSuffix)</VersionSuffix>
<VerifyVersion Condition="'$(ExperimentalVersionPrefix)' != ''">false</VerifyVersion>
<PackageVersion Condition="'$(ExperimentalPackageVersion)' != ''">$(ExperimentalPackageVersion)</PackageVersion>
<TargetFramework>net461</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;identity;membership</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNet.Identity.EntityFramework" Version="$(MicrosoftAspNetIdentityEntityFrameworkPackageVersion)" />
<PackageReference Include="Microsoft.Owin.Security.Cookies" Version="$(MicrosoftOwinSecurityCookiesPackageVersion)" />
<PackageReference Include="Microsoft.Owin.Security.Interop" Version="$(MicrosoftOwinSecurityInteropPackageVersion)" />
</ItemGroup>
</Project>

View File

@ -1,50 +0,0 @@
// Copyright (c) Microsoft Corporation, Inc. All rights reserved.
// Licensed under the MIT License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Data.Entity;
using Microsoft.AspNet.Identity.EntityFramework;
namespace Microsoft.AspNet.Identity.CoreCompat
{
public class UserStore<TUser> :
UserStore<TUser, IdentityRole, string, IdentityUserLogin, IdentityUserRole, IdentityUserClaim>, IUserStore<TUser>
where TUser : IdentityUser
{
/// <summary>
/// Default constructor which uses a new instance of a default EntityDbContext.
/// </summary>
public UserStore()
: this(new IdentityDbContext<TUser>())
{
DisposeContext = true;
}
/// <summary>
/// Constructor
/// </summary>
/// <param name="context"></param>
public UserStore(DbContext context)
: base(context)
{
}
}
public class UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
: EntityFramework.UserStore<TUser, TRole, TKey, TUserLogin, TUserRole, TUserClaim>
where TKey : IEquatable<TKey>
where TUser : IdentityUser<TKey, TUserLogin, TUserRole, TUserClaim>
where TRole : IdentityRole<TKey, TUserRole>
where TUserLogin : IdentityUserLogin<TKey>, new()
where TUserRole : IdentityUserRole<TKey>, new()
where TUserClaim : IdentityUserClaim<TKey>, new()
{
/// <summary>
/// Constructor
/// </summary>
/// <param name="context"></param>
public UserStore(DbContext context) : base(context) { }
}
}

View File

@ -1,887 +0,0 @@
{
"AssemblyIdentity": "Microsoft.AspNet.Identity.AspNetCoreCompat, Version=0.4.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
"Types": [
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<T0>",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<T0, Microsoft.AspNet.Identity.CoreCompat.IdentityRole, System.String, Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin, Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole, Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim, Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "model",
"Type": "System.Data.Entity.Infrastructure.DbCompiledModel"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "nameOrConnectionString",
"Type": "System.String"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "nameOrConnectionString",
"Type": "System.String"
},
{
"Name": "model",
"Type": "System.Data.Entity.Infrastructure.DbCompiledModel"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "existingConnection",
"Type": "System.Data.Common.DbConnection"
},
{
"Name": "contextOwnsConnection",
"Type": "System.Boolean"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "existingConnection",
"Type": "System.Data.Common.DbConnection"
},
{
"Name": "model",
"Type": "System.Data.Entity.Infrastructure.DbCompiledModel"
},
{
"Name": "contextOwnsConnection",
"Type": "System.Boolean"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TUser",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityUser"
]
}
]
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityDbContext<T0, T1, T2, T3, T4, T5, T6>",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.EntityFramework.IdentityDbContext<T0, T1, T2, T3, T4, T5>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Method",
"Name": "OnModelCreating",
"Parameters": [
{
"Name": "modelBuilder",
"Type": "System.Data.Entity.DbModelBuilder"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Override": true,
"Visibility": "Protected",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "ValidateEntity",
"Parameters": [
{
"Name": "entityEntry",
"Type": "System.Data.Entity.Infrastructure.DbEntityEntry"
},
{
"Name": "items",
"Type": "System.Collections.Generic.IDictionary<System.Object, System.Object>"
}
],
"ReturnType": "System.Data.Entity.Validation.DbEntityValidationResult",
"Virtual": true,
"Override": true,
"Visibility": "Protected",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_RoleClaims",
"Parameters": [],
"ReturnType": "System.Data.Entity.IDbSet<T6>",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_RoleClaims",
"Parameters": [
{
"Name": "value",
"Type": "System.Data.Entity.IDbSet<T6>"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "model",
"Type": "System.Data.Entity.Infrastructure.DbCompiledModel"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "nameOrConnectionString",
"Type": "System.String"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "nameOrConnectionString",
"Type": "System.String"
},
{
"Name": "model",
"Type": "System.Data.Entity.Infrastructure.DbCompiledModel"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "existingConnection",
"Type": "System.Data.Common.DbConnection"
},
{
"Name": "contextOwnsConnection",
"Type": "System.Boolean"
}
],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "existingConnection",
"Type": "System.Data.Common.DbConnection"
},
{
"Name": "model",
"Type": "System.Data.Entity.Infrastructure.DbCompiledModel"
},
{
"Name": "contextOwnsConnection",
"Type": "System.Boolean"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TUser",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityUser<T2, T3, T4, T5>"
]
},
{
"ParameterName": "TRole",
"ParameterPosition": 1,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityRole<T2, T4>"
]
},
{
"ParameterName": "TKey",
"ParameterPosition": 2,
"BaseTypeOrInterfaces": []
},
{
"ParameterName": "TUserLogin",
"ParameterPosition": 3,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin<T2>"
]
},
{
"ParameterName": "TUserRole",
"ParameterPosition": 4,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<T2>"
]
},
{
"ParameterName": "TUserClaim",
"ParameterPosition": 5,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<T2>"
]
},
{
"ParameterName": "TRoleClaim",
"ParameterPosition": 6,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<T2>"
]
}
]
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityRole",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.CoreCompat.IdentityRole<System.String, Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "roleName",
"Type": "System.String"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityRole<T0, T1>",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.EntityFramework.IdentityRole<T0, T1>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Method",
"Name": "get_NormalizedName",
"Parameters": [],
"ReturnType": "System.String",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_NormalizedName",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_ConcurrencyStamp",
"Parameters": [],
"ReturnType": "System.String",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_ConcurrencyStamp",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_Claims",
"Parameters": [],
"ReturnType": "System.Collections.Generic.ICollection<Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<T0>>",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TKey",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": []
},
{
"ParameterName": "TUserRole",
"ParameterPosition": 1,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<T0>"
]
}
]
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<System.String>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityRoleClaim<T0>",
"Visibility": "Public",
"Kind": "Class",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Method",
"Name": "get_Id",
"Parameters": [],
"ReturnType": "System.Int32",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_Id",
"Parameters": [
{
"Name": "value",
"Type": "System.Int32"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_RoleId",
"Parameters": [],
"ReturnType": "T0",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_RoleId",
"Parameters": [
{
"Name": "value",
"Type": "T0"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_ClaimType",
"Parameters": [],
"ReturnType": "System.String",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_ClaimType",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_ClaimValue",
"Parameters": [],
"ReturnType": "System.String",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_ClaimValue",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TKey",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": []
}
]
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityUser",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.CoreCompat.IdentityUser<System.String, Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin, Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole, Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "userName",
"Type": "System.String"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityUser<T0, T1, T2, T3>",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.EntityFramework.IdentityUser<T0, T1, T2, T3>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Method",
"Name": "get_NormalizedUserName",
"Parameters": [],
"ReturnType": "System.String",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_NormalizedUserName",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_NormalizedEmail",
"Parameters": [],
"ReturnType": "System.String",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_NormalizedEmail",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_ConcurrencyStamp",
"Parameters": [],
"ReturnType": "System.String",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_ConcurrencyStamp",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TKey",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": []
},
{
"ParameterName": "TUserLogin",
"ParameterPosition": 1,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin<T0>"
]
},
{
"ParameterName": "TUserRole",
"ParameterPosition": 2,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<T0>"
]
},
{
"ParameterName": "TUserClaim",
"ParameterPosition": 3,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<T0>"
]
}
]
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin<System.String>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin<T0>",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.EntityFramework.IdentityUserLogin<T0>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Method",
"Name": "get_ProviderDisplayName",
"Parameters": [],
"ReturnType": "System.String",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_ProviderDisplayName",
"Parameters": [
{
"Name": "value",
"Type": "System.String"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TKey",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": []
}
]
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.UserStore<T0>",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.CoreCompat.UserStore<T0, Microsoft.AspNet.Identity.CoreCompat.IdentityRole, System.String, Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin, Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole, Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim>",
"ImplementedInterfaces": [
"Microsoft.AspNet.Identity.IUserStore<T0>"
],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "context",
"Type": "System.Data.Entity.DbContext"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TUser",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityUser"
]
}
]
},
{
"Name": "Microsoft.AspNet.Identity.CoreCompat.UserStore<T0, T1, T2, T3, T4, T5>",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.AspNet.Identity.EntityFramework.UserStore<T0, T1, T2, T3, T4, T5>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "context",
"Type": "System.Data.Entity.DbContext"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": [
{
"ParameterName": "TUser",
"ParameterPosition": 0,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityUser<T2, T3, T4, T5>"
]
},
{
"ParameterName": "TRole",
"ParameterPosition": 1,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityRole<T2, T4>"
]
},
{
"ParameterName": "TKey",
"ParameterPosition": 2,
"BaseTypeOrInterfaces": [
"System.IEquatable<T2>"
]
},
{
"ParameterName": "TUserLogin",
"ParameterPosition": 3,
"New": true,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.CoreCompat.IdentityUserLogin<T2>"
]
},
{
"ParameterName": "TUserRole",
"ParameterPosition": 4,
"New": true,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.EntityFramework.IdentityUserRole<T2>"
]
},
{
"ParameterName": "TUserClaim",
"ParameterPosition": 5,
"New": true,
"BaseTypeOrInterfaces": [
"Microsoft.AspNet.Identity.EntityFramework.IdentityUserClaim<T2>"
]
}
]
},
{
"Name": "Owin.CookieInterop",
"Visibility": "Public",
"Kind": "Class",
"Abstract": true,
"Static": true,
"Sealed": true,
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Method",
"Name": "CreateSharedDataFormat",
"Parameters": [
{
"Name": "keyDirectory",
"Type": "System.IO.DirectoryInfo"
},
{
"Name": "authenticationType",
"Type": "System.String"
}
],
"ReturnType": "Microsoft.Owin.Security.ISecureDataFormat<Microsoft.Owin.Security.AuthenticationTicket>",
"Static": true,
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
}
]
}

View File

@ -52,8 +52,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.AspNetCore.Authen
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "JwtBearerSample", "samples\JwtBearerSample\JwtBearerSample.csproj", "{D399B84F-591B-4E98-92BA-B0F63E7B6957}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Owin.Security.Interop", "src\Microsoft.Owin.Security.Interop\Microsoft.Owin.Security.Interop.csproj", "{A7922DD8-09F1-43E4-938B-CC523EA08898}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Microsoft.Owin.Security.Interop.Test", "test\Microsoft.Owin.Security.Interop.Test\Microsoft.Owin.Security.Interop.Test.csproj", "{A2B5DC39-68D5-4145-A8CC-6AEAB7D33A24}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "OpenIdConnect.AzureAdSample", "samples\OpenIdConnect.AzureAdSample\OpenIdConnect.AzureAdSample.csproj", "{3A7AD414-EBDE-4F92-B307-4E8F19B6117E}"
@ -393,22 +391,6 @@ Global
{D399B84F-591B-4E98-92BA-B0F63E7B6957}.Release|x64.Build.0 = Release|Any CPU
{D399B84F-591B-4E98-92BA-B0F63E7B6957}.Release|x86.ActiveCfg = Release|Any CPU
{D399B84F-591B-4E98-92BA-B0F63E7B6957}.Release|x86.Build.0 = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|x64.ActiveCfg = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|x64.Build.0 = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|x86.ActiveCfg = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Debug|x86.Build.0 = Debug|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|Any CPU.Build.0 = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|x64.ActiveCfg = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|x64.Build.0 = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|x86.ActiveCfg = Release|Any CPU
{A7922DD8-09F1-43E4-938B-CC523EA08898}.Release|x86.Build.0 = Release|Any CPU
{A2B5DC39-68D5-4145-A8CC-6AEAB7D33A24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A2B5DC39-68D5-4145-A8CC-6AEAB7D33A24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A2B5DC39-68D5-4145-A8CC-6AEAB7D33A24}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
@ -561,7 +543,6 @@ Global
{1790E052-646F-4529-B90E-6FEA95520D69} = {7BF11F3A-60B6-4796-B504-579C67FFBA34}
{2755BFE5-7421-4A31-A644-F817DF5CAA98} = {4D2B6A51-2F9F-44F5-8131-EA5CAC053652}
{D399B84F-591B-4E98-92BA-B0F63E7B6957} = {F8C0AA27-F3FB-4286-8E4C-47EF86B539FF}
{A7922DD8-09F1-43E4-938B-CC523EA08898} = {4D2B6A51-2F9F-44F5-8131-EA5CAC053652}
{A2B5DC39-68D5-4145-A8CC-6AEAB7D33A24} = {7BF11F3A-60B6-4796-B504-579C67FFBA34}
{3A7AD414-EBDE-4F92-B307-4E8F19B6117E} = {F8C0AA27-F3FB-4286-8E4C-47EF86B539FF}
{51563775-C659-4907-9BAF-9995BAB87D01} = {7BF11F3A-60B6-4796-B504-579C67FFBA34}

View File

@ -1,17 +0,0 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.Owin.Security.DataHandler;
using Microsoft.Owin.Security.DataHandler.Encoder;
using Microsoft.Owin.Security.DataProtection;
namespace Microsoft.Owin.Security.Interop
{
public class AspNetTicketDataFormat : SecureDataFormat<AuthenticationTicket>
{
public AspNetTicketDataFormat(IDataProtector protector)
: base(AspNetTicketSerializer.Default, protector, TextEncodings.Base64Url)
{
}
}
}

View File

@ -1,220 +0,0 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.IO;
using System.Linq;
using System.Security.Claims;
using Microsoft.Owin.Security.DataHandler.Serializer;
namespace Microsoft.Owin.Security.Interop
{
// This MUST be kept in sync with Microsoft.AspNetCore.Authentication.DataHandler.TicketSerializer
public class AspNetTicketSerializer : IDataSerializer<AuthenticationTicket>
{
private const string DefaultStringPlaceholder = "\0";
private const int FormatVersion = 5;
public static AspNetTicketSerializer Default { get; } = new AspNetTicketSerializer();
public virtual byte[] Serialize(AuthenticationTicket ticket)
{
using (var memory = new MemoryStream())
{
using (var writer = new BinaryWriter(memory))
{
Write(writer, ticket);
}
return memory.ToArray();
}
}
public virtual AuthenticationTicket Deserialize(byte[] data)
{
using (var memory = new MemoryStream(data))
{
using (var reader = new BinaryReader(memory))
{
return Read(reader);
}
}
}
public virtual void Write(BinaryWriter writer, AuthenticationTicket ticket)
{
writer.Write(FormatVersion);
writer.Write(ticket.Identity.AuthenticationType);
var identity = ticket.Identity;
if (identity == null)
{
throw new ArgumentNullException("ticket.Identity");
}
// There is always a single identity
writer.Write(1);
WriteIdentity(writer, identity);
PropertiesSerializer.Write(writer, ticket.Properties);
}
protected virtual void WriteIdentity(BinaryWriter writer, ClaimsIdentity identity)
{
var authenticationType = identity.AuthenticationType ?? string.Empty;
writer.Write(authenticationType);
WriteWithDefault(writer, identity.NameClaimType, ClaimsIdentity.DefaultNameClaimType);
WriteWithDefault(writer, identity.RoleClaimType, ClaimsIdentity.DefaultRoleClaimType);
// Write the number of claims contained in the identity.
writer.Write(identity.Claims.Count());
foreach (var claim in identity.Claims)
{
WriteClaim(writer, claim);
}
var bootstrap = identity.BootstrapContext as string;
if (!string.IsNullOrEmpty(bootstrap))
{
writer.Write(true);
writer.Write(bootstrap);
}
else
{
writer.Write(false);
}
if (identity.Actor != null)
{
writer.Write(true);
WriteIdentity(writer, identity.Actor);
}
else
{
writer.Write(false);
}
}
protected virtual void WriteClaim(BinaryWriter writer, Claim claim)
{
WriteWithDefault(writer, claim.Type, claim.Subject?.NameClaimType ?? ClaimsIdentity.DefaultNameClaimType);
writer.Write(claim.Value);
WriteWithDefault(writer, claim.ValueType, ClaimValueTypes.String);
WriteWithDefault(writer, claim.Issuer, ClaimsIdentity.DefaultIssuer);
WriteWithDefault(writer, claim.OriginalIssuer, claim.Issuer);
// Write the number of properties contained in the claim.
writer.Write(claim.Properties.Count);
foreach (var property in claim.Properties)
{
writer.Write(property.Key ?? string.Empty);
writer.Write(property.Value ?? string.Empty);
}
}
public virtual AuthenticationTicket Read(BinaryReader reader)
{
if (reader.ReadInt32() != FormatVersion)
{
return null;
}
var scheme = reader.ReadString();
// Any identities after the first will be ignored.
var count = reader.ReadInt32();
if (count < 0)
{
return null;
}
var identity = ReadIdentity(reader);
var properties = PropertiesSerializer.Read(reader);
return new AuthenticationTicket(identity, properties);
}
protected virtual ClaimsIdentity ReadIdentity(BinaryReader reader)
{
var authenticationType = reader.ReadString();
var nameClaimType = ReadWithDefault(reader, ClaimsIdentity.DefaultNameClaimType);
var roleClaimType = ReadWithDefault(reader, ClaimsIdentity.DefaultRoleClaimType);
// Read the number of claims contained
// in the serialized identity.
var count = reader.ReadInt32();
var identity = new ClaimsIdentity(authenticationType, nameClaimType, roleClaimType);
for (int index = 0; index != count; ++index)
{
var claim = ReadClaim(reader, identity);
identity.AddClaim(claim);
}
// Determine whether the identity
// has a bootstrap context attached.
if (reader.ReadBoolean())
{
identity.BootstrapContext = reader.ReadString();
}
// Determine whether the identity
// has an actor identity attached.
if (reader.ReadBoolean())
{
identity.Actor = ReadIdentity(reader);
}
return identity;
}
protected virtual Claim ReadClaim(BinaryReader reader, ClaimsIdentity identity)
{
var type = ReadWithDefault(reader, identity.NameClaimType);
var value = reader.ReadString();
var valueType = ReadWithDefault(reader, ClaimValueTypes.String);
var issuer = ReadWithDefault(reader, ClaimsIdentity.DefaultIssuer);
var originalIssuer = ReadWithDefault(reader, issuer);
var claim = new Claim(type, value, valueType, issuer, originalIssuer, identity);
// Read the number of properties stored in the claim.
var count = reader.ReadInt32();
for (var index = 0; index != count; ++index)
{
var key = reader.ReadString();
var propertyValue = reader.ReadString();
claim.Properties.Add(key, propertyValue);
}
return claim;
}
private static void WriteWithDefault(BinaryWriter writer, string value, string defaultValue)
{
if (string.Equals(value, defaultValue, StringComparison.Ordinal))
{
writer.Write(DefaultStringPlaceholder);
}
else
{
writer.Write(value);
}
}
private static string ReadWithDefault(BinaryReader reader, string defaultValue)
{
var value = reader.ReadString();
if (string.Equals(value, DefaultStringPlaceholder, StringComparison.Ordinal))
{
return defaultValue;
}
return value;
}
}
}

View File

@ -1,280 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using Microsoft.Owin.Infrastructure;
namespace Microsoft.Owin.Security.Interop
{
// This MUST be kept in sync with Microsoft.AspNetCore.Authentication.Cookies.ChunkingCookieManager
/// <summary>
/// This handles cookies that are limited by per cookie length. It breaks down long cookies for responses, and reassembles them
/// from requests.
/// </summary>
public class ChunkingCookieManager : ICookieManager
{
private const string ChunkKeySuffix = "C";
private const string ChunkCountPrefix = "chunks-";
public ChunkingCookieManager()
{
// Lowest common denominator. Safari has the lowest known limit (4093), and we leave little extra just in case.
// See http://browsercookielimits.x64.me/.
// Leave at least 20 in case CookiePolicy tries to add 'secure' and/or 'httponly'.
ChunkSize = 4070;
}
/// <summary>
/// The maximum size of cookie to send back to the client. If a cookie exceeds this size it will be broken down into multiple
/// cookies. Set this value to null to disable this behavior. The default is 4090 characters, which is supported by all
/// common browsers.
///
/// Note that browsers may also have limits on the total size of all cookies per domain, and on the number of cookies per domain.
/// </summary>
public int? ChunkSize { get; set; }
/// <summary>
/// Throw if not all chunks of a cookie are available on a request for re-assembly.
/// </summary>
public bool ThrowForPartialCookies { get; set; }
// Parse the "chunks-XX" to determine how many chunks there should be.
private static int ParseChunksCount(string value)
{
if (value != null && value.StartsWith(ChunkCountPrefix, StringComparison.Ordinal))
{
var chunksCountString = value.Substring(ChunkCountPrefix.Length);
int chunksCount;
if (int.TryParse(chunksCountString, NumberStyles.None, CultureInfo.InvariantCulture, out chunksCount))
{
return chunksCount;
}
}
return 0;
}
/// <summary>
/// Get the reassembled cookie. Non chunked cookies are returned normally.
/// Cookies with missing chunks just have their "chunks-XX" header returned.
/// </summary>
/// <param name="context"></param>
/// <param name="key"></param>
/// <returns>The reassembled cookie, if any, or null.</returns>
public string GetRequestCookie(IOwinContext context, string key)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
if (key == null)
{
throw new ArgumentNullException(nameof(key));
}
var requestCookies = context.Request.Cookies;
var value = requestCookies[key];
var chunksCount = ParseChunksCount(value);
if (chunksCount > 0)
{
var chunks = new string[chunksCount];
for (var chunkId = 1; chunkId <= chunksCount; chunkId++)
{
var chunk = requestCookies[key + ChunkKeySuffix + chunkId.ToString(CultureInfo.InvariantCulture)];
if (string.IsNullOrEmpty(chunk))
{
if (ThrowForPartialCookies)
{
var totalSize = 0;
for (int i = 0; i < chunkId - 1; i++)
{
totalSize += chunks[i].Length;
}
throw new FormatException(
string.Format(CultureInfo.CurrentCulture,
"The chunked cookie is incomplete. Only {0} of the expected {1} chunks were found, totaling {2} characters. A client size limit may have been exceeded.",
chunkId - 1, chunksCount, totalSize));
}
// Missing chunk, abort by returning the original cookie value. It may have been a false positive?
return value;
}
chunks[chunkId - 1] = chunk;
}
return string.Join(string.Empty, chunks);
}
return value;
}
/// <summary>
/// Appends a new response cookie to the Set-Cookie header. If the cookie is larger than the given size limit
/// then it will be broken down into multiple cookies as follows:
/// Set-Cookie: CookieName=chunks-3; path=/
/// Set-Cookie: CookieNameC1=Segment1; path=/
/// Set-Cookie: CookieNameC2=Segment2; path=/
/// Set-Cookie: CookieNameC3=Segment3; path=/
/// </summary>
/// <param name="context"></param>
/// <param name="key"></param>
/// <param name="value"></param>
/// <param name="options"></param>
public void AppendResponseCookie(IOwinContext context, string key, string value, CookieOptions options)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
if (key == null)
{
throw new ArgumentNullException(nameof(key));
}
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
var domainHasValue = !string.IsNullOrEmpty(options.Domain);
var pathHasValue = !string.IsNullOrEmpty(options.Path);
var expiresHasValue = options.Expires.HasValue;
var templateLength = key.Length + "=".Length
+ (domainHasValue ? "; domain=".Length + options.Domain.Length : 0)
+ (pathHasValue ? "; path=".Length + options.Path.Length : 0)
+ (expiresHasValue ? "; expires=ddd, dd-MMM-yyyy HH:mm:ss GMT".Length : 0)
+ (options.Secure ? "; secure".Length : 0)
+ (options.HttpOnly ? "; HttpOnly".Length : 0);
// Normal cookie
var responseCookies = context.Response.Cookies;
if (!ChunkSize.HasValue || ChunkSize.Value > templateLength + value.Length)
{
responseCookies.Append(key, value, options);
}
else if (ChunkSize.Value < templateLength + 10)
{
// 10 is the minimum data we want to put in an individual cookie, including the cookie chunk identifier "CXX".
// No room for data, we can't chunk the options and name
throw new InvalidOperationException("The cookie key and options are larger than ChunksSize, leaving no room for data.");
}
else
{
// Break the cookie down into multiple cookies.
// Key = CookieName, value = "Segment1Segment2Segment2"
// Set-Cookie: CookieName=chunks-3; path=/
// Set-Cookie: CookieNameC1="Segment1"; path=/
// Set-Cookie: CookieNameC2="Segment2"; path=/
// Set-Cookie: CookieNameC3="Segment3"; path=/
var dataSizePerCookie = ChunkSize.Value - templateLength - 3; // Budget 3 chars for the chunkid.
var cookieChunkCount = (int)Math.Ceiling(value.Length * 1.0 / dataSizePerCookie);
responseCookies.Append(key, ChunkCountPrefix + cookieChunkCount.ToString(CultureInfo.InvariantCulture), options);
var offset = 0;
for (var chunkId = 1; chunkId <= cookieChunkCount; chunkId++)
{
var remainingLength = value.Length - offset;
var length = Math.Min(dataSizePerCookie, remainingLength);
var segment = value.Substring(offset, length);
offset += length;
responseCookies.Append(key + ChunkKeySuffix + chunkId.ToString(CultureInfo.InvariantCulture), segment, options);
}
}
}
/// <summary>
/// Deletes the cookie with the given key by setting an expired state. If a matching chunked cookie exists on
/// the request, delete each chunk.
/// </summary>
/// <param name="context"></param>
/// <param name="key"></param>
/// <param name="options"></param>
public void DeleteCookie(IOwinContext context, string key, CookieOptions options)
{
if (context == null)
{
throw new ArgumentNullException(nameof(context));
}
if (key == null)
{
throw new ArgumentNullException(nameof(key));
}
if (options == null)
{
throw new ArgumentNullException(nameof(options));
}
var keys = new List<string>();
keys.Add(key + "=");
var requestCookie = context.Request.Cookies[key];
var chunks = ParseChunksCount(requestCookie);
if (chunks > 0)
{
for (int i = 1; i <= chunks + 1; i++)
{
var subkey = key + ChunkKeySuffix + i.ToString(CultureInfo.InvariantCulture);
keys.Add(subkey + "=");
}
}
var domainHasValue = !string.IsNullOrEmpty(options.Domain);
var pathHasValue = !string.IsNullOrEmpty(options.Path);
Func<string, bool> rejectPredicate;
Func<string, bool> predicate = value => keys.Any(k => value.StartsWith(k, StringComparison.OrdinalIgnoreCase));
if (domainHasValue)
{
rejectPredicate = value => predicate(value) && value.IndexOf("domain=" + options.Domain, StringComparison.OrdinalIgnoreCase) != -1;
}
else if (pathHasValue)
{
rejectPredicate = value => predicate(value) && value.IndexOf("path=" + options.Path, StringComparison.OrdinalIgnoreCase) != -1;
}
else
{
rejectPredicate = value => predicate(value);
}
var responseHeaders = context.Response.Headers;
string[] existingValues;
if (responseHeaders.TryGetValue(Constants.Headers.SetCookie, out existingValues) && existingValues != null)
{
responseHeaders.SetValues(Constants.Headers.SetCookie, existingValues.Where(value => !rejectPredicate(value)).ToArray());
}
AppendResponseCookie(
context,
key,
string.Empty,
new CookieOptions()
{
Path = options.Path,
Domain = options.Domain,
Expires = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc),
});
for (int i = 1; i <= chunks; i++)
{
AppendResponseCookie(
context,
key + "C" + i.ToString(CultureInfo.InvariantCulture),
string.Empty,
new CookieOptions()
{
Path = options.Path,
Domain = options.Domain,
Expires = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc),
});
}
}
}
}

View File

@ -1,13 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace Microsoft.Owin.Security.Interop
{
internal static class Constants
{
internal static class Headers
{
internal const string SetCookie = "Set-Cookie";
}
}
}

View File

@ -1,31 +0,0 @@
// Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using Microsoft.AspNetCore.DataProtection;
namespace Microsoft.Owin.Security.Interop
{
/// <summary>
/// Converts an <see cref="IDataProtector"/> to an
/// <see cref="Microsoft.Owin.Security.DataProtection.IDataProtector"/>.
/// </summary>
public sealed class DataProtectorShim : Microsoft.Owin.Security.DataProtection.IDataProtector
{
private readonly IDataProtector _protector;
public DataProtectorShim(IDataProtector protector)
{
_protector = protector;
}
public byte[] Protect(byte[] userData)
{
return _protector.Protect(userData);
}
public byte[] Unprotect(byte[] protectedData)
{
return _protector.Unprotect(protectedData);
}
}
}

View File

@ -1,16 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Description>A compatibility layer for sharing authentication tickets between Microsoft.Owin.Security and Microsoft.AspNetCore.Authentication.</Description>
<TargetFramework>net461</TargetFramework>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<PackageTags>aspnetcore;katana;owin;security</PackageTags>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.DataProtection.Extensions" Version="$(MicrosoftAspNetCoreDataProtectionExtensionsPackageVersion)" />
<PackageReference Include="Microsoft.Owin.Security" Version="$(MicrosoftOwinSecurityPackageVersion)" />
</ItemGroup>
</Project>

View File

@ -1,8 +0,0 @@
// Copyright (c) .NET Foundation. All rights reserved.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Runtime.InteropServices;
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("a7922dd8-09f1-43e4-938b-cc523ea08898")]

View File

@ -1,372 +0,0 @@
{
"AssemblyIdentity": "Microsoft.Owin.Security.Interop, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60",
"Types": [
{
"Name": "Microsoft.Owin.Security.Interop.AspNetTicketDataFormat",
"Visibility": "Public",
"Kind": "Class",
"BaseType": "Microsoft.Owin.Security.DataHandler.SecureDataFormat<Microsoft.Owin.Security.AuthenticationTicket>",
"ImplementedInterfaces": [],
"Members": [
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "protector",
"Type": "Microsoft.Owin.Security.DataProtection.IDataProtector"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
},
{
"Name": "Microsoft.Owin.Security.Interop.AspNetTicketSerializer",
"Visibility": "Public",
"Kind": "Class",
"ImplementedInterfaces": [
"Microsoft.Owin.Security.DataHandler.Serializer.IDataSerializer<Microsoft.Owin.Security.AuthenticationTicket>"
],
"Members": [
{
"Kind": "Method",
"Name": "get_Default",
"Parameters": [],
"ReturnType": "Microsoft.Owin.Security.Interop.AspNetTicketSerializer",
"Static": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "Serialize",
"Parameters": [
{
"Name": "ticket",
"Type": "Microsoft.Owin.Security.AuthenticationTicket"
}
],
"ReturnType": "System.Byte[]",
"Virtual": true,
"ImplementedInterface": "Microsoft.Owin.Security.DataHandler.Serializer.IDataSerializer<Microsoft.Owin.Security.AuthenticationTicket>",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "Deserialize",
"Parameters": [
{
"Name": "data",
"Type": "System.Byte[]"
}
],
"ReturnType": "Microsoft.Owin.Security.AuthenticationTicket",
"Virtual": true,
"ImplementedInterface": "Microsoft.Owin.Security.DataHandler.Serializer.IDataSerializer<Microsoft.Owin.Security.AuthenticationTicket>",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "Write",
"Parameters": [
{
"Name": "writer",
"Type": "System.IO.BinaryWriter"
},
{
"Name": "ticket",
"Type": "Microsoft.Owin.Security.AuthenticationTicket"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "WriteIdentity",
"Parameters": [
{
"Name": "writer",
"Type": "System.IO.BinaryWriter"
},
{
"Name": "identity",
"Type": "System.Security.Claims.ClaimsIdentity"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Protected",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "WriteClaim",
"Parameters": [
{
"Name": "writer",
"Type": "System.IO.BinaryWriter"
},
{
"Name": "claim",
"Type": "System.Security.Claims.Claim"
}
],
"ReturnType": "System.Void",
"Virtual": true,
"Visibility": "Protected",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "Read",
"Parameters": [
{
"Name": "reader",
"Type": "System.IO.BinaryReader"
}
],
"ReturnType": "Microsoft.Owin.Security.AuthenticationTicket",
"Virtual": true,
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "ReadIdentity",
"Parameters": [
{
"Name": "reader",
"Type": "System.IO.BinaryReader"
}
],
"ReturnType": "System.Security.Claims.ClaimsIdentity",
"Virtual": true,
"Visibility": "Protected",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "ReadClaim",
"Parameters": [
{
"Name": "reader",
"Type": "System.IO.BinaryReader"
},
{
"Name": "identity",
"Type": "System.Security.Claims.ClaimsIdentity"
}
],
"ReturnType": "System.Security.Claims.Claim",
"Virtual": true,
"Visibility": "Protected",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
},
{
"Name": "Microsoft.Owin.Security.Interop.ChunkingCookieManager",
"Visibility": "Public",
"Kind": "Class",
"ImplementedInterfaces": [
"Microsoft.Owin.Infrastructure.ICookieManager"
],
"Members": [
{
"Kind": "Method",
"Name": "get_ChunkSize",
"Parameters": [],
"ReturnType": "System.Nullable<System.Int32>",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_ChunkSize",
"Parameters": [
{
"Name": "value",
"Type": "System.Nullable<System.Int32>"
}
],
"ReturnType": "System.Void",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "get_ThrowForPartialCookies",
"Parameters": [],
"ReturnType": "System.Boolean",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "set_ThrowForPartialCookies",
"Parameters": [
{
"Name": "value",
"Type": "System.Boolean"
}
],
"ReturnType": "System.Void",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "GetRequestCookie",
"Parameters": [
{
"Name": "context",
"Type": "Microsoft.Owin.IOwinContext"
},
{
"Name": "key",
"Type": "System.String"
}
],
"ReturnType": "System.String",
"Sealed": true,
"Virtual": true,
"ImplementedInterface": "Microsoft.Owin.Infrastructure.ICookieManager",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "AppendResponseCookie",
"Parameters": [
{
"Name": "context",
"Type": "Microsoft.Owin.IOwinContext"
},
{
"Name": "key",
"Type": "System.String"
},
{
"Name": "value",
"Type": "System.String"
},
{
"Name": "options",
"Type": "Microsoft.Owin.CookieOptions"
}
],
"ReturnType": "System.Void",
"Sealed": true,
"Virtual": true,
"ImplementedInterface": "Microsoft.Owin.Infrastructure.ICookieManager",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "DeleteCookie",
"Parameters": [
{
"Name": "context",
"Type": "Microsoft.Owin.IOwinContext"
},
{
"Name": "key",
"Type": "System.String"
},
{
"Name": "options",
"Type": "Microsoft.Owin.CookieOptions"
}
],
"ReturnType": "System.Void",
"Sealed": true,
"Virtual": true,
"ImplementedInterface": "Microsoft.Owin.Infrastructure.ICookieManager",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
},
{
"Name": "Microsoft.Owin.Security.Interop.DataProtectorShim",
"Visibility": "Public",
"Kind": "Class",
"Sealed": true,
"ImplementedInterfaces": [
"Microsoft.Owin.Security.DataProtection.IDataProtector"
],
"Members": [
{
"Kind": "Method",
"Name": "Protect",
"Parameters": [
{
"Name": "userData",
"Type": "System.Byte[]"
}
],
"ReturnType": "System.Byte[]",
"Sealed": true,
"Virtual": true,
"ImplementedInterface": "Microsoft.Owin.Security.DataProtection.IDataProtector",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Method",
"Name": "Unprotect",
"Parameters": [
{
"Name": "protectedData",
"Type": "System.Byte[]"
}
],
"ReturnType": "System.Byte[]",
"Sealed": true,
"Virtual": true,
"ImplementedInterface": "Microsoft.Owin.Security.DataProtection.IDataProtector",
"Visibility": "Public",
"GenericParameter": []
},
{
"Kind": "Constructor",
"Name": ".ctor",
"Parameters": [
{
"Name": "protector",
"Type": "Microsoft.AspNetCore.DataProtection.IDataProtector"
}
],
"Visibility": "Public",
"GenericParameter": []
}
],
"GenericParameters": []
}
]
}

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net461</TargetFramework>
@ -7,11 +7,7 @@
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Microsoft.Owin.Security.Interop\Microsoft.Owin.Security.Interop.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(MicrosoftAspNetCoreTestHostPackageVersion)" />
<!--<PackageReference Include="Microsoft.AspNetCore.TestHost" Version="$(MicrosoftAspNetCoreTestHostPackageVersion)" />-->
<PackageReference Include="Microsoft.Owin.Security.Cookies" Version="$(MicrosoftOwinSecurityCookiesPackageVersion)" />
<PackageReference Include="Microsoft.Owin.Testing" Version="$(MicrosoftOwinTestingPackageVersion)" />
</ItemGroup>