(ctx context.Context, corpID, agentID, secret string)
| 47 | } |
| 48 | |
| 49 | func Validate(ctx context.Context, corpID, agentID, secret string) error { |
| 50 | p, err := newProvider(corpID, agentID, secret) |
| 51 | if err != nil { |
| 52 | return err |
| 53 | } |
| 54 | if _, err := getToken(ctx, p.c, p.corpID, p.secret); err != nil { |
| 55 | return errors.Wrapf(err, "failed to refresh token") |
| 56 | } |
| 57 | return nil |
| 58 | } |
| 59 | |
| 60 | type accessTokenResponse struct { |
| 61 | ErrCode int `json:"errcode"` |
no test coverage detected