|
|
@ -5,14 +5,14 @@ using IdentityModel; |
|
|
|
|
|
|
|
|
namespace Volo.Abp.IdentityModel; |
|
|
namespace Volo.Abp.IdentityModel; |
|
|
|
|
|
|
|
|
public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
public class IdentityClientConfiguration : Dictionary<string, string?> |
|
|
{ |
|
|
{ |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// Possible values: "client_credentials" or "password".
|
|
|
/// Possible values: "client_credentials" or "password".
|
|
|
/// Default value: "client_credentials".
|
|
|
/// Default value: "client_credentials".
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public string GrantType { |
|
|
public string GrantType { |
|
|
get => this.GetOrDefault(nameof(GrantType)); |
|
|
get => this.GetOrDefault(nameof(GrantType))!; |
|
|
set => this[nameof(GrantType)] = value; |
|
|
set => this[nameof(GrantType)] = value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -20,7 +20,7 @@ public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
/// Client Id.
|
|
|
/// Client Id.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public string ClientId { |
|
|
public string ClientId { |
|
|
get => this.GetOrDefault(nameof(ClientId)); |
|
|
get => this.GetOrDefault(nameof(ClientId))!; |
|
|
set => this[nameof(ClientId)] = value; |
|
|
set => this[nameof(ClientId)] = value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -28,7 +28,7 @@ public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
/// Client secret (as plain text - without hashed).
|
|
|
/// Client secret (as plain text - without hashed).
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public string ClientSecret { |
|
|
public string ClientSecret { |
|
|
get => this.GetOrDefault(nameof(ClientSecret)); |
|
|
get => this.GetOrDefault(nameof(ClientSecret))!; |
|
|
set => this[nameof(ClientSecret)] = value; |
|
|
set => this[nameof(ClientSecret)] = value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -36,7 +36,7 @@ public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
/// User name.
|
|
|
/// User name.
|
|
|
/// Valid only if <see cref="GrantType"/> is "password".
|
|
|
/// Valid only if <see cref="GrantType"/> is "password".
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public string UserName { |
|
|
public string? UserName { |
|
|
get => this.GetOrDefault(nameof(UserName)); |
|
|
get => this.GetOrDefault(nameof(UserName)); |
|
|
set => this[nameof(UserName)] = value; |
|
|
set => this[nameof(UserName)] = value; |
|
|
} |
|
|
} |
|
|
@ -45,7 +45,7 @@ public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
/// Password of the <see cref="UserName"/>.
|
|
|
/// Password of the <see cref="UserName"/>.
|
|
|
/// Valid only if <see cref="GrantType"/> is "password".
|
|
|
/// Valid only if <see cref="GrantType"/> is "password".
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public string UserPassword { |
|
|
public string? UserPassword { |
|
|
get => this.GetOrDefault(nameof(UserPassword)); |
|
|
get => this.GetOrDefault(nameof(UserPassword)); |
|
|
set => this[nameof(UserPassword)] = value; |
|
|
set => this[nameof(UserPassword)] = value; |
|
|
} |
|
|
} |
|
|
@ -54,7 +54,7 @@ public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
/// Authority.
|
|
|
/// Authority.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public string Authority { |
|
|
public string Authority { |
|
|
get => this.GetOrDefault(nameof(Authority)); |
|
|
get => this.GetOrDefault(nameof(Authority))!; |
|
|
set => this[nameof(Authority)] = value; |
|
|
set => this[nameof(Authority)] = value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -62,7 +62,7 @@ public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
/// Scope.
|
|
|
/// Scope.
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
public string Scope { |
|
|
public string Scope { |
|
|
get => this.GetOrDefault(nameof(Scope)); |
|
|
get => this.GetOrDefault(nameof(Scope))!; |
|
|
set => this[nameof(Scope)] = value; |
|
|
set => this[nameof(Scope)] = value; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@ -113,8 +113,8 @@ public class IdentityClientConfiguration : Dictionary<string, string> |
|
|
string clientId, |
|
|
string clientId, |
|
|
string clientSecret, |
|
|
string clientSecret, |
|
|
string grantType = OidcConstants.GrantTypes.ClientCredentials, |
|
|
string grantType = OidcConstants.GrantTypes.ClientCredentials, |
|
|
string userName = null, |
|
|
string? userName = null, |
|
|
string userPassword = null, |
|
|
string? userPassword = null, |
|
|
bool requireHttps = true, |
|
|
bool requireHttps = true, |
|
|
int cacheAbsoluteExpiration = 60 * 30, |
|
|
int cacheAbsoluteExpiration = 60 * 30, |
|
|
bool validateIssuerName = true, |
|
|
bool validateIssuerName = true, |
|
|
|