Allow logging in with an API token.
Review Request #13108 — Created June 15, 2023 and updated
Information | |
---|---|
maubin | |
RBTools | |
release-5.x | |
12981 | |
Reviewers | |
rbtools | |
This updates the login methods on the server and transport classes to allow
logging in to the Review Board server with either a username and password
combination or an API token.
- Ran unit tests.
- Tested with the upcoming web based login flow change which uses an API
token to login. - Tested logging in with a username and password.
- Tested logging out.
- Tested passing
--username
and--password
options to commands. - Tested passing
--api-token
option to commands.
Summary |
---|
Description | From | Last Updated |
---|---|---|
Let's make this a keyword-only argument. In fact, ideally, they'd all be (we can use housekeeping to deprecate old behavior). … |
|
|
We should probably put the same notice in reset(). |
|
|
Looks like these None values can be removed now, right? They're all defaults. |
|
|
Let's call these with keyword arguments now, since the call's starting to get more complex and less obvious. I want … |
|
-
-
rbtools/api/request.py (Diff revision 1) Let's make this a keyword-only argument. In fact, ideally, they'd all be (we can use housekeeping to deprecate old behavior).
Same with
reset()
, probably. -
-
rbtools/api/request.py (Diff revision 1) Looks like these
None
values can be removed now, right? They're all defaults. -
rbtools/api/transport/sync.py (Diff revision 1) Let's call these with keyword arguments now, since the call's starting to get more complex and less obvious.
I want to start using keyword-only arguments in more places to give us room to expand and change the API implementation as we grow it.

Commits: |
|
|||||||||
---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 2 (+188 -48) |
Checks run (2 succeeded)

Change Summary:
- Updated
URLMapTransport
to have theapi_token
/username
/password
changes too.
Commits: |
|
||||||
---|---|---|---|---|---|---|---|
Diff: |
Revision 3 (+238 -62) |