module WolfCore::Burnett::Auth::Operations

def get_erecruit_access_token

def get_erecruit_access_token
  response = safe_http_post(
    url: ENV["ERECRUIT_AUTH_URL"],
    headers: { "Content-Type" => "application/x-www-form-urlencoded" },
    body: {
      client_id: ENV["ERECRUIT_AUTH_CLIENT_ID"],
      client_secret: ENV["ERECRUIT_AUTH_CLIENT_SECRET"],
      grant_type: ENV["ERECRUIT_AUTH_GRANT_TYPE"]
    },
    error_message: "Unable to get erecruit token"
  )
  response.body["access_token"]
end