mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-20 09:06:45 +00:00
feat: implement token expiration watcher
This commit is contained in:
@ -28,7 +28,6 @@ import (
|
||||
|
||||
type fakeConfig struct {
|
||||
dir string
|
||||
tm *pmapi.TokenManager
|
||||
}
|
||||
|
||||
// newFakeConfig creates a temporary folder for files.
|
||||
@ -41,7 +40,6 @@ func newFakeConfig() *fakeConfig {
|
||||
|
||||
return &fakeConfig{
|
||||
dir: dir,
|
||||
tm: pmapi.NewTokenManager(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -52,8 +50,7 @@ func (c *fakeConfig) GetAPIConfig() *pmapi.ClientConfig {
|
||||
return &pmapi.ClientConfig{
|
||||
AppVersion: "Bridge_" + os.Getenv("VERSION"),
|
||||
ClientID: "bridge",
|
||||
// TokenManager should not be required, but PMAPI still doesn't handle not-set cases everywhere.
|
||||
TokenManager: c.tm,
|
||||
SentryDSN: "",
|
||||
}
|
||||
}
|
||||
func (c *fakeConfig) GetDBDir() string {
|
||||
|
||||
Reference in New Issue
Block a user