mirror of
https://github.com/hargata/lubelog.git
synced 2026-02-03 17:53:02 -06:00
apiKey stuff
This commit is contained in:
parent
1cdfbce0fa
commit
8151747b66
13
External/Interfaces/IApiKeyRecordDataAccess.cs
vendored
Normal file
13
External/Interfaces/IApiKeyRecordDataAccess.cs
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
using CarCareTracker.Models;
|
||||
|
||||
namespace CarCareTracker.External.Interfaces
|
||||
{
|
||||
public interface IApiKeyRecordDataAccess
|
||||
{
|
||||
public List<APIKey> GetAPIKeyRecordsByUserId(int userId);
|
||||
public APIKey GetAPIKeyById(int apiKeyId);
|
||||
public APIKey GetAPIKeyByKey(string hashedKey);
|
||||
public bool CreateNewAPIKey(APIKey apiKey);
|
||||
public bool DeleteAPIKey(int apiKeyId);
|
||||
}
|
||||
}
|
||||
11
Models/API/APIKey.cs
Normal file
11
Models/API/APIKey.cs
Normal file
@ -0,0 +1,11 @@
|
||||
namespace CarCareTracker.Models
|
||||
{
|
||||
public class APIKey
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Key { get; set; }
|
||||
public List<HouseholdPermission> Permissions { get; set; } = new List<HouseholdPermission>();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user