mirror of https://github.com/abpframework/abp.git
155 changed files with 5385 additions and 5576 deletions
@ -1,13 +1,12 @@ |
|||
namespace Volo.Abp.IdentityServer.ApiResources |
|||
namespace Volo.Abp.IdentityServer.ApiResources; |
|||
|
|||
public class ApiResourceConsts |
|||
{ |
|||
public class ApiResourceConsts |
|||
{ |
|||
public static int NameMaxLength { get; set; } = 200; |
|||
public static int NameMaxLength { get; set; } = 200; |
|||
|
|||
public static int DisplayNameMaxLength { get; set; } = 200; |
|||
public static int DisplayNameMaxLength { get; set; } = 200; |
|||
|
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
|
|||
public static int AllowedAccessTokenSigningAlgorithmsMaxLength { get; set; } = 100; |
|||
} |
|||
public static int AllowedAccessTokenSigningAlgorithmsMaxLength { get; set; } = 100; |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.IdentityServer.ApiResources |
|||
namespace Volo.Abp.IdentityServer.ApiResources; |
|||
|
|||
[Serializable] |
|||
public class ApiResourceEto |
|||
{ |
|||
[Serializable] |
|||
public class ApiResourceEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
[NotNull] |
|||
public string Name { get; set; } |
|||
[NotNull] |
|||
public string Name { get; set; } |
|||
|
|||
public string DisplayName { get; set; } |
|||
public string DisplayName { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
public string Description { get; set; } |
|||
|
|||
public bool Enabled { get; set; } |
|||
} |
|||
public bool Enabled { get; set; } |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.IdentityServer.ApiResources |
|||
namespace Volo.Abp.IdentityServer.ApiResources; |
|||
|
|||
public class ApiResourcePropertyConsts |
|||
{ |
|||
public class ApiResourcePropertyConsts |
|||
{ |
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
|
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.IdentityServer.ApiResources |
|||
namespace Volo.Abp.IdentityServer.ApiResources; |
|||
|
|||
public class ApiResourceScopeConsts |
|||
{ |
|||
public class ApiResourceScopeConsts |
|||
{ |
|||
public static int ScopeMaxLength { get; set; } = 200; |
|||
} |
|||
public static int ScopeMaxLength { get; set; } = 200; |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
namespace Volo.Abp.IdentityServer.ApiResources |
|||
namespace Volo.Abp.IdentityServer.ApiResources; |
|||
|
|||
public class ApiResourceSecretConsts |
|||
{ |
|||
public class ApiResourceSecretConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 250
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 250; |
|||
/// <summary>
|
|||
/// Default value: 250
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 250; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 4000
|
|||
/// </summary>
|
|||
public static int ValueMaxLength { get; set; } = 4000; |
|||
/// <summary>
|
|||
/// Default value: 4000
|
|||
/// </summary>
|
|||
public static int ValueMaxLength { get; set; } = 4000; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 1000
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 1000
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
namespace Volo.Abp.IdentityServer.ApiScopes |
|||
namespace Volo.Abp.IdentityServer.ApiScopes; |
|||
|
|||
public class ApiScopeConsts |
|||
{ |
|||
public class ApiScopeConsts |
|||
{ |
|||
public static int NameMaxLength { get; set; } = 200; |
|||
public static int NameMaxLength { get; set; } = 200; |
|||
|
|||
public static int DisplayNameMaxLength { get; set; } = 200; |
|||
public static int DisplayNameMaxLength { get; set; } = 200; |
|||
|
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
} |
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.IdentityServer.ApiScopes |
|||
namespace Volo.Abp.IdentityServer.ApiScopes; |
|||
|
|||
public class ApiScopePropertyConsts |
|||
{ |
|||
public class ApiScopePropertyConsts |
|||
{ |
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
|
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientClaimConsts |
|||
{ |
|||
public class ClientClaimConsts |
|||
{ |
|||
public static int TypeMaxLength { get; set; } = 250; |
|||
public static int TypeMaxLength { get; set; } = 250; |
|||
|
|||
public static int ValueMaxLength { get; set; } = 250; |
|||
} |
|||
public static int ValueMaxLength { get; set; } = 250; |
|||
} |
|||
|
|||
@ -1,29 +1,28 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientConsts |
|||
{ |
|||
public class ClientConsts |
|||
{ |
|||
public static int ClientIdMaxLength { get; set; } = 200; |
|||
public static int ClientIdMaxLength { get; set; } = 200; |
|||
|
|||
public static int ProtocolTypeMaxLength { get; set; } = 200; |
|||
public static int ProtocolTypeMaxLength { get; set; } = 200; |
|||
|
|||
public static int ClientNameMaxLength { get; set; } = 200; |
|||
public static int ClientNameMaxLength { get; set; } = 200; |
|||
|
|||
public static int ClientUriMaxLength { get; set; } = 2000; |
|||
public static int ClientUriMaxLength { get; set; } = 2000; |
|||
|
|||
public static int LogoUriMaxLength { get; set; } = 2000; |
|||
public static int LogoUriMaxLength { get; set; } = 2000; |
|||
|
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
|
|||
public static int FrontChannelLogoutUriMaxLength { get; set; } = 2000; |
|||
public static int FrontChannelLogoutUriMaxLength { get; set; } = 2000; |
|||
|
|||
public static int BackChannelLogoutUriMaxLength { get; set; } = 2000; |
|||
public static int BackChannelLogoutUriMaxLength { get; set; } = 2000; |
|||
|
|||
public static int ClientClaimsPrefixMaxLength { get; set; } = 200; |
|||
public static int ClientClaimsPrefixMaxLength { get; set; } = 200; |
|||
|
|||
public static int PairWiseSubjectSaltMaxLength { get; set; } = 200; |
|||
public static int PairWiseSubjectSaltMaxLength { get; set; } = 200; |
|||
|
|||
public static int UserCodeTypeMaxLength { get; set; } = 100; |
|||
public static int UserCodeTypeMaxLength { get; set; } = 100; |
|||
|
|||
public static int AllowedIdentityTokenSigningAlgorithms { get; set; } = 100; |
|||
} |
|||
public static int AllowedIdentityTokenSigningAlgorithms { get; set; } = 100; |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientCorsOriginConsts |
|||
{ |
|||
public class ClientCorsOriginConsts |
|||
{ |
|||
public static int OriginMaxLength { get; set; } = 150; |
|||
} |
|||
public static int OriginMaxLength { get; set; } = 150; |
|||
} |
|||
|
|||
@ -1,84 +1,83 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
[Serializable] |
|||
public class ClientEto |
|||
{ |
|||
[Serializable] |
|||
public class ClientEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public string ClientId { get; set; } |
|||
public string ClientId { get; set; } |
|||
|
|||
public string ClientName { get; set; } |
|||
public string ClientName { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
public string Description { get; set; } |
|||
|
|||
public string ClientUri { get; set; } |
|||
public string ClientUri { get; set; } |
|||
|
|||
public string LogoUri { get; set; } |
|||
public string LogoUri { get; set; } |
|||
|
|||
public bool Enabled { get; set; } = true; |
|||
public bool Enabled { get; set; } = true; |
|||
|
|||
public string ProtocolType { get; set; } |
|||
public string ProtocolType { get; set; } |
|||
|
|||
public bool RequireClientSecret { get; set; } |
|||
public bool RequireClientSecret { get; set; } |
|||
|
|||
public bool RequireConsent { get; set; } |
|||
public bool RequireConsent { get; set; } |
|||
|
|||
public bool AllowRememberConsent { get; set; } |
|||
public bool AllowRememberConsent { get; set; } |
|||
|
|||
public bool AlwaysIncludeUserClaimsInIdToken { get; set; } |
|||
public bool AlwaysIncludeUserClaimsInIdToken { get; set; } |
|||
|
|||
public bool RequirePkce { get; set; } |
|||
public bool RequirePkce { get; set; } |
|||
|
|||
public bool AllowPlainTextPkce { get; set; } |
|||
public bool AllowPlainTextPkce { get; set; } |
|||
|
|||
public bool AllowAccessTokensViaBrowser { get; set; } |
|||
public bool AllowAccessTokensViaBrowser { get; set; } |
|||
|
|||
public string FrontChannelLogoutUri { get; set; } |
|||
public string FrontChannelLogoutUri { get; set; } |
|||
|
|||
public bool FrontChannelLogoutSessionRequired { get; set; } |
|||
public bool FrontChannelLogoutSessionRequired { get; set; } |
|||
|
|||
public string BackChannelLogoutUri { get; set; } |
|||
public string BackChannelLogoutUri { get; set; } |
|||
|
|||
public bool BackChannelLogoutSessionRequired { get; set; } |
|||
public bool BackChannelLogoutSessionRequired { get; set; } |
|||
|
|||
public bool AllowOfflineAccess { get; set; } |
|||
public bool AllowOfflineAccess { get; set; } |
|||
|
|||
public int IdentityTokenLifetime { get; set; } |
|||
public int IdentityTokenLifetime { get; set; } |
|||
|
|||
public int AccessTokenLifetime { get; set; } |
|||
public int AccessTokenLifetime { get; set; } |
|||
|
|||
public int AuthorizationCodeLifetime { get; set; } |
|||
public int AuthorizationCodeLifetime { get; set; } |
|||
|
|||
public int? ConsentLifetime { get; set; } |
|||
public int? ConsentLifetime { get; set; } |
|||
|
|||
public int AbsoluteRefreshTokenLifetime { get; set; } |
|||
public int AbsoluteRefreshTokenLifetime { get; set; } |
|||
|
|||
public int SlidingRefreshTokenLifetime { get; set; } |
|||
public int SlidingRefreshTokenLifetime { get; set; } |
|||
|
|||
public int RefreshTokenUsage { get; set; } |
|||
public int RefreshTokenUsage { get; set; } |
|||
|
|||
public bool UpdateAccessTokenClaimsOnRefresh { get; set; } |
|||
public bool UpdateAccessTokenClaimsOnRefresh { get; set; } |
|||
|
|||
public int RefreshTokenExpiration { get; set; } |
|||
public int RefreshTokenExpiration { get; set; } |
|||
|
|||
public int AccessTokenType { get; set; } |
|||
public int AccessTokenType { get; set; } |
|||
|
|||
public bool EnableLocalLogin { get; set; } |
|||
public bool EnableLocalLogin { get; set; } |
|||
|
|||
public bool IncludeJwtId { get; set; } |
|||
public bool IncludeJwtId { get; set; } |
|||
|
|||
public bool AlwaysSendClientClaims { get; set; } |
|||
public bool AlwaysSendClientClaims { get; set; } |
|||
|
|||
public string ClientClaimsPrefix { get; set; } |
|||
public string ClientClaimsPrefix { get; set; } |
|||
|
|||
public string PairWiseSubjectSalt { get; set; } |
|||
public string PairWiseSubjectSalt { get; set; } |
|||
|
|||
public int? UserSsoLifetime { get; set; } |
|||
public int? UserSsoLifetime { get; set; } |
|||
|
|||
public string UserCodeType { get; set; } |
|||
public string UserCodeType { get; set; } |
|||
|
|||
public int DeviceCodeLifetime { get; set; } |
|||
} |
|||
} |
|||
public int DeviceCodeLifetime { get; set; } |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientGrantTypeConsts |
|||
{ |
|||
public class ClientGrantTypeConsts |
|||
{ |
|||
public static int GrantTypeMaxLength { get; set; } = 250; |
|||
} |
|||
public static int GrantTypeMaxLength { get; set; } = 250; |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientIdPRestrictionConsts |
|||
{ |
|||
public class ClientIdPRestrictionConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int ProviderMaxLength { get; set; } = 200; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int ProviderMaxLength { get; set; } = 200; |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientPostLogoutRedirectUriConsts |
|||
{ |
|||
public class ClientPostLogoutRedirectUriConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int PostLogoutRedirectUriMaxLength { get; set; } = 2000; |
|||
public static int PostLogoutRedirectUriMaxLengthValue { get; set; } = 2000; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int PostLogoutRedirectUriMaxLength { get; set; } = 2000; |
|||
public static int PostLogoutRedirectUriMaxLengthValue { get; set; } = 2000; |
|||
} |
|||
|
|||
@ -1,15 +1,14 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientPropertyConsts |
|||
{ |
|||
public class ClientPropertyConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 250
|
|||
/// </summary>
|
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 2000
|
|||
/// </summary>
|
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 250
|
|||
/// </summary>
|
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 2000
|
|||
/// </summary>
|
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientRedirectUriConsts |
|||
{ |
|||
public class ClientRedirectUriConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 2000
|
|||
/// </summary>
|
|||
public static int RedirectUriMaxLength { get; set; } = 2000; |
|||
public static int RedirectUriMaxLengthValue { get; set; } = 2000; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 2000
|
|||
/// </summary>
|
|||
public static int RedirectUriMaxLength { get; set; } = 2000; |
|||
public static int RedirectUriMaxLengthValue { get; set; } = 2000; |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientScopeConsts |
|||
{ |
|||
public class ClientScopeConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int ScopeMaxLength { get; set; } = 200; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int ScopeMaxLength { get; set; } = 200; |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
namespace Volo.Abp.IdentityServer.Clients |
|||
namespace Volo.Abp.IdentityServer.Clients; |
|||
|
|||
public class ClientSecretConsts |
|||
{ |
|||
public class ClientSecretConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 250
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 250; |
|||
/// <summary>
|
|||
/// Default value: 250
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 250; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 4000
|
|||
/// </summary>
|
|||
public static int ValueMaxLength { get; set; } = 4000; |
|||
/// <summary>
|
|||
/// Default value: 4000
|
|||
/// </summary>
|
|||
public static int ValueMaxLength { get; set; } = 4000; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 2000
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 2000; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 2000
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 2000; |
|||
} |
|||
|
|||
@ -1,19 +1,18 @@ |
|||
namespace Volo.Abp.IdentityServer.Devices |
|||
namespace Volo.Abp.IdentityServer.Devices; |
|||
|
|||
public class DeviceFlowCodesConsts |
|||
{ |
|||
public class DeviceFlowCodesConsts |
|||
{ |
|||
public static int DeviceCodeMaxLength { get; set; } = 200; |
|||
public static int DeviceCodeMaxLength { get; set; } = 200; |
|||
|
|||
public static int UserCodeMaxLength { get; set; } = 200; |
|||
public static int UserCodeMaxLength { get; set; } = 200; |
|||
|
|||
public static int SubjectIdMaxLength { get; set; } = 200; |
|||
public static int SubjectIdMaxLength { get; set; } = 200; |
|||
|
|||
public static int SessionIdMaxLength { get; set; } = 100; |
|||
public static int SessionIdMaxLength { get; set; } = 100; |
|||
|
|||
public static int DescriptionMaxLength { get; set; } = 200; |
|||
public static int DescriptionMaxLength { get; set; } = 200; |
|||
|
|||
public static int ClientIdMaxLength { get; set; } = 200; |
|||
public static int ClientIdMaxLength { get; set; } = 200; |
|||
|
|||
public static int DataMaxLength { get; set; } = 50000; |
|||
} |
|||
public static int DataMaxLength { get; set; } = 50000; |
|||
} |
|||
|
|||
@ -1,26 +1,25 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.IdentityServer.Devices |
|||
namespace Volo.Abp.IdentityServer.Devices; |
|||
|
|||
[Serializable] |
|||
public class DeviceFlowCodesEto |
|||
{ |
|||
[Serializable] |
|||
public class DeviceFlowCodesEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public string DeviceCode { get; set; } |
|||
public string DeviceCode { get; set; } |
|||
|
|||
public string UserCode { get; set; } |
|||
public string UserCode { get; set; } |
|||
|
|||
public string SubjectId { get; set; } |
|||
public string SubjectId { get; set; } |
|||
|
|||
public string SessionId { get; set; } |
|||
public string SessionId { get; set; } |
|||
|
|||
public string ClientId { get; set; } |
|||
public string ClientId { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
public string Description { get; set; } |
|||
|
|||
public DateTime? Expiration { get; set; } |
|||
public DateTime? Expiration { get; set; } |
|||
|
|||
public string Data { get; set; } |
|||
} |
|||
public string Data { get; set; } |
|||
} |
|||
|
|||
@ -1,45 +1,44 @@ |
|||
namespace Volo.Abp.IdentityServer.Grants |
|||
namespace Volo.Abp.IdentityServer.Grants; |
|||
|
|||
public class PersistedGrantConsts |
|||
{ |
|||
public class PersistedGrantConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int KeyMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 50
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 50; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int SubjectIdMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 100
|
|||
/// </summary>
|
|||
public static int SessionIdMaxLength { get; set; } = 100; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int ClientIdMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 50000
|
|||
/// </summary>
|
|||
public static int DataMaxLength { get; set; } = 50000; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 50000
|
|||
/// </summary>
|
|||
public static int DataMaxLengthValue { get; set; } = 50000; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int KeyMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 50
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 50; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int SubjectIdMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 100
|
|||
/// </summary>
|
|||
public static int SessionIdMaxLength { get; set; } = 100; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int ClientIdMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 50000
|
|||
/// </summary>
|
|||
public static int DataMaxLength { get; set; } = 50000; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 50000
|
|||
/// </summary>
|
|||
public static int DataMaxLengthValue { get; set; } = 50000; |
|||
} |
|||
|
|||
@ -1,24 +1,23 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.IdentityServer.Grants |
|||
namespace Volo.Abp.IdentityServer.Grants; |
|||
|
|||
[Serializable] |
|||
public class PersistedGrantEto |
|||
{ |
|||
[Serializable] |
|||
public class PersistedGrantEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public string Key { get; set; } |
|||
public string Key { get; set; } |
|||
|
|||
public string Type { get; set; } |
|||
public string Type { get; set; } |
|||
|
|||
public string SubjectId { get; set; } |
|||
public string SubjectId { get; set; } |
|||
|
|||
public string ClientId { get; set; } |
|||
public string ClientId { get; set; } |
|||
|
|||
public DateTime CreationTime { get; set; } |
|||
public DateTime CreationTime { get; set; } |
|||
|
|||
public DateTime? Expiration { get; set; } |
|||
public DateTime? Expiration { get; set; } |
|||
|
|||
public string Data { get; set; } |
|||
} |
|||
} |
|||
public string Data { get; set; } |
|||
} |
|||
|
|||
@ -1,20 +1,19 @@ |
|||
namespace Volo.Abp.IdentityServer.IdentityResources |
|||
namespace Volo.Abp.IdentityServer.IdentityResources; |
|||
|
|||
public class IdentityResourceConsts |
|||
{ |
|||
public class IdentityResourceConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int NameMaxLength { get; set; } = 200; |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int NameMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int DisplayNameMaxLength { get; set; } = 200; |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int DisplayNameMaxLength { get; set; } = 200; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 1000
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 1000
|
|||
/// </summary>
|
|||
public static int DescriptionMaxLength { get; set; } = 1000; |
|||
} |
|||
|
|||
@ -1,24 +1,23 @@ |
|||
using System; |
|||
|
|||
namespace Volo.Abp.IdentityServer.IdentityResources |
|||
namespace Volo.Abp.IdentityServer.IdentityResources; |
|||
|
|||
[Serializable] |
|||
public class IdentityResourceEto |
|||
{ |
|||
[Serializable] |
|||
public class IdentityResourceEto |
|||
{ |
|||
public Guid Id { get; set; } |
|||
public Guid Id { get; set; } |
|||
|
|||
public string Name { get; set; } |
|||
public string Name { get; set; } |
|||
|
|||
public string DisplayName { get; set; } |
|||
public string DisplayName { get; set; } |
|||
|
|||
public string Description { get; set; } |
|||
public string Description { get; set; } |
|||
|
|||
public bool Enabled { get; set; } |
|||
public bool Enabled { get; set; } |
|||
|
|||
public bool Required { get; set; } |
|||
public bool Required { get; set; } |
|||
|
|||
public bool Emphasize { get; set; } |
|||
public bool Emphasize { get; set; } |
|||
|
|||
public bool ShowInDiscoveryDocument { get; set; } |
|||
} |
|||
} |
|||
public bool ShowInDiscoveryDocument { get; set; } |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.IdentityServer.IdentityResources |
|||
namespace Volo.Abp.IdentityServer.IdentityResources; |
|||
|
|||
public class IdentityResourcePropertyConsts |
|||
{ |
|||
public class IdentityResourcePropertyConsts |
|||
{ |
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
public static int KeyMaxLength { get; set; } = 250; |
|||
|
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
public static int ValueMaxLength { get; set; } = 2000; |
|||
} |
|||
|
|||
@ -1,19 +1,18 @@ |
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public class IdentityServerSecurityLogActionConsts |
|||
{ |
|||
public class IdentityServerSecurityLogActionConsts |
|||
{ |
|||
public static string LoginSucceeded { get; set; } = "LoginSucceeded"; |
|||
public static string LoginSucceeded { get; set; } = "LoginSucceeded"; |
|||
|
|||
public static string LoginLockedout { get; set; } = "LoginLockedout"; |
|||
public static string LoginLockedout { get; set; } = "LoginLockedout"; |
|||
|
|||
public static string LoginNotAllowed { get; set; } = "LoginNotAllowed"; |
|||
public static string LoginNotAllowed { get; set; } = "LoginNotAllowed"; |
|||
|
|||
public static string LoginRequiresTwoFactor { get; set; } = "LoginRequiresTwoFactor"; |
|||
public static string LoginRequiresTwoFactor { get; set; } = "LoginRequiresTwoFactor"; |
|||
|
|||
public static string LoginFailed { get; set; } = "LoginFailed"; |
|||
public static string LoginFailed { get; set; } = "LoginFailed"; |
|||
|
|||
public static string LoginInvalidUserName { get; set; } = "LoginInvalidUserName"; |
|||
public static string LoginInvalidUserName { get; set; } = "LoginInvalidUserName"; |
|||
|
|||
public static string LoginInvalidUserNameOrPassword { get; set; } = "LoginInvalidUserNameOrPassword"; |
|||
} |
|||
public static string LoginInvalidUserNameOrPassword { get; set; } = "LoginInvalidUserNameOrPassword"; |
|||
} |
|||
|
|||
@ -1,7 +1,6 @@ |
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public class IdentityServerSecurityLogIdentityConsts |
|||
{ |
|||
public class IdentityServerSecurityLogIdentityConsts |
|||
{ |
|||
public static string IdentityServer { get; set; } = "IdentityServer"; |
|||
} |
|||
public static string IdentityServer { get; set; } = "IdentityServer"; |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
using Volo.Abp.Localization; |
|||
|
|||
|
|||
namespace Volo.Abp.IdentityServer.Localization |
|||
namespace Volo.Abp.IdentityServer.Localization; |
|||
|
|||
[LocalizationResourceName("AbpIdentityServer")] |
|||
public class AbpIdentityServerResource |
|||
{ |
|||
[LocalizationResourceName("AbpIdentityServer")] |
|||
public class AbpIdentityServerResource |
|||
{ |
|||
} |
|||
} |
|||
|
|||
@ -1,10 +1,9 @@ |
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public class UserClaimConsts |
|||
{ |
|||
public class UserClaimConsts |
|||
{ |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 200; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Default value: 200
|
|||
/// </summary>
|
|||
public static int TypeMaxLength { get; set; } = 200; |
|||
} |
|||
|
|||
@ -1,44 +1,43 @@ |
|||
using System; |
|||
using Volo.Abp.ObjectExtending.Modularity; |
|||
|
|||
namespace Volo.Abp.ObjectExtending |
|||
namespace Volo.Abp.ObjectExtending; |
|||
|
|||
public class IdentityServerModuleExtensionConfiguration : ModuleExtensionConfiguration |
|||
{ |
|||
public class IdentityServerModuleExtensionConfiguration : ModuleExtensionConfiguration |
|||
public IdentityServerModuleExtensionConfiguration ConfigureClient( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
public IdentityServerModuleExtensionConfiguration ConfigureClient( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.Client, |
|||
configureAction |
|||
); |
|||
} |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.Client, |
|||
configureAction |
|||
); |
|||
} |
|||
|
|||
public IdentityServerModuleExtensionConfiguration ConfigureApiResource( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.ApiResource, |
|||
configureAction |
|||
); |
|||
} |
|||
public IdentityServerModuleExtensionConfiguration ConfigureApiResource( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.ApiResource, |
|||
configureAction |
|||
); |
|||
} |
|||
|
|||
public IdentityServerModuleExtensionConfiguration ConfigureApiScope( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.ApiScope, |
|||
configureAction |
|||
); |
|||
} |
|||
public IdentityServerModuleExtensionConfiguration ConfigureApiScope( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.ApiScope, |
|||
configureAction |
|||
); |
|||
} |
|||
|
|||
public IdentityServerModuleExtensionConfiguration ConfigureIdentityResource( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.IdentityResource, |
|||
configureAction |
|||
); |
|||
} |
|||
public IdentityServerModuleExtensionConfiguration ConfigureIdentityResource( |
|||
Action<EntityExtensionConfiguration> configureAction) |
|||
{ |
|||
return this.ConfigureEntity( |
|||
IdentityServerModuleExtensionConsts.EntityNames.IdentityResource, |
|||
configureAction |
|||
); |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,17 @@ |
|||
using System; |
|||
using Volo.Abp.ObjectExtending.Modularity; |
|||
|
|||
namespace Volo.Abp.ObjectExtending |
|||
namespace Volo.Abp.ObjectExtending; |
|||
|
|||
public static class IdentityServerModuleExtensionConfigurationDictionaryExtensions |
|||
{ |
|||
public static class IdentityServerModuleExtensionConfigurationDictionaryExtensions |
|||
public static ModuleExtensionConfigurationDictionary ConfigureIdentityServer( |
|||
this ModuleExtensionConfigurationDictionary modules, |
|||
Action<IdentityServerModuleExtensionConfiguration> configureAction) |
|||
{ |
|||
public static ModuleExtensionConfigurationDictionary ConfigureIdentityServer( |
|||
this ModuleExtensionConfigurationDictionary modules, |
|||
Action<IdentityServerModuleExtensionConfiguration> configureAction) |
|||
{ |
|||
return modules.ConfigureModule( |
|||
IdentityServerModuleExtensionConsts.ModuleName, |
|||
configureAction |
|||
); |
|||
} |
|||
return modules.ConfigureModule( |
|||
IdentityServerModuleExtensionConsts.ModuleName, |
|||
configureAction |
|||
); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,18 +1,17 @@ |
|||
namespace Volo.Abp.ObjectExtending |
|||
namespace Volo.Abp.ObjectExtending; |
|||
|
|||
public static class IdentityServerModuleExtensionConsts |
|||
{ |
|||
public static class IdentityServerModuleExtensionConsts |
|||
{ |
|||
public const string ModuleName = "IdentityServer"; |
|||
public const string ModuleName = "IdentityServer"; |
|||
|
|||
public static class EntityNames |
|||
{ |
|||
public const string Client = "Client"; |
|||
public static class EntityNames |
|||
{ |
|||
public const string Client = "Client"; |
|||
|
|||
public const string IdentityResource = "IdentityResource"; |
|||
public const string IdentityResource = "IdentityResource"; |
|||
|
|||
public const string ApiResource = "ApiResource"; |
|||
public const string ApiResource = "ApiResource"; |
|||
|
|||
public const string ApiScope = "ApiScope"; |
|||
} |
|||
public const string ApiScope = "ApiScope"; |
|||
} |
|||
} |
|||
|
|||
@ -1,14 +1,13 @@ |
|||
using System.Collections.Generic; |
|||
|
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public class AbpClaimsServiceOptions |
|||
{ |
|||
public class AbpClaimsServiceOptions |
|||
{ |
|||
public List<string> RequestedClaims { get; } |
|||
public List<string> RequestedClaims { get; } |
|||
|
|||
public AbpClaimsServiceOptions() |
|||
{ |
|||
RequestedClaims = new List<string>(); |
|||
} |
|||
public AbpClaimsServiceOptions() |
|||
{ |
|||
RequestedClaims = new List<string>(); |
|||
} |
|||
} |
|||
|
|||
@ -1,31 +1,30 @@ |
|||
using System.IdentityModel.Tokens.Jwt; |
|||
using Volo.Abp.Security.Claims; |
|||
|
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public class AbpIdentityServerBuilderOptions |
|||
{ |
|||
public class AbpIdentityServerBuilderOptions |
|||
{ |
|||
/// <summary>
|
|||
/// Updates <see cref="JwtSecurityTokenHandler.DefaultInboundClaimTypeMap"/> to be compatible with identity server claims.
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool UpdateJwtSecurityTokenHandlerDefaultInboundClaimTypeMap { get; set; } = true; |
|||
/// <summary>
|
|||
/// Updates <see cref="JwtSecurityTokenHandler.DefaultInboundClaimTypeMap"/> to be compatible with identity server claims.
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool UpdateJwtSecurityTokenHandlerDefaultInboundClaimTypeMap { get; set; } = true; |
|||
|
|||
/// <summary>
|
|||
/// Updates <see cref="AbpClaimTypes"/> to be compatible with identity server claims.
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool UpdateAbpClaimTypes { get; set; } = true; |
|||
/// <summary>
|
|||
/// Updates <see cref="AbpClaimTypes"/> to be compatible with identity server claims.
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool UpdateAbpClaimTypes { get; set; } = true; |
|||
|
|||
/// <summary>
|
|||
/// Integrate to AspNet Identity.
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool IntegrateToAspNetIdentity { get; set; } = true; |
|||
/// <summary>
|
|||
/// Integrate to AspNet Identity.
|
|||
/// Default: true.
|
|||
/// </summary>
|
|||
public bool IntegrateToAspNetIdentity { get; set; } = true; |
|||
|
|||
/// <summary>
|
|||
/// Set false to suppress AddDeveloperSigningCredential() call on the IIdentityServerBuilder.
|
|||
/// </summary>
|
|||
public bool AddDeveloperSigningCredential { get; set; } = true; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Set false to suppress AddDeveloperSigningCredential() call on the IIdentityServerBuilder.
|
|||
/// </summary>
|
|||
public bool AddDeveloperSigningCredential { get; set; } = true; |
|||
} |
|||
|
|||
@ -1,11 +1,10 @@ |
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public static class AbpIdentityServerDbProperties |
|||
{ |
|||
public static class AbpIdentityServerDbProperties |
|||
{ |
|||
public static string DbTablePrefix { get; set; } = "IdentityServer"; |
|||
public static string DbTablePrefix { get; set; } = "IdentityServer"; |
|||
|
|||
public static string DbSchema { get; set; } = null; |
|||
public static string DbSchema { get; set; } = null; |
|||
|
|||
public const string ConnectionStringName = "AbpIdentityServer"; |
|||
} |
|||
public const string ConnectionStringName = "AbpIdentityServer"; |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public class AllowedCorsOriginsCacheItem |
|||
{ |
|||
public class AllowedCorsOriginsCacheItem |
|||
{ |
|||
public const string AllOrigins = "AllOrigins"; |
|||
public const string AllOrigins = "AllOrigins"; |
|||
|
|||
public string[] AllowedOrigins { get; set; } |
|||
} |
|||
} |
|||
public string[] AllowedOrigins { get; set; } |
|||
} |
|||
|
|||
@ -1,31 +1,30 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.IdentityServer.ApiResources |
|||
namespace Volo.Abp.IdentityServer.ApiResources; |
|||
|
|||
public class ApiResourceClaim : UserClaim |
|||
{ |
|||
public class ApiResourceClaim : UserClaim |
|||
{ |
|||
public virtual Guid ApiResourceId { get; set; } |
|||
public virtual Guid ApiResourceId { get; set; } |
|||
|
|||
protected ApiResourceClaim() |
|||
{ |
|||
protected ApiResourceClaim() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
public virtual bool Equals(Guid apiResourceId, [NotNull] string type) |
|||
{ |
|||
return ApiResourceId == apiResourceId && Type == type; |
|||
} |
|||
public virtual bool Equals(Guid apiResourceId, [NotNull] string type) |
|||
{ |
|||
return ApiResourceId == apiResourceId && Type == type; |
|||
} |
|||
|
|||
protected internal ApiResourceClaim(Guid apiResourceId, [NotNull] string type) |
|||
: base(type) |
|||
{ |
|||
ApiResourceId = apiResourceId; |
|||
} |
|||
protected internal ApiResourceClaim(Guid apiResourceId, [NotNull] string type) |
|||
: base(type) |
|||
{ |
|||
ApiResourceId = apiResourceId; |
|||
} |
|||
|
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] {ApiResourceId, Type}; |
|||
} |
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { ApiResourceId, Type }; |
|||
} |
|||
} |
|||
|
|||
@ -1,31 +1,30 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.IdentityServer.ApiScopes |
|||
namespace Volo.Abp.IdentityServer.ApiScopes; |
|||
|
|||
public class ApiScopeClaim : UserClaim |
|||
{ |
|||
public class ApiScopeClaim : UserClaim |
|||
{ |
|||
public Guid ApiScopeId { get; protected set; } |
|||
public Guid ApiScopeId { get; protected set; } |
|||
|
|||
protected ApiScopeClaim() |
|||
{ |
|||
protected ApiScopeClaim() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
public virtual bool Equals(Guid apiScopeId, [NotNull] string type) |
|||
{ |
|||
return ApiScopeId == apiScopeId && Type == type; |
|||
} |
|||
public virtual bool Equals(Guid apiScopeId, [NotNull] string type) |
|||
{ |
|||
return ApiScopeId == apiScopeId && Type == type; |
|||
} |
|||
|
|||
protected internal ApiScopeClaim(Guid apiScopeId, [NotNull] string type) |
|||
: base(type) |
|||
{ |
|||
ApiScopeId = apiScopeId; |
|||
} |
|||
protected internal ApiScopeClaim(Guid apiScopeId, [NotNull] string type) |
|||
: base(type) |
|||
{ |
|||
ApiScopeId = apiScopeId; |
|||
} |
|||
|
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { ApiScopeId, Type }; |
|||
} |
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { ApiScopeId, Type }; |
|||
} |
|||
} |
|||
|
|||
@ -1,37 +1,36 @@ |
|||
using Microsoft.AspNetCore.Identity; |
|||
|
|||
namespace Volo.Abp.IdentityServer.AspNetIdentity |
|||
namespace Volo.Abp.IdentityServer.AspNetIdentity; |
|||
|
|||
public static class SignInResultExtensions |
|||
{ |
|||
public static class SignInResultExtensions |
|||
public static string ToIdentitySecurityLogAction(this SignInResult result) |
|||
{ |
|||
public static string ToIdentitySecurityLogAction(this SignInResult result) |
|||
if (result.Succeeded) |
|||
{ |
|||
if (result.Succeeded) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginSucceeded; |
|||
} |
|||
|
|||
if (result.IsLockedOut) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginLockedout; |
|||
} |
|||
return IdentityServerSecurityLogActionConsts.LoginSucceeded; |
|||
} |
|||
|
|||
if (result.RequiresTwoFactor) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginRequiresTwoFactor; |
|||
} |
|||
if (result.IsLockedOut) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginLockedout; |
|||
} |
|||
|
|||
if (result.IsNotAllowed) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginNotAllowed; |
|||
} |
|||
if (result.RequiresTwoFactor) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginRequiresTwoFactor; |
|||
} |
|||
|
|||
if (!result.Succeeded) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginFailed; |
|||
} |
|||
if (result.IsNotAllowed) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginNotAllowed; |
|||
} |
|||
|
|||
if (!result.Succeeded) |
|||
{ |
|||
return IdentityServerSecurityLogActionConsts.LoginFailed; |
|||
} |
|||
|
|||
return IdentityServerSecurityLogActionConsts.LoginFailed; |
|||
} |
|||
} |
|||
|
|||
@ -1,35 +1,34 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities.Auditing; |
|||
|
|||
namespace Volo.Abp.IdentityServer.Devices |
|||
namespace Volo.Abp.IdentityServer.Devices; |
|||
|
|||
public class DeviceFlowCodes : CreationAuditedAggregateRoot<Guid> |
|||
{ |
|||
public class DeviceFlowCodes : CreationAuditedAggregateRoot<Guid> |
|||
{ |
|||
public virtual string DeviceCode { get; set; } |
|||
public virtual string DeviceCode { get; set; } |
|||
|
|||
public virtual string UserCode { get; set; } |
|||
public virtual string UserCode { get; set; } |
|||
|
|||
public virtual string SubjectId { get; set; } |
|||
public virtual string SubjectId { get; set; } |
|||
|
|||
public virtual string SessionId { get; set; } |
|||
public virtual string SessionId { get; set; } |
|||
|
|||
public virtual string ClientId { get; set; } |
|||
public virtual string ClientId { get; set; } |
|||
|
|||
public virtual string Description { get; set; } |
|||
public virtual string Description { get; set; } |
|||
|
|||
public virtual DateTime? Expiration { get; set; } |
|||
public virtual DateTime? Expiration { get; set; } |
|||
|
|||
public virtual string Data { get; set; } |
|||
public virtual string Data { get; set; } |
|||
|
|||
protected DeviceFlowCodes() |
|||
{ |
|||
protected DeviceFlowCodes() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
public DeviceFlowCodes(Guid id) |
|||
: base(id) |
|||
{ |
|||
public DeviceFlowCodes(Guid id) |
|||
: base(id) |
|||
{ |
|||
|
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,37 +1,36 @@ |
|||
using System; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Volo.Abp.IdentityServer.Grants |
|||
namespace Volo.Abp.IdentityServer.Grants; |
|||
|
|||
public class PersistedGrant : AggregateRoot<Guid> |
|||
{ |
|||
public class PersistedGrant : AggregateRoot<Guid> |
|||
{ |
|||
public virtual string Key { get; set; } |
|||
public virtual string Key { get; set; } |
|||
|
|||
public virtual string Type { get; set; } |
|||
public virtual string Type { get; set; } |
|||
|
|||
public virtual string SubjectId { get; set; } |
|||
public virtual string SubjectId { get; set; } |
|||
|
|||
public virtual string SessionId { get; set; } |
|||
public virtual string SessionId { get; set; } |
|||
|
|||
public virtual string ClientId { get; set; } |
|||
public virtual string ClientId { get; set; } |
|||
|
|||
public virtual string Description { get; set; } |
|||
public virtual string Description { get; set; } |
|||
|
|||
public virtual DateTime CreationTime { get; set; } |
|||
public virtual DateTime CreationTime { get; set; } |
|||
|
|||
public virtual DateTime? Expiration { get; set; } |
|||
public virtual DateTime? Expiration { get; set; } |
|||
|
|||
public virtual DateTime? ConsumedTime { get; set; } |
|||
public virtual DateTime? ConsumedTime { get; set; } |
|||
|
|||
public virtual string Data { get; set; } |
|||
public virtual string Data { get; set; } |
|||
|
|||
protected PersistedGrant() |
|||
{ |
|||
} |
|||
protected PersistedGrant() |
|||
{ |
|||
} |
|||
|
|||
public PersistedGrant(Guid id) |
|||
: base(id) |
|||
{ |
|||
} |
|||
public PersistedGrant(Guid id) |
|||
: base(id) |
|||
{ |
|||
} |
|||
} |
|||
|
|||
@ -1,9 +1,8 @@ |
|||
using System.Threading.Tasks; |
|||
|
|||
namespace Volo.Abp.IdentityServer.IdentityResources |
|||
namespace Volo.Abp.IdentityServer.IdentityResources; |
|||
|
|||
public interface IIdentityResourceDataSeeder |
|||
{ |
|||
public interface IIdentityResourceDataSeeder |
|||
{ |
|||
Task CreateStandardResourcesAsync(); |
|||
} |
|||
} |
|||
Task CreateStandardResourcesAsync(); |
|||
} |
|||
|
|||
@ -1,31 +1,30 @@ |
|||
using System; |
|||
using JetBrains.Annotations; |
|||
|
|||
namespace Volo.Abp.IdentityServer.IdentityResources |
|||
namespace Volo.Abp.IdentityServer.IdentityResources; |
|||
|
|||
public class IdentityResourceClaim : UserClaim |
|||
{ |
|||
public class IdentityResourceClaim : UserClaim |
|||
{ |
|||
public virtual Guid IdentityResourceId { get; set; } |
|||
public virtual Guid IdentityResourceId { get; set; } |
|||
|
|||
protected IdentityResourceClaim() |
|||
{ |
|||
protected IdentityResourceClaim() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
public virtual bool Equals(Guid identityResourceId, [NotNull] string type) |
|||
{ |
|||
return IdentityResourceId == identityResourceId && Type == type; |
|||
} |
|||
public virtual bool Equals(Guid identityResourceId, [NotNull] string type) |
|||
{ |
|||
return IdentityResourceId == identityResourceId && Type == type; |
|||
} |
|||
|
|||
protected internal IdentityResourceClaim(Guid identityResourceId, [NotNull] string type) |
|||
: base(type) |
|||
{ |
|||
IdentityResourceId = identityResourceId; |
|||
} |
|||
protected internal IdentityResourceClaim(Guid identityResourceId, [NotNull] string type) |
|||
: base(type) |
|||
{ |
|||
IdentityResourceId = identityResourceId; |
|||
} |
|||
|
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { IdentityResourceId, Type }; |
|||
} |
|||
public override object[] GetKeys() |
|||
{ |
|||
return new object[] { IdentityResourceId, Type }; |
|||
} |
|||
} |
|||
|
|||
@ -1,27 +1,26 @@ |
|||
using Microsoft.AspNetCore.Authentication; |
|||
using Microsoft.AspNetCore.Builder; |
|||
|
|||
namespace Volo.Abp.IdentityServer.Jwt |
|||
{ |
|||
//TODO: Should we move this to another package..?
|
|||
namespace Volo.Abp.IdentityServer.Jwt; |
|||
|
|||
//TODO: Should we move this to another package..?
|
|||
|
|||
public static class JwtTokenMiddleware |
|||
public static class JwtTokenMiddleware |
|||
{ |
|||
public static IApplicationBuilder UseJwtTokenMiddleware(this IApplicationBuilder app, string schema) |
|||
{ |
|||
public static IApplicationBuilder UseJwtTokenMiddleware(this IApplicationBuilder app, string schema) |
|||
return app.Use(async (ctx, next) => |
|||
{ |
|||
return app.Use(async (ctx, next) => |
|||
if (ctx.User.Identity?.IsAuthenticated != true) |
|||
{ |
|||
if (ctx.User.Identity?.IsAuthenticated != true) |
|||
var result = await ctx.AuthenticateAsync(schema); |
|||
if (result.Succeeded && result.Principal != null) |
|||
{ |
|||
var result = await ctx.AuthenticateAsync(schema); |
|||
if (result.Succeeded && result.Principal != null) |
|||
{ |
|||
ctx.User = result.Principal; |
|||
} |
|||
ctx.User = result.Principal; |
|||
} |
|||
} |
|||
|
|||
await next(); |
|||
}); |
|||
} |
|||
await next(); |
|||
}); |
|||
} |
|||
} |
|||
} |
|||
|
|||
@ -1,37 +1 @@ |
|||
namespace Volo.Abp.IdentityServer.Temp |
|||
{ |
|||
//TODO: Remove!
|
|||
//internal static class IdentityServerConfig
|
|||
//{
|
|||
// public static IEnumerable<ApiResource> GetApiResources()
|
|||
// {
|
|||
// return new List<ApiResource>
|
|||
// {
|
|||
// new ApiResource("api1", "My API")
|
|||
// };
|
|||
// }
|
|||
|
|||
// public static IEnumerable<IdentityServer4.Models.Client> GetClients()
|
|||
// {
|
|||
// return new List<Client>
|
|||
// {
|
|||
// new Client
|
|||
// {
|
|||
// ClientId = "client",
|
|||
|
|||
// // no interactive user, use the clientid/secret for authentication
|
|||
// AllowedGrantTypes = GrantTypes.ClientCredentials,
|
|||
|
|||
// // secret for authentication
|
|||
// ClientSecrets =
|
|||
// {
|
|||
// new IdentityServer4.Models.Secret("secret".Sha256())
|
|||
// },
|
|||
|
|||
// // scopes that client has access to
|
|||
// AllowedScopes = { "api1" }
|
|||
// }
|
|||
// };
|
|||
// }
|
|||
//}
|
|||
} |
|||
namespace Volo.Abp.IdentityServer.Temp; |
|||
|
|||
@ -1,34 +1,33 @@ |
|||
using Volo.Abp.BackgroundWorkers; |
|||
|
|||
namespace Volo.Abp.IdentityServer.Tokens |
|||
namespace Volo.Abp.IdentityServer.Tokens; |
|||
|
|||
public class TokenCleanupOptions |
|||
{ |
|||
public class TokenCleanupOptions |
|||
{ |
|||
/// <summary>
|
|||
/// Default: 3,600,000 ms.
|
|||
/// </summary>
|
|||
public int CleanupPeriod { get; set; } = 3_600_000; |
|||
/// <summary>
|
|||
/// Default: 3,600,000 ms.
|
|||
/// </summary>
|
|||
public int CleanupPeriod { get; set; } = 3_600_000; |
|||
|
|||
/// <summary>
|
|||
/// Default value: 100.
|
|||
/// </summary>
|
|||
public int CleanupBatchSize { get; set; } = 100; |
|||
/// <summary>
|
|||
/// Default value: 100.
|
|||
/// </summary>
|
|||
public int CleanupBatchSize { get; set; } = 100; |
|||
|
|||
/// <summary>
|
|||
/// The number of loop if there are
|
|||
/// more than <see cref="CleanupBatchSize"/> tokens in the database.
|
|||
/// So, if <see cref="CleanupLoopCount"/> is 10 and <see cref="CleanupBatchSize"/> is 100,
|
|||
/// then the cleanup worker will clean 1,000 items in one <see cref="CleanupPeriod"/> at max.
|
|||
///
|
|||
/// Default value: 10.
|
|||
/// </summary>
|
|||
public int CleanupLoopCount { get; set; } = 10; |
|||
/// <summary>
|
|||
/// The number of loop if there are
|
|||
/// more than <see cref="CleanupBatchSize"/> tokens in the database.
|
|||
/// So, if <see cref="CleanupLoopCount"/> is 10 and <see cref="CleanupBatchSize"/> is 100,
|
|||
/// then the cleanup worker will clean 1,000 items in one <see cref="CleanupPeriod"/> at max.
|
|||
///
|
|||
/// Default value: 10.
|
|||
/// </summary>
|
|||
public int CleanupLoopCount { get; set; } = 10; |
|||
|
|||
/// <summary>
|
|||
/// Default value: true.
|
|||
/// If <see cref="AbpBackgroundWorkerOptions.IsEnabled"/> is false,
|
|||
/// this property is ignored and the cleanup worker doesn't work for this application instance.
|
|||
/// </summary>
|
|||
public bool IsCleanupEnabled { get; set; } = true; |
|||
} |
|||
} |
|||
/// <summary>
|
|||
/// Default value: true.
|
|||
/// If <see cref="AbpBackgroundWorkerOptions.IsEnabled"/> is false,
|
|||
/// this property is ignored and the cleanup worker doesn't work for this application instance.
|
|||
/// </summary>
|
|||
public bool IsCleanupEnabled { get; set; } = true; |
|||
} |
|||
|
|||
@ -1,22 +1,21 @@ |
|||
using JetBrains.Annotations; |
|||
using Volo.Abp.Domain.Entities; |
|||
|
|||
namespace Volo.Abp.IdentityServer |
|||
namespace Volo.Abp.IdentityServer; |
|||
|
|||
public abstract class UserClaim : Entity |
|||
{ |
|||
public abstract class UserClaim : Entity |
|||
{ |
|||
public virtual string Type { get; protected set; } |
|||
public virtual string Type { get; protected set; } |
|||
|
|||
protected UserClaim() |
|||
{ |
|||
protected UserClaim() |
|||
{ |
|||
|
|||
} |
|||
} |
|||
|
|||
protected UserClaim([NotNull] string type) |
|||
{ |
|||
Check.NotNull(type, nameof(type)); |
|||
protected UserClaim([NotNull] string type) |
|||
{ |
|||
Check.NotNull(type, nameof(type)); |
|||
|
|||
Type = type; |
|||
} |
|||
Type = type; |
|||
} |
|||
} |
|||
} |
|||
|
|||
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue