StashApiCSharp icon indicating copy to clipboard operation
StashApiCSharp copied to clipboard

Basic Authentication using SecureString

Open Vejahatf opened this issue 6 years ago • 0 comments

I see that the StashApiCSharp supports basic authentication using string for password . wouldn't it better to add support for SecureString in order to avoid possible risk of exposing sensitive data in managed memory? I was thinking to add a new public HttpCommunicationWorker(string baseUrl, string username, SecureString password) { var httpClientHandler = new HttpClientHandler { Credentials = new NetworkCredential(username, password) };

        _httpClient = new HttpClient(httpClientHandler) {BaseAddress = new Uri(baseUrl)};

    }

Thanks, Frank

Vejahatf avatar Dec 06 '18 21:12 Vejahatf