You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
1018 B
30 lines
1018 B
using Cloud_Manager.Models.ClientContractModels;
|
|
using Cloud_Manager.Models.Enums;
|
|
|
|
namespace Cloud_Manager.Models.Interfaces
|
|
{
|
|
public interface IKeyService
|
|
{
|
|
/// <summary>
|
|
/// Validates specified API
|
|
/// </summary>
|
|
/// <returns>AuthEnums.Valid if key is a valid and unexpired token</returns>
|
|
AuthEnums ValidateKey(string a_Key);
|
|
|
|
/// <summary>
|
|
/// Generates an API Key based on the specified client
|
|
/// </summary>
|
|
Task<bool> GenerateKey(Contract a_clientContract);
|
|
/// <summary>
|
|
///Returns the database Id if the API Key is valid to return the related database id
|
|
/// </summary>
|
|
/// <param name="a_Key"></param>
|
|
int? GetDatabaseIdFromKey(string a_Key);
|
|
/// <summary>
|
|
/// Gets the branch associated with the specified API if valid
|
|
/// </summary>
|
|
/// <param name="a_Key"></param>
|
|
/// <returns></returns>
|
|
string GetBaseBranch(string a_Key);
|
|
}
|
|
}
|
|
|