-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GoogleWebAuthorizationBroker and FileDataStore on NetStandard #962
Conversation
Integration tests pass on:
I haven't tested on Linux Core yet, but will before merging. |
{ | ||
var stream = client.GetStream(); | ||
|
||
var buffer = new byte[1]; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Would this also fix #941 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly fine, but several comments :)
/// The reason that this is not 'private const' is that a user can change it and store the credentials in a | ||
/// different location. | ||
/// </remarks> | ||
public static string Folder = "Google.Apis.Auth"; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
return redirectUri; | ||
} | ||
|
||
return redirectUri = string.Format(LoopbackCallback, GetRandomUnusedPort()); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Port = ((IPEndPoint)_listener.LocalEndpoint).Port; | ||
} | ||
|
||
private TcpListener _listener; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
catch (ServerException e) | ||
{ | ||
Logger.Warning("{0}", e.Message); | ||
throw e; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
{ | ||
try | ||
{ | ||
return await GetQueryParamsFromClientAsync(client, ct); |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
throw new ServerException("Unexpected end of network stream waiting for headers."); | ||
} | ||
c0 = c1; | ||
c1 = (char)b; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
// Looking for an empty line, terminated by \r\n | ||
int byteCount = 0; | ||
int lineLength = 0; | ||
char c0 = (char)0; |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
/// </summary> | ||
/// <param name="folder">Folder path.</param> | ||
/// <param name="fullPath"> | ||
/// Defines weather the folder parameter is absolute or relative to |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
string path = | ||
Environment.GetEnvironmentVariable("APPDATA") ?? // Windows | ||
Environment.GetEnvironmentVariable("HOME"); // Linux, MacOS | ||
if (path == "") |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
{ | ||
string path = | ||
Environment.GetEnvironmentVariable("APPDATA") ?? // Windows | ||
Environment.GetEnvironmentVariable("HOME"); // Linux, MacOS |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further change to support ISO-8859-1 just in case coming, as discussed offline - otherwise fine.
@sguergachi This partially fixes #941, in that there is now a |
Fixes #897