4 changed files with 7 additions and 64 deletions
@ -1,7 +1,6 @@ |
|||
using System; |
|||
using OpenIddict; |
|||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; |
|||
|
|||
namespace Mvc.Server.Models { |
|||
// Add profile data for application users by adding properties to the ApplicationUser class
|
|||
public class ApplicationUser : OpenIddictUser { } |
|||
public class ApplicationUser : IdentityUser { } |
|||
} |
|||
|
|||
@ -1,42 +0,0 @@ |
|||
/* |
|||
* Licensed under the Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
|
|||
* See https://github.com/openiddict/openiddict-core for more information concerning
|
|||
* the license and the contributors participating to this project. |
|||
*/ |
|||
|
|||
using System; |
|||
using System.Collections.Generic; |
|||
using Microsoft.AspNetCore.Identity.EntityFrameworkCore; |
|||
|
|||
namespace OpenIddict { |
|||
/// <summary>
|
|||
/// Represents an OpenIddict user.
|
|||
/// </summary>
|
|||
public class OpenIddictUser : OpenIddictUser<string, OpenIddictAuthorization, OpenIddictToken> { |
|||
public OpenIddictUser() { |
|||
// Generate a new string identifier.
|
|||
Id = Guid.NewGuid().ToString(); |
|||
} |
|||
} |
|||
|
|||
/// <summary>
|
|||
/// Represents an OpenIddict user.
|
|||
/// </summary>
|
|||
public class OpenIddictUser<TKey> : OpenIddictUser<TKey, OpenIddictAuthorization<TKey>, OpenIddictToken<TKey>> |
|||
where TKey : IEquatable<TKey> { } |
|||
|
|||
/// <summary>
|
|||
/// Represents an OpenIddict user.
|
|||
/// </summary>
|
|||
public class OpenIddictUser<TKey, TAuthorization, TToken> : IdentityUser<TKey> where TKey : IEquatable<TKey> { |
|||
/// <summary>
|
|||
/// Gets the list of the authorizations associated with this user profile.
|
|||
/// </summary>
|
|||
public virtual IList<TAuthorization> Authorizations { get; } = new List<TAuthorization>(); |
|||
|
|||
/// <summary>
|
|||
/// Gets the list of the tokens associated with this user profile.
|
|||
/// </summary>
|
|||
public virtual IList<TToken> Tokens { get; } = new List<TToken>(); |
|||
} |
|||
} |
|||
Loading…
Reference in new issue