Track access token and refresh token expiry
Also make a bunch more progress on actually updating the tokens when we need them updated.
This commit is contained in:
parent
cf01c8c5c6
commit
109495b702
11 changed files with 348 additions and 104 deletions
4
main.go
4
main.go
|
|
@ -82,14 +82,14 @@ func main() {
|
|||
ctx, cancel := context.WithCancel(context.Background())
|
||||
defer cancel()
|
||||
|
||||
newTokenChannel := make(chan int, 10)
|
||||
NewOAuthTokenChannel = make(chan struct{}, 10)
|
||||
|
||||
var waitGroup sync.WaitGroup
|
||||
|
||||
waitGroup.Add(1)
|
||||
go func() {
|
||||
defer waitGroup.Done()
|
||||
refreshFieldseekerData(ctx, newTokenChannel)
|
||||
refreshFieldseekerData(ctx, NewOAuthTokenChannel)
|
||||
}()
|
||||
|
||||
server := &http.Server{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue