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 support for client basic auth for exchanging access tokens #6293

Merged
merged 5 commits into from
Mar 11, 2019

Conversation

jonasfranz
Copy link
Member

Adds support for basic auth for exchanging access tokens. This is important since golang's oauth2 library requires that.

https://tools.ietf.org/html/rfc6749#section-2.3.1

@jonasfranz jonasfranz added the type/enhancement An improvement of existing functionality label Mar 9, 2019
@jonasfranz jonasfranz added this to the 1.8.0 milestone Mar 9, 2019
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Mar 9, 2019
@lafriks
Copy link
Member

lafriks commented Mar 9, 2019

Test seems to fail with empty client id

@codecov-io
Copy link

codecov-io commented Mar 10, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@e0eb651). Click here to learn what that means.
The diff coverage is 39.13%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #6293   +/-   ##
=========================================
  Coverage          ?   38.87%           
=========================================
  Files             ?      358           
  Lines             ?    51038           
  Branches          ?        0           
=========================================
  Hits              ?    19839           
  Misses            ?    28329           
  Partials          ?     2870
Impacted Files Coverage Δ
routers/user/oauth.go 38.88% <39.13%> (ø)

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 e0eb651...c5e9a70. Read the comment docs.

@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 Mar 10, 2019
@lunny lunny merged commit 2315019 into go-gitea:master Mar 11, 2019
@gsantner
Copy link

gsantner commented Mar 19, 2019

@jonasfranz / @zeripath
Hey!
I'm running the daily version git-ca46385, tried to backup, but can't due missing tables.
Guess theres DB migration missing or like that?

gitea dump -c ~/gitea/custom/conf/app.ini 
2019/03/19 17:06:11 Creating tmp work dir: /tmp/gitea-dump-640591686
2019/03/19 17:06:11 Packing dump files...
2019/03/19 17:06:11 Dumping local repositories.../home/git/gitea/data/repositories
2019/03/19 17:07:39 Dumping database...
2019/03/19 17:07:40 Failed to dump database: Error 1146: Table 'gitea.o_auth2_application' doesn't exist

@jolheiser
Copy link
Member

jolheiser commented Mar 19, 2019

Just a note for whoever looks at this, since I don't know enough about Xorm's backend.
The OAuth2Application struct is stored as oauth2_application which is why it can't find o_auth2_application when dumping.

// TableName sets the table name to `oauth2_application`
func (app *OAuth2Application) TableName() string {
return "oauth2_application"
}

@jonasfranz
Copy link
Member Author

That's not caused by this pull request. Please open up a new issue to better manage the bug.

@gsantner
Copy link

#6385 / #6310

@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
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. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants