Still working on getting client credential flow complete, most of the request works but still working on generating the JWT.
This commit is contained in:
parent
1a8c63808a
commit
8782ef39c6
80 changed files with 1331 additions and 414 deletions
|
|
@ -1,10 +1,10 @@
|
|||
namespace IdentityShroud.Core.Contracts;
|
||||
|
||||
public class ClientCreateRequest
|
||||
{
|
||||
public required string ClientId { get; set; }
|
||||
public string? Name { get; set; }
|
||||
public string? Description { get; set; }
|
||||
public string? SignatureAlgorithm { get; set; }
|
||||
public bool? AllowClientCredentialsFlow { get; set; }
|
||||
}
|
||||
public record ClientCreateRequest(
|
||||
string ClientId,
|
||||
string? Name = null,
|
||||
string? Description = null,
|
||||
string? SignatureAlgorithm = null,
|
||||
bool Confidential = false,
|
||||
bool AllowClientCredentialsFlow = false,
|
||||
bool GenerateSecret = false);
|
||||
|
|
@ -1,5 +1,6 @@
|
|||
using System.Text.Json.Serialization;
|
||||
using IdentityShroud.Core.Helpers;
|
||||
using IdentityShroud.Core.Security.Keys;
|
||||
|
||||
namespace IdentityShroud.Core.Messages;
|
||||
|
||||
|
|
@ -9,7 +10,7 @@ namespace IdentityShroud.Core.Messages;
|
|||
public class JsonWebKey
|
||||
{
|
||||
[JsonPropertyName("kty")]
|
||||
public string KeyType { get; set; } = "RSA";
|
||||
public required KeyType KeyType { get; set; }
|
||||
|
||||
// Common values sig(nature) enc(ryption)
|
||||
[JsonPropertyName("use")]
|
||||
|
|
|
|||
9
IdentityShroud.Core/DTO/OpenId/GrantTypes.cs
Normal file
9
IdentityShroud.Core/DTO/OpenId/GrantTypes.cs
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace IdentityShroud.Core.DTO.OpenId;
|
||||
|
||||
public enum GrantTypes
|
||||
{
|
||||
[JsonStringEnumMemberName("client_credentials")]
|
||||
ClientCredentials
|
||||
}
|
||||
19
IdentityShroud.Core/DTO/OpenId/TokenResponse.cs
Normal file
19
IdentityShroud.Core/DTO/OpenId/TokenResponse.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace IdentityShroud.Core.Services.OpenId;
|
||||
|
||||
public class TokenResponse
|
||||
{
|
||||
[JsonPropertyName("access_token")]
|
||||
public required string AccessToken { get; set; }
|
||||
|
||||
[JsonPropertyName("token_type")]
|
||||
public required string TokenType { get; set; }
|
||||
|
||||
[JsonPropertyName("expires_in")]
|
||||
public int? ExpiresIn { get; set; }
|
||||
|
||||
[JsonPropertyName("refresh_token")]
|
||||
public string? RefreshToken { get; set; }
|
||||
|
||||
}
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
namespace IdentityShroud.Core.Messages.Realm;
|
||||
|
||||
public record RealmCreateRequest(Guid? Id, string? Slug, string Name);
|
||||
public record RealmCreateRequest(Guid? Id = null, string? Slug = null, string? Name = null);
|
||||
Loading…
Add table
Add a link
Reference in a new issue