Jorge Fernandez 9fec13af85
[Kotlin][Tests]: Add test for kotlin-jvm-okhttp (#20338)
* feat(issue-20231): add echo_api client for kotlin okhttp

* build(issue-20231): sync files
2024-12-17 21:50:00 +08:00

2.2 KiB

AuthApi

All URIs are relative to http://localhost:3000

Method HTTP request Description
testAuthHttpBasic POST /auth/http/basic To test HTTP basic authentication
testAuthHttpBearer POST /auth/http/bearer To test HTTP bearer authentication

testAuthHttpBasic

kotlin.String testAuthHttpBasic()

To test HTTP basic authentication

To test HTTP basic authentication

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = AuthApi()
try {
    val result : kotlin.String = apiInstance.testAuthHttpBasic()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AuthApi#testAuthHttpBasic")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AuthApi#testAuthHttpBasic")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.String

Authorization

Configure http_auth: ApiClient.username = "" ApiClient.password = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain

testAuthHttpBearer

kotlin.String testAuthHttpBearer()

To test HTTP bearer authentication

To test HTTP bearer authentication

Example

// Import classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = AuthApi()
try {
    val result : kotlin.String = apiInstance.testAuthHttpBearer()
    println(result)
} catch (e: ClientException) {
    println("4xx response calling AuthApi#testAuthHttpBearer")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling AuthApi#testAuthHttpBearer")
    e.printStackTrace()
}

Parameters

This endpoint does not need any parameter.

Return type

kotlin.String

Authorization

Configure http_bearer_auth: ApiClient.accessToken = ""

HTTP request headers

  • Content-Type: Not defined
  • Accept: text/plain