Skip to content

Commit de73d13

Browse files
authored
Merge 52e0df9 into e9d04a0
2 parents e9d04a0 + 52e0df9 commit de73d13

File tree

1,129 files changed

+348737
-1
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,129 files changed

+348737
-1
lines changed

CHANGELOG.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
# v3.0.0
2+
3+
## Features
4+
- Support for Keyfactor Command REST API endpoints up to 24.4
5+
- Support for v1 and v2 REST API endpoints
6+
7+
## Fixes
8+
- fix: Fixes an issue where API calls are hardcoded to `/KeyfactorAPI`. Now, the API clients can point to API subpaths defined in your authentication configuration.
9+
10+
## Breaking Changes
11+
- chore: Support for v1 and v2 REST endpoints results in new structure for calling APIs. The base API client exposes a `V1` and `V2` API client. Package names are different as a result.
12+
- chore: Changes in the OpenAPI specification results in different method and class names. Please refer to the [v1](./v3/api/keyfactor/v1/README.md#documentation-for-api-endpoints) and [v2](./v3/api/keyfactor/v2/README.md#documentation-for-api-endpoints) documentation for which class / method to use.
13+
114
# v2.0.0
215

316
## Features
@@ -9,4 +22,4 @@
922
- fix: `NewAPIClient` returns `(*APIClient, error)`
1023

1124
# v1.0.0
12-
- Initial release
25+
- Initial release

v3/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# Go API client for Keyfactor Command
2+
3+
This reference serves to document REST-based methods to manage and integrate with Keyfactor. In addition, an embedded
4+
interface allows for the execution of calls against the current Keyfactor API instance.
5+
6+
## Support for Keyfactor Command Go Client SDK
7+
8+
Keyfactor Command Go Client SDK is open source and supported on best effort level for this tool/library/client.
9+
This means customers can report Bugs, Feature Requests, Documentation amendment or questions as well as requests for
10+
customer information required for setup that needs Keyfactor access to obtain. Such requests do not follow normal SLA
11+
commitments for response or resolution. If you have a support issue, please open a support ticket via the Keyfactor
12+
Support Portal at https://support.keyfactor.com/
13+
14+
###### To report a problem or suggest a new feature, use the **[Issues](../../issues)** tab. If you want to contribute actual bug fixes or proposed enhancements, use the **[Pull requests](../../pulls)** tab.
15+
16+
---
17+
18+
## Overview
19+
20+
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using
21+
the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.
22+
23+
24+
## Installation
25+
26+
Install the following dependencies:
27+
28+
```shell
29+
go get "github.com/Keyfactor/keyfactor-go-client-sdk/v3"
30+
```
31+
32+
Put the package under your project folder and add the following in import:
33+
34+
```golang
35+
package main
36+
37+
import "github.com/Keyfactor/keyfactor-go-client-sdk/api/keyfactor/v3"
38+
```
39+
40+
## Configuration
41+
42+
Configuration of the API client is done through the [github.com/Keyfactor/keyfactor-auth-client-go/auth_providers](https://github.com/Keyfactor/keyfactor-auth-client-go) Go package.
43+
44+
Here is an example of configuring your API client:
45+
46+
```go
47+
import (
48+
"os"
49+
"github.com/Keyfactor/keyfactor-auth-client-go/auth_providers"
50+
"github.com/Keyfactor/keyfactor-go-client-sdk/v3"
51+
)
52+
53+
hostname := os.Getenv(auth_providers.EnvKeyfactorHostName)
54+
apiPath := os.Getenv(auth_providers.EnvKeyfactorAPIPath)
55+
56+
clientId := os.Getenv(auth_providers.EnvKeyfactorClientID)
57+
clientSecret := os.Getenv(auth_providers.EnvKeyfactorClientSecret)
58+
tokenUrl := os.Getenv(auth_providers.EnvKeyfactorAuthTokenURL)
59+
60+
oAuthNoParamsConfig := auth_providers.CommandConfigOauth{}
61+
oAuthNoParamsConfig.CommandAuthConfig.
62+
WithCommandHostName(hostname).
63+
WithCommandAPIPath(apiPath).
64+
WithSkipVerify(false).
65+
WithClientTimeout(10)
66+
oAuthNoParamsConfig.
67+
WithClientId(clientId).
68+
WithClientSecret(clientSecret).
69+
WithTokenUrl(tokenUrl).
70+
Authenticate()
71+
72+
// Configure API client
73+
client, err := kf.NewAPIClient(oAuthNoParamsConfig.GetServerConfig())
74+
```
75+
76+
## Documentation for API Endpoints
77+
78+
All documentation for the APIs can be found in its respective API directory:
79+
80+
- [v1 API Documentation](./v1/README.md)
81+
- [v2 API Documentation](./v2/README.md)
82+

0 commit comments

Comments
 (0)