mirror of
https://github.com/warmbly/warmbly.git
synced 2026-08-21 08:01:30 +00:00
17 lines
389 B
Go
17 lines
389 B
Go
package wmail
|
|
|
|
import (
|
|
"github.com/warmbly/warmbly/internal/models"
|
|
"golang.org/x/oauth2"
|
|
)
|
|
|
|
func (w *WMail) onTokenUpdate(token *oauth2.Token) error {
|
|
return w.onEvent(models.JobEventTypeTokenUpdate, &models.JobEventTokenUpdate{
|
|
UserID: w.UserID,
|
|
EmailID: w.ID,
|
|
AccessToken: token.AccessToken,
|
|
RefreshToken: token.RefreshToken,
|
|
ExpiresAt: token.Expiry,
|
|
})
|
|
}
|