Exemplo n.º 1
0
 public void RemoveAuthToken(string token)
 {
     if (_tokenCache.ContainsKey(token))
     {
         _tokenCache.Remove(token);
     }
     else
     {
         BusinessErrors.Add(new BusinessErrorSM(BusinessErrorCodes.DataNotFound, "Token not found"));
     }
 }
Exemplo n.º 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);
     }
 }