|
|
@ -7,6 +7,7 @@ |
|
|
using System; |
|
|
using System; |
|
|
using System.Collections.Generic; |
|
|
using System.Collections.Generic; |
|
|
using System.Diagnostics; |
|
|
using System.Diagnostics; |
|
|
|
|
|
using System.Diagnostics.CodeAnalysis; |
|
|
|
|
|
|
|
|
namespace OpenIddict.EntityFrameworkCore.Models |
|
|
namespace OpenIddict.EntityFrameworkCore.Models |
|
|
{ |
|
|
{ |
|
|
@ -34,7 +35,10 @@ namespace OpenIddict.EntityFrameworkCore.Models |
|
|
/// Represents an OpenIddict application.
|
|
|
/// Represents an OpenIddict application.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[DebuggerDisplay("Id = {Id.ToString(),nq} ; ClientId = {ClientId,nq} ; Type = {Type,nq}")] |
|
|
[DebuggerDisplay("Id = {Id.ToString(),nq} ; ClientId = {ClientId,nq} ; Type = {Type,nq}")] |
|
|
public class OpenIddictEntityFrameworkCoreApplication<TKey, TAuthorization, TToken> where TKey : IEquatable<TKey> |
|
|
public class OpenIddictEntityFrameworkCoreApplication<TKey, TAuthorization, TToken> |
|
|
|
|
|
where TKey : IEquatable<TKey> |
|
|
|
|
|
where TAuthorization : class |
|
|
|
|
|
where TToken : class |
|
|
{ |
|
|
{ |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the list of the authorizations associated with this application.
|
|
|
/// Gets the list of the authorizations associated with this application.
|
|
|
@ -42,77 +46,74 @@ namespace OpenIddict.EntityFrameworkCore.Models |
|
|
public virtual ICollection<TAuthorization> Authorizations { get; } = new HashSet<TAuthorization>(); |
|
|
public virtual ICollection<TAuthorization> Authorizations { get; } = new HashSet<TAuthorization>(); |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the client identifier
|
|
|
/// Gets or sets the client identifier associated with the current application.
|
|
|
/// associated with the current application.
|
|
|
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string ClientId { get; set; } |
|
|
public virtual string? ClientId { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the client secret associated with the current application.
|
|
|
/// Gets or sets the client secret associated with the current application.
|
|
|
/// Note: depending on the application manager used to create this instance,
|
|
|
/// Note: depending on the application manager used to create this instance,
|
|
|
/// this property may be hashed or encrypted for security reasons.
|
|
|
/// this property may be hashed or encrypted for security reasons.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string ClientSecret { get; set; } |
|
|
public virtual string? ClientSecret { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the concurrency token.
|
|
|
/// Gets or sets the concurrency token.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string ConcurrencyToken { get; set; } = Guid.NewGuid().ToString(); |
|
|
public virtual string? ConcurrencyToken { get; set; } = Guid.NewGuid().ToString(); |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the consent type
|
|
|
/// Gets or sets the consent type associated with the current application.
|
|
|
/// associated with the current application.
|
|
|
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string ConsentType { get; set; } |
|
|
public virtual string? ConsentType { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the display name
|
|
|
/// Gets or sets the display name associated with the current application.
|
|
|
/// associated with the current application.
|
|
|
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string DisplayName { get; set; } |
|
|
public virtual string? DisplayName { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the localized display names
|
|
|
/// Gets or sets the localized display names
|
|
|
/// associated with the current application,
|
|
|
/// associated with the current application,
|
|
|
/// serialized as a JSON object.
|
|
|
/// serialized as a JSON object.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string DisplayNames { get; set; } |
|
|
public virtual string? DisplayNames { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the unique identifier
|
|
|
/// Gets or sets the unique identifier associated with the current application.
|
|
|
/// associated with the current application.
|
|
|
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual TKey Id { get; set; } |
|
|
[AllowNull, MaybeNull] |
|
|
|
|
|
public virtual TKey Id { get; set; } = default!; |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the permissions associated with the
|
|
|
/// Gets or sets the permissions associated with the
|
|
|
/// current application, serialized as a JSON array.
|
|
|
/// current application, serialized as a JSON array.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string Permissions { get; set; } |
|
|
public virtual string? Permissions { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the logout callback URLs associated with
|
|
|
/// Gets or sets the logout callback URLs associated with
|
|
|
/// the current application, serialized as a JSON array.
|
|
|
/// the current application, serialized as a JSON array.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string PostLogoutRedirectUris { get; set; } |
|
|
public virtual string? PostLogoutRedirectUris { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the additional properties serialized as a JSON object,
|
|
|
/// Gets or sets the additional properties serialized as a JSON object,
|
|
|
/// or <c>null</c> if no bag was associated with the current application.
|
|
|
/// or <c>null</c> if no bag was associated with the current application.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string Properties { get; set; } |
|
|
public virtual string? Properties { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the callback URLs associated with the
|
|
|
/// Gets or sets the callback URLs associated with the
|
|
|
/// current application, serialized as a JSON array.
|
|
|
/// current application, serialized as a JSON array.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string RedirectUris { get; set; } |
|
|
public virtual string? RedirectUris { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the requirements associated with the
|
|
|
/// Gets or sets the requirements associated with the
|
|
|
/// current application, serialized as a JSON array.
|
|
|
/// current application, serialized as a JSON array.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string Requirements { get; set; } |
|
|
public virtual string? Requirements { get; set; } |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets the list of the tokens associated with this application.
|
|
|
/// Gets the list of the tokens associated with this application.
|
|
|
@ -120,9 +121,8 @@ namespace OpenIddict.EntityFrameworkCore.Models |
|
|
public virtual ICollection<TToken> Tokens { get; } = new HashSet<TToken>(); |
|
|
public virtual ICollection<TToken> Tokens { get; } = new HashSet<TToken>(); |
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Gets or sets the application type
|
|
|
/// Gets or sets the application type associated with the current application.
|
|
|
/// associated with the current application.
|
|
|
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public virtual string Type { get; set; } |
|
|
public virtual string? Type { get; set; } |
|
|
} |
|
|
} |
|
|
} |
|
|
} |