IW4M-Admin/SharedLibraryCore/Interfaces/ITokenAuthentication.cs

22 lines
744 B
C#
Raw Normal View History

using SharedLibraryCore.Helpers;
namespace SharedLibraryCore.Interfaces
{
public interface ITokenAuthentication
{
/// <summary>
2022-01-26 11:32:16 -05:00
/// generates and returns a token for the given network id
/// </summary>
/// <param name="authInfo">auth information for next token generation</param>
/// <returns>4 character string token</returns>
TokenState GenerateNextToken(ITokenIdentifier authInfo);
/// <summary>
2022-01-26 11:32:16 -05:00
/// authorizes given token
/// </summary>
/// <param name="authInfo">auth information</param>
/// <returns>true if token authorized successfully, false otherwise</returns>
bool AuthorizeToken(ITokenIdentifier authInfo);
}
}