Skip to content

Latest commit

 

History

History
258 lines (162 loc) · 6.48 KB

AuthServiceApi.md

File metadata and controls

258 lines (162 loc) · 6.48 KB

\AuthServiceApi

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

Method HTTP request Description
AuthServiceAuth Post /v1/auth
AuthServiceLogout Post /v1/auth/logout
AuthServiceRefreshToken Post /v1/auth/refresh
AuthServiceSwitchUser Post /v1/auth/switch

AuthServiceAuth

AuthAuthResponse AuthServiceAuth(ctx).AuthAuthRequest(authAuthRequest).Execute()

Example

package main

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

func main() {
    authAuthRequest := *openapiclient.NewAuthAuthRequest() // AuthAuthRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
authAuthRequest AuthAuthRequest

Return type

AuthAuthResponse

Authorization

bearerAuth

HTTP request headers

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

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

AuthServiceLogout

map[string]interface{} AuthServiceLogout(ctx).Execute()

Example

package main

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

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.AuthServiceApi.AuthServiceLogout(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `AuthServiceApi.AuthServiceLogout``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AuthServiceLogout`: map[string]interface{}
    fmt.Fprintf(os.Stdout, "Response from `AuthServiceApi.AuthServiceLogout`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

map[string]interface{}

Authorization

bearerAuth

HTTP request headers

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

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

AuthServiceRefreshToken

AuthRefreshTokenResponse AuthServiceRefreshToken(ctx).Execute()

Example

package main

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

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

AuthRefreshTokenResponse

Authorization

bearerAuth

HTTP request headers

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

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

AuthServiceSwitchUser

AuthSwitchUserResponse AuthServiceSwitchUser(ctx).AuthSwitchUserRequest(authSwitchUserRequest).Execute()

Example

package main

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

func main() {
    authSwitchUserRequest := *openapiclient.NewAuthSwitchUserRequest() // AuthSwitchUserRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
authSwitchUserRequest AuthSwitchUserRequest

Return type

AuthSwitchUserResponse

Authorization

bearerAuth

HTTP request headers

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

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