Commit Graph

14 Commits

Author SHA1 Message Date
Ivan Habunek d8c7084678
Migrate auth commands 2023-11-30 20:12:04 +01:00
Ivan Habunek 16e28d02c6
Fix getting the instance domain name
This used to return 3000 when running locally on localhost:3000
2023-11-30 11:58:57 +01:00
Ivan Habunek 0c37716de1
Add --json option to instance command 2023-11-21 16:50:19 +01:00
Ivan Habunek 6cdba16fcf
Make verify_credentials return the http response
Required if we want to emit json without decoding it
2023-11-18 15:40:50 +01:00
Daniel Schwarz 56cc056639 Login to servers that don't honor the uri spec for V1::Instance
Pleroma, Akkoma, and other servers do not follow the Mastodon spec
for the 'uri' attribute which specifies that it contains the domain
name of the instance. Instead, they return a complete URI.

As a workaround, we now detect this situation and parse out the
domain from the URI when necessary. This fixes issue #347.

Thanks to @laleanor for their patch and @rjp for ideas on how to
make it work with GotoSocial and other servers
2023-05-27 05:51:00 +02:00
Ivan Habunek d5b5c89996
Add support for custom instance domains
The instance domain can be different from their base url, for example
the instance at https://social.vivaldi.net uses the vivaldi.net domain,
sans 'social'.

This commit requires the user to provide the base url of the instance,
instead of domain name. The domain is then fetched from the server.

fixes #217
2023-03-09 11:00:45 +01:00
Ivan Habunek 2d8791e629
Remove coding directives, no longer needed 2022-12-31 09:31:32 +01:00
Ivan Habunek a3eb5dca24
Allow piping the password to login_cli
This is useful for testing where entering a password manually is not
possible.
2021-08-28 20:36:10 +02:00
Ivan Habunek b06e9ea733
Enable fetching instance info over http
issue #56
2018-12-30 09:53:12 +01:00
Erica Ehrhardt fde84295e0 Add --disable-https flag 2018-12-24 17:20:30 -08:00
Ivan Habunek 6a3c877270
Reimplement configuration to allow multiple logins
The configuration is now stored in a single json encoded file instead of
separate files.
2018-01-02 12:24:32 +01:00
Ivan Habunek 92d4dc745a
Use http methods instead of requests directly 2017-12-30 16:30:35 +01:00
Ivan Habunek 7bbc98363e
Extract exceptions 2017-12-30 13:32:52 +01:00
Ivan Habunek a50ffe62c3
Extract auth code to own file, add some tests 2017-12-30 13:05:47 +01:00