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

Support github refresh tokens #3811

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

anbraten
Copy link
Member

@anbraten anbraten commented Jun 21, 2024

closes #3804

Changes

  • add expiry when creating user
  • rename user.Token to AccessToken
  • rename user.Secret to RefreshToken
  • add support for github refresh tokens, ignore them if not provided as using an oauth app
  • add expiry to gitlab login (prevent direct refresh)

@anbraten anbraten added bug Something isn't working server forge/github github forge related build_pr_images If set, the CI will build images for this PR and push to Dockerhub labels Jun 21, 2024
@woodpecker-bot
Copy link
Collaborator

woodpecker-bot commented Jun 22, 2024

Deployment of preview was successful: https://woodpecker-ci-woodpecker-pr-3811.surge.sh

Copy link

codecov bot commented Jun 22, 2024

Codecov Report

Attention: Patch coverage is 25.21008% with 89 lines in your changes missing coverage. Please review.

Project coverage is 25.74%. Comparing base (fbb96ff) to head (a656070).
Report is 3 commits behind head on main.

Files Patch % Lines
server/forge/github/github.go 5.40% 35 Missing ⚠️
server/forge/gitlab/gitlab.go 21.05% 15 Missing ⚠️
server/forge/forgejo/forgejo.go 42.10% 11 Missing ⚠️
server/forge/gitea/gitea.go 42.10% 11 Missing ⚠️
server/api/login.go 0.00% 7 Missing ⚠️
server/forge/addon/args.go 0.00% 4 Missing ⚠️
...r/forge/bitbucketdatacenter/bitbucketdatacenter.go 33.33% 2 Missing ⚠️
server/forge/bitbucketdatacenter/convert.go 0.00% 2 Missing ⚠️
server/forge/common/utils.go 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3811      +/-   ##
==========================================
+ Coverage   25.73%   25.74%   +0.01%     
==========================================
  Files         366      366              
  Lines       27034    27008      -26     
==========================================
- Hits         6956     6954       -2     
+ Misses      19538    19514      -24     
  Partials      540      540              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@anbraten anbraten added this to the 3.0.0 milestone Jul 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working build_pr_images If set, the CI will build images for this PR and push to Dockerhub forge/github github forge related server
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unauthorized user tokens preventing builds from running when protected by SAML enforcement
2 participants