IW4M-Admin/SharedLibraryCore/Interfaces/ITokenAuthentication.cs
RaidMax 40f1697c97 fix damage event not including log line
complete initiall implementation for "2FA"
issue #52
issue #66
2019-02-16 15:04:40 -06:00

25 lines
804 B
C#

using SharedLibraryCore.Helpers;
using System;
using System.Collections.Generic;
using System.Text;
namespace SharedLibraryCore.Interfaces
{
public interface ITokenAuthentication
{
/// <summary>
/// generates and returns a token for the given network id
/// </summary>
/// <param name="networkId">network id of the players to generate the token for</param>
/// <returns>4 character string token</returns>
TokenState GenerateNextToken(long networkId);
/// <summary>
/// authorizes given token
/// </summary>
/// <param name="token">token to authorize</param>
/// <returns>true if token authorized successfully, false otherwise</returns>
bool AuthorizeToken(long networkId, string token);
}
}