[03:20:58] Krinkle : How can I use MediaWiki API to change the logged in users password? [03:20:58] There is https://www.mediawiki.org/wiki/API:Resetpassword , but that sends reset email, not changing password like through preferences [05:39:59] Naleksuh: changeauthenticationdata [05:40:17] Yeah I looked at that but it looked like it just changed other stuff [05:40:46] Oh yeah, I need to get a `changeauthrequest` and I couldn't find anything that related to the user password [05:41:01] the example is [05:41:12] 'action=changeauthenticationdata' . [05:41:12] '&changeauthrequest=MediaWiki%5CAuth%5CPasswordAuthenticationRequest' . [05:41:12] '&password=ExamplePassword&retype=ExamplePassword&changeauthtoken=123ABC' [05:42:01] But I need one of these first, right? https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bauthmanagerinfo [05:43:42] yes [05:44:12] `One of the following values: change, create, create-continue, link, link-continue, login, login-continue, remove, unlink` [05:44:17] Which one is password reset? [05:44:55] change, it says to use change at https://www.mediawiki.org/w/api.php?action=help&modules=changeauthenticationdata [05:45:30] That just got me this https://usercontent.irccloud-cdn.com/file/EXBgRbq4/image.png [05:45:43] There is no auth token or anything here [05:48:13] the value of changeauthrequest is supposed to be MediaWiki\Auth\PasswordAuthenticationRequest [05:48:30] that is the id in the screenshot [05:48:43] and also the value of changeauthrequest in the example [05:51:26] Honestly at this point I might just scrape the web UI [05:51:42] This API is confusing and convoluted [05:52:37] it's just because there is a pluggable auth system so there's not actually any guarantee that password authentication will be in use on a wiki [05:53:12] so if you scrape the web UI, you could theoretically get an error message or some completely different form without any place to put the password [05:54:29] the authmanagerinfo request is supposed to tell you about what authentication method is in use and what data it requires [05:55:00] if you want your client to only ever work with passwords, then the right answer is always changeauthrequest=MediaWiki\Auth\PasswordAuthenticationRequest [05:59:58] ???? [06:00:03] It's the same thing every time? [06:00:13] Why couldn't you have just told me to put `MediaWiki\Auth\PasswordAuthenticationRequest` instead of having to go do a second request [06:01:09] you mean why couldn't the documentation have told you that? [06:01:32] Nevermind, it just said `"info": "Failed to create change request.",` [06:01:57] TimStarling : No, the documentation told me to make a second API request, I assumed it was to get a random bytes or something but it is just that [06:04:28] "Failed to create change request" is pretty vague [06:05:38] there's no interface for AuthManager to tell you what actually went wrong with it [06:06:04] no debug logging either, look how many "return false" statements are in \MediaWiki\Auth\AuthenticationRequest::loadFromSubmission [06:06:48] there are a lot of different ways for it to fail and no way to find out which it was [06:14:46] TimStarling : But that's literally all the info it gives [06:14:49] I have nothing more to share than that [06:14:55] Maybe I just need to scrape web UI..... [11:06:27] <_joe_> anyone here uses vscode to write MediaWiki code? if so, how do you deal with the mediawiki formatting style? [11:09:27] I've got a feeling some people do... I just can't remember who