(Authentication)
The authentication endpoints.
- Authenticate - Authenticate with the API by providing a username and password.
Authenticate with the API by providing a username and password.
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
}
}
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. |