add basic suppport for client_credentials oauth grant

This commit is contained in:
sam 2024-05-20 17:00:21 +02:00
parent 049f4a56de
commit 8995213d26
Signed by: sam
GPG key ID: B4EF20DDE721CAA1
20 changed files with 627 additions and 58 deletions

View file

@ -10,8 +10,9 @@ public class Token : BaseModel
public string[] Scopes { get; set; } = [];
public Instant Expires { get; set; }
public Ulid AccountId { get; set; }
public Account Account { get; set; } = null!;
// Tokens can be granted directly to applications with `client_credentials`
public Ulid? AccountId { get; set; }
public Account? Account { get; set; }
public Ulid ApplicationId { get; set; }
public Application Application { get; set; } = null!;