mirror of
https://github.com/harness/drone.git
synced 2025-05-30 19:23:07 +00:00
Refresh Gitea Oauth2 token
This commit is contained in:
parent
0a026b464c
commit
9ced52ab50
@ -172,5 +172,13 @@ func provideRefresher(config config.Config) *oauth2.Refresher {
|
||||
Source: oauth2.ContextTokenSource(),
|
||||
}
|
||||
}
|
||||
if config.Gitea.ClientID != "" {
|
||||
return &oauth2.Refresher{
|
||||
ClientID: config.Gitea.ClientID,
|
||||
ClientSecret: config.Gitea.ClientSecret,
|
||||
Endpoint: config.Server.Addr + "/login/oauth/access_token",
|
||||
Source: oauth2.ContextTokenSource(),
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user