Skip to content

Latest commit

 

History

History
75 lines (46 loc) · 1.93 KB

File metadata and controls

75 lines (46 loc) · 1.93 KB

\AuthenticationAPI

All URIs are relative to https://virtserver.swaggerhub.com/perimeter81/public-api-yaml/1.0.0

Method HTTP request Description
AuthorizeToken Post /v3/auth/authorize Get Access Token

AuthorizeToken

AuthorizeResponse AuthorizeToken(ctx).AuthorizeRequest(authorizeRequest).Execute()

Get Access Token

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/CheckPointSW/perimeter-81-client-sdk/v3"
)

func main() {
	authorizeRequest := *openapiclient.NewAuthorizeRequest("GrantType_example", "ApiKey_example") // AuthorizeRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.AuthenticationAPI.AuthorizeToken(context.Background()).AuthorizeRequest(authorizeRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `AuthenticationAPI.AuthorizeToken``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AuthorizeToken`: AuthorizeResponse
	fmt.Fprintf(os.Stdout, "Response from `AuthenticationAPI.AuthorizeToken`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiAuthorizeTokenRequest struct via the builder pattern

Name Type Description Notes
authorizeRequest AuthorizeRequest

Return type

AuthorizeResponse

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]