Adding security
This commit is contained in:
+29
@@ -0,0 +1,29 @@
|
||||
namespace LCU.Library.Internal.ApiSecurity.Constants;
|
||||
|
||||
public static class AuthMessages
|
||||
{
|
||||
private const string AuthFailureMessageTemplate = "Unauthorized client: ";
|
||||
private const string ClientNotFoundMessageTemplate = "Client not found for extracted API Key";
|
||||
private const string EmptyKeySetMessageTemplate = "Empty Key Set: ";
|
||||
private const string NotProvidedMessageTemplate = "Header Not Provided: ";
|
||||
|
||||
public static string AuthFailureMessage(string input)
|
||||
{
|
||||
return $"{AuthFailureMessageTemplate}{input}";
|
||||
}
|
||||
|
||||
public static string ClientNotFoundMessage()
|
||||
{
|
||||
return $"{ClientNotFoundMessageTemplate}";
|
||||
}
|
||||
|
||||
public static string EmptyKeySetMessage(string input)
|
||||
{
|
||||
return $"{EmptyKeySetMessageTemplate}{input}";
|
||||
}
|
||||
|
||||
public static string NotProvidedMessage(string input)
|
||||
{
|
||||
return $"{NotProvidedMessageTemplate}{input}";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
namespace LCU.Library.Internal.ApiSecurity.Constants;
|
||||
|
||||
public static class HeaderKeys
|
||||
{
|
||||
public const string ApiKey = "ApiKey";
|
||||
public const string Client = "Client";
|
||||
}
|
||||
Reference in New Issue
Block a user