2019-02-16 16:04:40 -05:00
|
|
|
|
using SharedLibraryCore.Helpers;
|
2019-02-15 23:19:59 -05:00
|
|
|
|
|
|
|
|
|
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
|
2019-02-15 23:19:59 -05:00
|
|
|
|
/// </summary>
|
2022-06-15 20:37:34 -04:00
|
|
|
|
/// <param name="authInfo">auth information for next token generation</param>
|
2019-02-15 23:19:59 -05:00
|
|
|
|
/// <returns>4 character string token</returns>
|
2022-06-15 20:37:34 -04:00
|
|
|
|
TokenState GenerateNextToken(ITokenIdentifier authInfo);
|
2019-02-15 23:19:59 -05:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
2022-01-26 11:32:16 -05:00
|
|
|
|
/// authorizes given token
|
2019-02-15 23:19:59 -05:00
|
|
|
|
/// </summary>
|
2022-06-15 20:37:34 -04:00
|
|
|
|
/// <param name="authInfo">auth information</param>
|
2019-02-15 23:19:59 -05:00
|
|
|
|
/// <returns>true if token authorized successfully, false otherwise</returns>
|
2022-06-15 20:37:34 -04:00
|
|
|
|
bool AuthorizeToken(ITokenIdentifier authInfo);
|
2019-02-15 23:19:59 -05:00
|
|
|
|
}
|
2022-03-24 12:34:32 -04:00
|
|
|
|
}
|