git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: "Randall S. Becker" <rsbecker@nexbridge.com>
Cc: "'brian m. carlson'" <sandals@crustytoothpaste.net>,
	'Christian Halstrick' <christian.halstrick@gmail.com>,
	'Git' <git@vger.kernel.org>
Subject: Re: OAuth2 support in git?
Date: Thu, 14 Jun 2018 17:01:33 -0400	[thread overview]
Message-ID: <20180614210132.GA12460@sigill.intra.peff.net> (raw)
In-Reply-To: <003c01d40420$bd522990$37f67cb0$@nexbridge.com>

On Thu, Jun 14, 2018 at 04:46:10PM -0400, Randall S. Becker wrote:

> > 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.
> > 
> > We'd maybe also want to allow credential helpers to say "by the way, this
> > password should be treated as a bearer token", for cases where you might
> > sometimes use oauth2 and sometimes a real password.
> 
> Be aware that there are 4 (ish) flavours of OAuth2 the last time I
> checked. It is important to know which one (or all) to implement. The
> embedded form is probably the easiest to comprehend - and the least
> implemented from my research. More common OAuth2 instances use a
> third-man website to hold session keys and authorization. That may be
> problematic for a whole bunch of us who do not play in that world.

I think Git's usage would be limited to "how do I present this token for
my requests". I don't think we'd ever recognize an oauth redirect and
try to fulfill it ourselves.  We'd rely on getting a 401 and punting all
those bits to a credential helper to do the heavy lifting.

I say that not knowing much about oauth2, of course, so maybe there
would be complications with that approach (I do know there are multiple
ways you can present a token, but we'd support whichever ones people are
interested in enough to show up and provide a patch for).

-Peff

  reply	other threads:[~2018-06-14 21:01 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 [this message]
2018-06-14 22:20     ` brian m. carlson
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

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

  git send-email \
    --in-reply-to=20180614210132.GA12460@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=christian.halstrick@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=rsbecker@nexbridge.com \
    --cc=sandals@crustytoothpaste.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.
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 NNTP newsgroup(s).