(ctx context.Context)
| 113 | } |
| 114 | |
| 115 | func (p *provider) refreshToken(ctx context.Context) error { |
| 116 | token, err := getTokenCached(ctx, p.c, p.corpID, p.secret) |
| 117 | if err != nil { |
| 118 | return errors.Wrapf(err, "failed to get token") |
| 119 | } |
| 120 | p.token = token |
| 121 | return nil |
| 122 | } |
| 123 | |
| 124 | func (p *provider) getUserIDByEmail(ctx context.Context, email string) (id string, rerr error) { |
| 125 | if id, ok := userIDCache.Get(email); ok { |