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.
32 lines
1.0 KiB
32 lines
1.0 KiB
1 year ago
|
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>
|
||
|
/// <returns>A tokenized string</returns>
|
||
|
string GenerateKey(Contract a_clientContract, Databasemap a_database);
|
||
|
/// <summary>
|
||
|
///Returns the API if 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);
|
||
|
}
|
||
|
}
|