decorator: Extract get_basic_credentials.
decorator: Extract get_basic_credentials.

Signed-off-by: Zixuan James Li <74923aee05c23ca90566381b5d6b0cd9451b6054@gmail.com>

andersk/zulip,rht/zulip,zulip/zulip,andersk/zulip,andersk/zulip,rht/zulip,rht/zulip,andersk/zulip,zulip/zulip,andersk/zulip,zulip/zulip,zulip/zulip,rht/zulip,zulip/zulip,rht/zulip,rht/zulip,zulip/zulip,andersk/zulip,rht/zulip,zulip/zulip,andersk/zulip