Skip to content

Latest commit

 

History

History
executable file
·
57 lines (39 loc) · 2.56 KB

File metadata and controls

executable file
·
57 lines (39 loc) · 2.56 KB

Authentication

(Authentication)

Overview

The authentication endpoints.

Available Operations

  • Authenticate - Authenticate with the API by providing a username and password.

Authenticate

Authenticate with the API by providing a username and password.

Example Usage

package main

import(
	"context"
	"log"
	nolanonboardingtest2samplesdk "github.com/speakeasy-sdks-staging/nolan-onboarding-test2-sample-sdk"
	"github.com/speakeasy-sdks-staging/nolan-onboarding-test2-sample-sdk/pkg/models/shared"
	"github.com/speakeasy-sdks-staging/nolan-onboarding-test2-sample-sdk/pkg/models/operations"
)

func main() {
    s := nolanonboardingtest2samplesdk.New(
        nolanonboardingtest2samplesdk.WithSecurity(""),
    )

    ctx := context.Background()
    res, err := s.Authentication.Authenticate(ctx, operations.AuthenticateRequestBody{})
    if err != nil {
        log.Fatal(err)
    }

    if res.Authenticate200ApplicationJSONObject != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request operations.AuthenticateRequestBody ✔️ The request object to use for the request.

Response

*operations.AuthenticateResponse, error