All URIs are relative to http://localhost
| Method | HTTP request | Description |
|---|---|---|
| Authentication | Post /api/v1/auth | AuthController@checkAuthorization |
| Login | Post /api/v1/auth/login | AuthController@login |
| Register | Post /api/v1/auth/register | AuthController@register |
Authentication200Response Authentication(ctx).AuthenticationRequest(authenticationRequest).Execute()
AuthController@checkAuthorization
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)
func main() {
authenticationRequest := *openapiclient.NewAuthenticationRequest() // AuthenticationRequest | Pass user credentials
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthenticationAPI.Authentication(context.Background()).AuthenticationRequest(authenticationRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.Authentication``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Authentication`: Authentication200Response
fmt.Fprintf(os.Stdout, "Response from `AuthenticationAPI.Authentication`: %v\n", resp)
}Other parameters are passed through a pointer to a apiAuthenticationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| authenticationRequest | AuthenticationRequest | Pass user credentials |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Register200Response Login(ctx).LoginRequest(loginRequest).Execute()
AuthController@login
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)
func main() {
loginRequest := *openapiclient.NewLoginRequest() // LoginRequest | Pass user credentials
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthenticationAPI.Login(context.Background()).LoginRequest(loginRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.Login``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Login`: Register200Response
fmt.Fprintf(os.Stdout, "Response from `AuthenticationAPI.Login`: %v\n", resp)
}Other parameters are passed through a pointer to a apiLoginRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| loginRequest | LoginRequest | Pass user credentials |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Register200Response Register(ctx).RegisterRequest(registerRequest).Execute()
AuthController@register
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/HDRUK/gateway-api-go-sdk"
)
func main() {
registerRequest := *openapiclient.NewRegisterRequest() // RegisterRequest | Pass user registration data
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AuthenticationAPI.Register(context.Background()).RegisterRequest(registerRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.Register``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `Register`: Register200Response
fmt.Fprintf(os.Stdout, "Response from `AuthenticationAPI.Register`: %v\n", resp)
}Other parameters are passed through a pointer to a apiRegisterRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| registerRequest | RegisterRequest | Pass user registration data |
No authorization required
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]