예제 #1
0
파일: Token.cs 프로젝트: joachimda/I4PRJ
 public Token(string username, ITokenStringGenerator tokenStringGenerator, int tokenActiveMinutes = 10)
 {
     _tokenString = tokenStringGenerator.GenerateTokenString();
     _tokenActiveMinutes = tokenActiveMinutes;
     _tokenOwner = username;
     _lastUseDateTime = DateTime.Now;
 }
예제 #2
0
 public void Setup()
 {
     _uut_TSG = new TokenStringGenerator();
     _uut_Token = new Token("Joachim", _uut_TSG, 1);
     _uut_TK = new TokenKeeper(_uut_TSG, 1);
 }
예제 #3
0
 public TokenKeeper(ITokenStringGenerator tokenStringGenerator, int TokenLifeTimeMinutes)
 {
     _tokenStringGenerator = tokenStringGenerator;
     _tokenLifeTime = TokenLifeTimeMinutes;
     _removeUnusedCountdown = _tokensCreatedBeforeRemovingUnused;
 }