git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "brian m. carlson" <sandals@crustytoothpaste.net>
To: Jeff King <peff@peff.net>
Cc: Christian Halstrick <christian.halstrick@gmail.com>,
	Git <git@vger.kernel.org>
Subject: Re: OAuth2 support in git?
Date: Thu, 14 Jun 2018 22:20:00 +0000	[thread overview]
Message-ID: <20180614222000.GA622873@genre.crustytoothpaste.net> (raw)
In-Reply-To: <20180614151507.GA6933@sigill.intra.peff.net>

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

On Thu, Jun 14, 2018 at 11:15:07AM -0400, Jeff King wrote:
> On Thu, Jun 14, 2018 at 10:13:42AM +0000, brian m. carlson wrote:
> > There isn't any support for Bearer authentication in Git.  For HTTP, we
> > use libcurl, which doesn't provide this natively.  While it could in
> > theory be added, it would require some reworking of the auth code.
> > 
> > You are, of course, welcome to send a patch.
> 
> If it's just a custom Authorization header, we should be able to support
> it with existing curl versions without _too_ much effort.

It shouldn't be too difficult, but we have some fallback among various
authentication types that would need reworking.

> I think there are probably two possible directions:
> 
>  1. add a special "bearer" command line option, etc, as a string
> 
>  2. add a boolean option to send the existing "password" field as a
>     "bearer" header
> 
> I suspect (2) would fit in with the existing code better, as the special
> case would mostly be limited to the manner in which we feed the
> credential to curl. And you could probably just set a config option for
> "this url's auth will be oauth2", and use the existing mechanisms for
> providing the password.

I agree option (2) would be better.
-- 
brian m. carlson: Houston, Texas, US
OpenPGP: https://keybase.io/bk2204

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 867 bytes --]

  parent reply	other threads:[~2018-06-14 22:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-14  8:09 OAuth2 support in git? Christian Halstrick
2018-06-14 10:13 ` brian m. carlson
2018-06-14 15:15   ` Jeff King
2018-06-14 20:46     ` Randall S. Becker
2018-06-14 21:01       ` Jeff King
2018-06-14 22:20     ` brian m. carlson [this message]
2018-06-17 11:37     ` Johannes Schindelin
2018-06-18  4:17       ` Jeff King
2018-06-18 15:53         ` Junio C Hamano
2018-06-18 21:26           ` Jeff King
2018-06-19 12:36             ` Christian Halstrick
2018-06-19 16:45               ` Jeff King

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180614222000.GA622873@genre.crustytoothpaste.net \
    --to=sandals@crustytoothpaste.net \
    --cc=christian.halstrick@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).