public void Dispose() { _AuthToken = null; _Claims = null; _CurrentSecretKey = null; _Envelope = null; _RawToken = null; }
public void ValidateAndSplitToken(string authToken) { if (string.IsNullOrWhiteSpace(authToken)) { throw new ArgumentNullException("AuthToken Not Provided"); } _AuthToken = authToken; if (!_AuthToken.Contains(".")) { throw new Exception("AuthToken is Invalid"); } string[] tokenParts = _AuthToken.Split('.'); if (tokenParts.Length != 3 || string.IsNullOrWhiteSpace(tokenParts[0]) || string.IsNullOrWhiteSpace(tokenParts[1]) || string.IsNullOrWhiteSpace(tokenParts[2])) { throw new Exception("AuthToken/Parts of it is Invalid"); } _RawToken = new RawLiveAuthToken(tokenParts[0], tokenParts[1], tokenParts[2]); }