Skip to content

Latest commit

 

History

History
209 lines (130 loc) · 6.04 KB

DeviceFlowApi.md

File metadata and controls

209 lines (130 loc) · 6.04 KB

\DeviceFlowApi

All URIs are relative to https://api.authlete.com

Method HTTP request Description
DeviceAuthorizationApi Post /api/device/authorization /api/device/authorization API
DeviceCompleteApi Post /api/device/complete /api/device/complete API
DeviceVerificationApi Post /api/device/verification /api/device/verification API

DeviceAuthorizationApi

DeviceAuthorizationResponse DeviceAuthorizationApi(ctx).DeviceAuthorizationRequest(deviceAuthorizationRequest).Execute()

/api/device/authorization API

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    deviceAuthorizationRequest := *openapiclient.NewDeviceAuthorizationRequest("Parameters_example") // DeviceAuthorizationRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
deviceAuthorizationRequest DeviceAuthorizationRequest

Return type

DeviceAuthorizationResponse

Authorization

ServiceCredentials

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

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

DeviceCompleteApi

DeviceCompleteResponse DeviceCompleteApi(ctx).DeviceCompleteRequest(deviceCompleteRequest).Execute()

/api/device/complete API

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    deviceCompleteRequest := *openapiclient.NewDeviceCompleteRequest("UserCode_example", "Result_example", "Subject_example") // DeviceCompleteRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
deviceCompleteRequest DeviceCompleteRequest

Return type

DeviceCompleteResponse

Authorization

ServiceCredentials

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

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

DeviceVerificationApi

DeviceVerificationResponse DeviceVerificationApi(ctx).DeviceVerificationRequest(deviceVerificationRequest).Execute()

/api/device/verification API

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    deviceVerificationRequest := *openapiclient.NewDeviceVerificationRequest("UserCode_example") // DeviceVerificationRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
deviceVerificationRequest DeviceVerificationRequest

Return type

DeviceVerificationResponse

Authorization

ServiceCredentials

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json

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