bug-wget
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #64693] Add command line support for bearer token


From: Matt Blythe
Subject: [bug #64693] Add command line support for bearer token
Date: Mon, 18 Sep 2023 14:57:56 -0400 (EDT)

URL:
  <https://savannah.gnu.org/bugs/?64693>

                 Summary: Add command line support for bearer token
                   Group: GNU Wget
               Submitter: mblythe
               Submitted: Mon 18 Sep 2023 06:57:54 PM UTC
                Category: User Interface
                Severity: 3 - Normal
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
        Operating System: None
         Reproducibility: Every Time
           Fixed Release: None
         Planned Release: None
              Regression: No
           Work Required: None
          Patch Included: No


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Mon 18 Sep 2023 06:57:54 PM UTC By: Matt Blythe <mblythe>
Currently, if a user wants to access an OAuth2 application, or any other URL
that uses token-based authentication, they have to use this syntax:

wget --header "Authorization: Bearer <token>" <URL>

This is kind of clumsy.  It would be nicer if wget provided an option to
provide just the token value, and it would take care of putting it in the HTTP
header in the correct way.  For example:

wget --bearer-token <token> <URL>

There is already precedent for doing this: HTTP basic auth.  Instead of having
users type

wget --header "Authorization: Basic <base64-encoded-username-password>"

Instead, wget allows the --user and --password options (or, the username &
password in the URL?), and will create the appropriate HTTP header from that
information.

I'll also note that curl has implemented a similar option (if wget wants to
use the same option name for cross-compatibility):

>From https://curl.se/docs/manpage.html#--oauth2-bearer

  --oauth2-bearer <token>

  (IMAP LDAP POP3 SMTP HTTP) Specify the Bearer Token for OAUTH 2.0 server
authentication. The Bearer Token is used in conjunction with the user name
which can be specified as part of the --url or -u, --user options.

  The Bearer Token and user name are formatted according to RFC 6750.

  If --oauth2-bearer is provided several times, the last set value is used.

  Example:

   curl --oauth2-bearer "mF_9.B5f-4.1JqM" https://example.com







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?64693>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]