Skip to content

Latest commit

 

History

History
209 lines (130 loc) · 5.54 KB

TokenEndpointApi.md

File metadata and controls

209 lines (130 loc) · 5.54 KB

\TokenEndpointApi

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

Method HTTP request Description
AuthTokenApi Post /api/auth/token /api/auth/token API
AuthTokenFailApi Post /api/auth/token/fail /api/auth/token/fail API
AuthTokenIssueApi Post /api/auth/token/issue /api/auth/token/issue API

AuthTokenApi

TokenResponse AuthTokenApi(ctx).TokenRequest(tokenRequest).Execute()

/api/auth/token API

Example

package main

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

func main() {
    tokenRequest := *openapiclient.NewTokenRequest("Parameters_example") // TokenRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
tokenRequest TokenRequest

Return type

TokenResponse

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]

AuthTokenFailApi

TokenFailResponse AuthTokenFailApi(ctx).TokenFailRequest(tokenFailRequest).Execute()

/api/auth/token/fail API

Example

package main

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

func main() {
    tokenFailRequest := *openapiclient.NewTokenFailRequest("Ticket_example", "Reason_example") // TokenFailRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
tokenFailRequest TokenFailRequest

Return type

TokenFailResponse

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]

AuthTokenIssueApi

TokenIssueResponse AuthTokenIssueApi(ctx).TokenIssueRequest(tokenIssueRequest).Execute()

/api/auth/token/issue API

Example

package main

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

func main() {
    tokenIssueRequest := *openapiclient.NewTokenIssueRequest("Ticket_example", "Subject_example") // TokenIssueRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
tokenIssueRequest TokenIssueRequest

Return type

TokenIssueResponse

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]