hiteshjoshi / goauth2

Automatically exported from code.google.com/p/goauth2
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Patch for /oauth/oauth.go #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Add a field to the Config struct to allow limiting the oauth domain.

Original issue reported on code.google.com by Stuart.N...@soundcloud.com on 8 Jun 2014 at 4:37

Attachments:

GoogleCodeExporter commented 9 years ago
This isn't how we do code review.

Also, this code isn't gofmt'ed, and the bug doesn't describe what the issue 
actually is. I see no reference to "hd" in the spec at all.

I'm closing this bug, but feel free to create a new bug where you give 
background and cite spec(s). Then we can do code review via the normal Go 
contributing process.

Original comment by bradfitz@golang.org on 10 Aug 2014 at 6:10

GoogleCodeExporter commented 9 years ago
That is my mistake, I incorrectly associated this with Google Oauth. This patch 
does not belong in this library.

The reference to "hd" can be found here: 
https://developers.google.com/accounts/docs/OAuth2Login#hd-param

This was a (poorly) submitted feature request to allow for limiting login 
domains through the `hd` parameter. As stated in the link above, it streamlines 
the google oauth process so I don't have to filter out email addresses from 
undesired domains.

I'm surprised my code isn't gofmt'd, I have vim set with `autocmd BufWritePre 
*.go Fmt`. I'll make sure next time I submit a patch that it has been run.

Original comment by stuartne...@gmail.com on 10 Aug 2014 at 6:31