public Token(string username, ITokenStringGenerator tokenStringGenerator, int tokenActiveMinutes = 10) { _tokenString = tokenStringGenerator.GenerateTokenString(); _tokenActiveMinutes = tokenActiveMinutes; _tokenOwner = username; _lastUseDateTime = DateTime.Now; }
public void Setup() { _uut_TSG = new TokenStringGenerator(); _uut_Token = new Token("Joachim", _uut_TSG, 1); _uut_TK = new TokenKeeper(_uut_TSG, 1); }
public TokenKeeper(ITokenStringGenerator tokenStringGenerator, int TokenLifeTimeMinutes) { _tokenStringGenerator = tokenStringGenerator; _tokenLifeTime = TokenLifeTimeMinutes; _removeUnusedCountdown = _tokensCreatedBeforeRemovingUnused; }