All URIs are relative to http://localhost
Method | HTTP request | Description |
---|---|---|
AuthInfo | Get /auth/info | Get information about the current authentication mode |
Authenticate | Post /auth | Authenticate towards the node |
AuthInfoModel AuthInfo(ctx).Execute()
Get information about the current authentication mode
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthApi.AuthInfo(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthApi.AuthInfo``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `AuthInfo`: AuthInfoModel
fmt.Fprintf(os.Stdout, "Response from `AuthApi.AuthInfo`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiAuthInfoRequest struct via the builder pattern
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
LoginResponse Authenticate(ctx).LoginRequest(loginRequest).Execute()
Authenticate towards the node
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
loginRequest := *openapiclient.NewLoginRequest("Password_example", "Username_example") // LoginRequest | The login request
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthApi.Authenticate(context.Background()).LoginRequest(loginRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthApi.Authenticate``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Authenticate`: LoginResponse
fmt.Fprintf(os.Stdout, "Response from `AuthApi.Authenticate`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiAuthenticateRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
loginRequest | LoginRequest | The login request |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]