-
-
Notifications
You must be signed in to change notification settings - Fork 16
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
Login with clientlogin #1
Comments
yes having a clientlogin, kerberos, or even oAuth would help. For example: the private media wiki is configured by apache to use kerberos authentication. |
However, it seems that the parameters needed by Though it may still be desirable to have some simple As for kerberos, I will add an option in |
Dont we configure passing of credentials on the Http request? I'm not
looking to login as different credential at this time but I see what your
saying.
request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
request.UseDefaultCredentials = true;
can I make that change or when will you add an option in WikiClient to
decide whether to pass the credentials to the server. ?
I have also tried to play with your code some and add the negotiate
ticket on the header but I yet get a un-authorized back from my
kerberos configured apache server.
…On Sun, Mar 5, 2017 at 8:20 AM, Chen ***@***.***> wrote:
However, it seems that the parameters needed by clientlogin varies
greatly from site to site. Some sites may need captcha code; other sites
may need openAuth. It may take considerable effort to build a login
interface covering every situation, which I lack for this year. Thus
perhaps such login routine may need to be implemented by the library
client, using Site.PostValuesAsync methods. After this, the client need
to invoke Site.RefreshUserInfoAsync (Oh, I should have renamed it to
RefreshAccountInfoAsync), and the login procedure will be done.
Though it may still be desirable to have some simple clientlogin patterns
implemented out-of-the-box, like the ones that only need a user name and a
password, which will eliminate MediaWiki's deprecation warning.
As for kerberos, I will add an option in WikiClient to decide whether to
pass the credentials to the server. Unfortunately, there is a bug
<http://stackoverflow.com/questions/12212116/how-to-get-httpclient-to-pass-credentials-along-with-the-request>
in HttpClient with kerberos, when a user want to login with a different
credential.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABNazDp7OZzMqu3QzM3Q0IjqcA4BgFqUks5rirafgaJpZM4JoS66>
.
--
*Bradley McGeary*585-943-8459
|
After reading the bug referenced by you it appears we need to use WebClient
instead of HttpClient ?
…On Mon, Mar 6, 2017 at 9:29 AM, Bradley McGeary ***@***.***> wrote:
Dont we configure passing of credentials on the Http request? I'm not
looking to login as different credential at this time but I see what your
saying.
request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
request.UseDefaultCredentials = true;
can I make that change or when will you add an option in WikiClient to decide whether to pass the credentials to the server. ?
I have also tried to play with your code some and add the negotiate ticket on the header but I yet get a un-authorized back from my kerberos configured apache server.
On Sun, Mar 5, 2017 at 8:20 AM, Chen ***@***.***> wrote:
> However, it seems that the parameters needed by clientlogin varies
> greatly from site to site. Some sites may need captcha code; other sites
> may need openAuth. It may take considerable effort to build a login
> interface covering every situation, which I lack for this year. Thus
> perhaps such login routine may need to be implemented by the library
> client, using Site.PostValuesAsync methods. After this, the client need
> to invoke Site.RefreshUserInfoAsync (Oh, I should have renamed it to
> RefreshAccountInfoAsync), and the login procedure will be done.
>
> Though it may still be desirable to have some simple clientlogin
> patterns implemented out-of-the-box, like the ones that only need a user
> name and a password, which will eliminate MediaWiki's deprecation warning.
>
> As for kerberos, I will add an option in WikiClient to decide whether to
> pass the credentials to the server. Unfortunately, there is a bug
> <http://stackoverflow.com/questions/12212116/how-to-get-httpclient-to-pass-credentials-along-with-the-request>
> in HttpClient with kerberos, when a user want to login with a different
> credential.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#1 (comment)>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/ABNazDp7OZzMqu3QzM3Q0IjqcA4BgFqUks5rirafgaJpZM4JoS66>
> .
>
--
*Bradley McGeary*585-943-8459 <(585)%20943-8459>
--
*Bradley McGeary*585-943-8459
|
Have you ever ran into the error message : The following parameters were
found in the query string, but must be in the POST body: token" when trying
to use the API to edit a media wiki page?
When I add the token as a form param I get bad token.
…On Mon, Mar 6, 2017 at 9:41 AM, Bradley McGeary ***@***.***> wrote:
After reading the bug referenced by you it appears we need to use
WebClient instead of HttpClient ?
On Mon, Mar 6, 2017 at 9:29 AM, Bradley McGeary ***@***.***> wrote:
> Dont we configure passing of credentials on the Http request? I'm not
> looking to login as different credential at this time but I see what your
> saying.
>
> request.Proxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
> request.UseDefaultCredentials = true;
>
> can I make that change or when will you add an option in WikiClient to decide whether to pass the credentials to the server. ?
>
> I have also tried to play with your code some and add the negotiate ticket on the header but I yet get a un-authorized back from my kerberos configured apache server.
>
>
> On Sun, Mar 5, 2017 at 8:20 AM, Chen ***@***.***> wrote:
>
>> However, it seems that the parameters needed by clientlogin varies
>> greatly from site to site. Some sites may need captcha code; other sites
>> may need openAuth. It may take considerable effort to build a login
>> interface covering every situation, which I lack for this year. Thus
>> perhaps such login routine may need to be implemented by the library
>> client, using Site.PostValuesAsync methods. After this, the client need
>> to invoke Site.RefreshUserInfoAsync (Oh, I should have renamed it to
>> RefreshAccountInfoAsync), and the login procedure will be done.
>>
>> Though it may still be desirable to have some simple clientlogin
>> patterns implemented out-of-the-box, like the ones that only need a user
>> name and a password, which will eliminate MediaWiki's deprecation warning.
>>
>> As for kerberos, I will add an option in WikiClient to decide whether
>> to pass the credentials to the server. Unfortunately, there is a bug
>> <http://stackoverflow.com/questions/12212116/how-to-get-httpclient-to-pass-credentials-along-with-the-request>
>> in HttpClient with kerberos, when a user want to login with a different
>> credential.
>>
>> —
>> You are receiving this because you commented.
>> Reply to this email directly, view it on GitHub
>> <#1 (comment)>,
>> or mute the thread
>> <https://github.com/notifications/unsubscribe-auth/ABNazDp7OZzMqu3QzM3Q0IjqcA4BgFqUks5rirafgaJpZM4JoS66>
>> .
>>
>
>
>
> --
>
> *Bradley McGeary*585-943-8459 <(585)%20943-8459>
>
--
*Bradley McGeary*585-943-8459 <(585)%20943-8459>
--
*Bradley McGeary*585-943-8459
|
I have exposed some credential-related properties in You can set up your own var client = new WikiClient(youHandler, true); As for the question on SO, frankly I haven't done much research on I'm also considering extract a base class from p.s. On which version of .NET framework are you using? I'm just curious ;-) Also, please note that this project is still in version 0.x, and the public interface may change in later versions. |
As for the token problem… Well, I haven't come across that before. Please open an issue and provide some more information on it, including your MediaWiki version, and the stack trace. Thank you! |
And
I think this module is just intended for human, and the client library should just query for the available fields, and gives it directly back to the client application, which will in turn shows them to the human user. Wish me good luck. Before that, you may either generate bot password for your bots, or continue using |
This library aims to provide functionality for both bots and users, so it's important, especially in the future, to implement
clientlogin
action.See https://www.mediawiki.org/wiki/API:Login#The_clientlogin_action .
The text was updated successfully, but these errors were encountered: