https://github.com/deploymenttheory/go-api-http-client-integrations
API integration library for the go-api-http-client
https://github.com/deploymenttheory/go-api-http-client-integrations
api go golang jamf msgraph
Last synced: 7 months ago
JSON representation
API integration library for the go-api-http-client
- Host: GitHub
- URL: https://github.com/deploymenttheory/go-api-http-client-integrations
- Owner: deploymenttheory
- Created: 2024-06-03T13:55:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-03-03T14:22:15.000Z (11 months ago)
- Last Synced: 2025-03-03T14:34:10.013Z (11 months ago)
- Topics: api, go, golang, jamf, msgraph
- Language: Go
- Homepage:
- Size: 146 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Go HTTP Client API Integration Library
This library provides a collection of API integrations utilized by by the [go-api-http-client](https://github.com/deploymenttheory/go-api-http-client) for various applications within the enterprise. The integrations are designed to be flexible, leveraging private functions to meet interface requirements by the http client. This approach allows for support different api specifics, such as authentication methods, request marshalling, header defintions and so on while maintaining a consistent interface for the http client.
## Overview
An API integration in this library typically includes the following components:
1. **Authentication Methods**:
- **OAuth2.0**: Implements client credentials flow.
- **Basic Authentication**: Uses username and password.
- **Token Management**: Methods to handle token retrieval, expiration checks, and refreshing tokens.
2. **Request Preparation**:
- **Header Management**: Setting required headers such as `Accept`, `Content-Type`, and `Authorization`.
- **Header Exceptions**: Handling specific headers for certain requests.
- **Request Body Marshalling**: Encoding the request body as JSON, XML or multipart form data.
3. **Integration Builders**:
- **Initialization Functions**: Methods to initialize the integration with specific authentication methods, such as OAuth2.0 and Basic Authentication.
- **Configuration Parameters**: Contextual parameters necessary for setting up the integration. These parameters vary based on the API and the authentication method being used. Examples include:
- **Microsoft MS Graph**:
- `clientId`, `clientSecret`, `tenantID`, `bufferPeriod`
- **Jamf Pro**:
- `clientId`, `clientSecret`, `username`, `password`, `jamfBaseDomain`, `bufferPeriod`
4. **Shared Utilities**: Common utility functions that are common practise across multiple API integrations.