(corpID, agentID, secret string)
| 33 | } |
| 34 | |
| 35 | func newProvider(corpID, agentID, secret string) (*provider, error) { |
| 36 | agentIDInt, err := strconv.Atoi(agentID) |
| 37 | if err != nil { |
| 38 | return nil, errors.Wrapf(err, "failed to convert agentID %s to int", agentID) |
| 39 | } |
| 40 | return &provider{ |
| 41 | c: &http.Client{}, |
| 42 | corpID: corpID, |
| 43 | agentID: agentIDInt, |
| 44 | secret: secret, |
| 45 | token: "", |
| 46 | }, nil |
| 47 | } |
| 48 | |
| 49 | func Validate(ctx context.Context, corpID, agentID, secret string) error { |
| 50 | p, err := newProvider(corpID, agentID, secret) |
no outgoing calls
no test coverage detected