Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add microsoft oauth2 providers #16544

Merged

Conversation

zeripath
Copy link
Contributor

@zeripath zeripath commented Jul 25, 2021

Users commonly want to be able to use their AzureAD or MicrosoftOnline accounts with Gitea.

This PR adds the goth.Providers for Azure and microsoft online.

Fix #6866
Fix #12073

Signed-off-by: Andrew Thornton <art27@cantab.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
@zeripath zeripath force-pushed the add-microsoft-oauth2-providers branch from dd7497e to a1058ae Compare July 25, 2021 07:57
@codecov-commenter
Copy link

codecov-commenter commented Jul 25, 2021

Codecov Report

Merging #16544 (f629cd2) into main (6e6f23b) will increase coverage by 0.02%.
The diff coverage is 45.10%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #16544      +/-   ##
==========================================
+ Coverage   45.37%   45.39%   +0.02%     
==========================================
  Files         750      756       +6     
  Lines       85115    85247     +132     
==========================================
+ Hits        38622    38700      +78     
- Misses      40244    40283      +39     
- Partials     6249     6264      +15     
Impacted Files Coverage Δ
routers/web/user/setting/security.go 30.30% <0.00%> (-2.49%) ⬇️
services/auth/source/oauth2/source_name.go 0.00% <0.00%> (ø)
services/auth/source/oauth2/source_register.go 0.00% <0.00%> (ø)
services/forms/auth_form.go 100.00% <ø> (ø)
services/auth/source/oauth2/urlmapping.go 27.58% <27.58%> (ø)
services/auth/source/oauth2/providers.go 26.66% <33.33%> (+21.49%) ⬆️
services/auth/source/oauth2/providers_simple.go 42.30% <42.30%> (ø)
services/auth/source/oauth2/providers_openid.go 53.33% <53.33%> (ø)
routers/web/admin/auths.go 48.72% <56.25%> (-1.46%) ⬇️
services/auth/source/oauth2/providers_custom.go 63.23% <63.23%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6e6f23b...f629cd2. Read the comment docs.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jul 25, 2021
@techknowlogick techknowlogick added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jul 26, 2021
@techknowlogick techknowlogick added this to the 1.16.0 milestone Jul 26, 2021
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 26, 2021
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Aug 5, 2021
@techknowlogick techknowlogick merged commit ab9bb54 into go-gitea:main Aug 6, 2021
@zeripath zeripath deleted the add-microsoft-oauth2-providers branch August 6, 2021 02:26
@zeripath zeripath mentioned this pull request Aug 6, 2021
zeripath added a commit to zeripath/gitea that referenced this pull request Aug 17, 2021
There was a regression in go-gitea#16544 whereby the default token url
for github was changed to the gitea one.

This PR restores this.

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath pushed a commit that referenced this pull request Aug 17, 2021
zeripath added a commit to zeripath/gitea that referenced this pull request Aug 20, 2021
Unfortunately there is bug in go-gitea#16544 meaning that openid connects aren't
being matched properly as the capitalisation in that PR is incorrect.

This PR changes the capitalisation back to what is expected.

Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit to zeripath/gitea that referenced this pull request Aug 21, 2021
Signed-off-by: Andrew Thornton <art27@cantab.net>
zeripath added a commit that referenced this pull request Aug 22, 2021
Unfortunately there is bug in #16544 meaning that openid connects aren't
being matched properly as the capitalisation in that PR is incorrect.

This PR changes the capitalisation back to what is expected.

Signed-off-by: Andrew Thornton <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators Oct 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. topic/authentication type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
5 participants