Skip to content

Latest commit

 

History

History
237 lines (154 loc) · 6.23 KB

AuthServiceApi.md

File metadata and controls

237 lines (154 loc) · 6.23 KB

OpenAPI\Client\AuthServiceApi

All URIs are relative to https://api.beget.com, except if the operation defines another base path.

Method HTTP request Description
authServiceAuth() POST /v1/auth
authServiceLogout() POST /v1/auth/logout
authServiceRefreshToken() POST /v1/auth/refresh
authServiceSwitchUser() POST /v1/auth/switch

authServiceAuth()

authServiceAuth($auth_auth_request): \OpenAPI\Client\Model\AuthAuthResponse

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AuthServiceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$auth_auth_request = new \OpenAPI\Client\Model\AuthAuthRequest(); // \OpenAPI\Client\Model\AuthAuthRequest

try {
    $result = $apiInstance->authServiceAuth($auth_auth_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthServiceApi->authServiceAuth: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
auth_auth_request \OpenAPI\Client\Model\AuthAuthRequest

Return type

\OpenAPI\Client\Model\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()

authServiceLogout(): object

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AuthServiceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->authServiceLogout();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthServiceApi->authServiceLogout: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

object

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()

authServiceRefreshToken(): \OpenAPI\Client\Model\AuthRefreshTokenResponse

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AuthServiceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);

try {
    $result = $apiInstance->authServiceRefreshToken();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthServiceApi->authServiceRefreshToken: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\OpenAPI\Client\Model\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()

authServiceSwitchUser($auth_switch_user_request): \OpenAPI\Client\Model\AuthSwitchUserResponse

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure Bearer (JWT) authorization: bearerAuth
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new OpenAPI\Client\Api\AuthServiceApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client(),
    $config
);
$auth_switch_user_request = new \OpenAPI\Client\Model\AuthSwitchUserRequest(); // \OpenAPI\Client\Model\AuthSwitchUserRequest

try {
    $result = $apiInstance->authServiceSwitchUser($auth_switch_user_request);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling AuthServiceApi->authServiceSwitchUser: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
auth_switch_user_request \OpenAPI\Client\Model\AuthSwitchUserRequest

Return type

\OpenAPI\Client\Model\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]