Closed micah686 closed 7 years ago
This is an example, that assumes the application is a console window.
The this.GetUsernameAndPassword
method is just a helper method further down in the file that reads the input from the console, while also masking the input (rather poorly) for the password.
The UserAuth directive is due to the fact that by default VndbSharp doesn't build with support for logging in because of security issues.
The issue I'm encountering is that Vndb.cs has a #if UserAuth for the overloaded Vndb(), so if I were to try this._client = new Vndb(username, secureStringPassword)
, it would give an error about Vndb not having 2 overloads.
Yes, because login is disabled by default, you need to provide the UserAuth
defines when compiling VndbSharp to enable the methods that do username/password logins.
@Nikey646 So how would you enable UserAuth on the project when compiling on Visual Studio
In the properties section, under build you add UserAuth
to the Conditional Compilation Symbols textbox.
This appears to be resolved, so i'm going to close it. Feel free to reopen it if you considering otherwise.
Could you please add an example of how you would log into the API? There isn't any example in the Program.cs how you would log into the API. I see that there is a lot of #if UserAuth to check if the user has authenticated, but I can't figure out how you would initially authenticate.