예제 #1
0
 public void RemoveAuthToken(string token)
 {
     if (_tokenCache.ContainsKey(token))
     {
         _tokenCache.Remove(token);
     }
     else
     {
         BusinessErrors.Add(new BusinessErrorSM(BusinessErrorCodes.DataNotFound, "Token not found"));
     }
 }
예제 #2
0
 public void AddAuthToken(AuthTokenSM authToken)
 {
     if (_tokenCache.ContainsKey(authToken.Token))
     {
         BusinessErrors.Add(new BusinessErrorSM(BusinessErrorCodes.DataAlreadyExists, "Token already exists"));
     }
     else
     {
         _tokenCache.Add(authToken.Token, authToken.Expiry);
     }
 }