Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[server] Add admin user logout #1307 #1311

Merged
merged 5 commits into from
Oct 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions agdb_api/php/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $apiInstance = new Agnesoft\AgdbApi\Api\AgdbApi(
);
$owner = 'owner_example'; // string | user name
$db = 'db_example'; // string | db name
$db_type = new \Agnesoft\AgdbApi\Model\DbType(); // DbType
$db_type = new \Agnesoft\AgdbApi\Model\\Agnesoft\AgdbApi\Model\DbType(); // \Agnesoft\AgdbApi\Model\DbType

try {
$apiInstance->adminDbAdd($owner, $db, $db_type);
Expand Down Expand Up @@ -96,6 +96,7 @@ Class | Method | HTTP request | Description
*AgdbApi* | [**adminUserAdd**](docs/Api/AgdbApi.md#adminuseradd) | **POST** /api/v1/admin/user/{username}/add |
*AgdbApi* | [**adminUserChangePassword**](docs/Api/AgdbApi.md#adminuserchangepassword) | **PUT** /api/v1/admin/user/{username}/change_password |
*AgdbApi* | [**adminUserList**](docs/Api/AgdbApi.md#adminuserlist) | **GET** /api/v1/admin/user/list |
*AgdbApi* | [**adminUserLogout**](docs/Api/AgdbApi.md#adminuserlogout) | **POST** /api/v1/admin/user/{username}/logout |
*AgdbApi* | [**adminUserRemove**](docs/Api/AgdbApi.md#adminuserremove) | **DELETE** /api/v1/admin/user/{username}/remove |
*AgdbApi* | [**clusterStatus**](docs/Api/AgdbApi.md#clusterstatus) | **GET** /api/v1/cluster/status |
*AgdbApi* | [**dbAdd**](docs/Api/AgdbApi.md#dbadd) | **POST** /api/v1/db/{owner}/{db}/add |
Expand Down Expand Up @@ -242,5 +243,5 @@ This PHP package is automatically generated by the [OpenAPI Generator](https://o

- API version: `0.9.0`
- Package version: `0.7.2`
- Generator version: `7.8.0`
- Generator version: `7.9.0`
- Build package: `org.openapitools.codegen.languages.PhpClientCodegen`
78 changes: 68 additions & 10 deletions agdb_api/php/docs/Api/AgdbApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ All URIs are relative to http://localhost:3000, except if the operation defines
| [**adminUserAdd()**](AgdbApi.md#adminUserAdd) | **POST** /api/v1/admin/user/{username}/add | |
| [**adminUserChangePassword()**](AgdbApi.md#adminUserChangePassword) | **PUT** /api/v1/admin/user/{username}/change_password | |
| [**adminUserList()**](AgdbApi.md#adminUserList) | **GET** /api/v1/admin/user/list | |
| [**adminUserLogout()**](AgdbApi.md#adminUserLogout) | **POST** /api/v1/admin/user/{username}/logout | |
| [**adminUserRemove()**](AgdbApi.md#adminUserRemove) | **DELETE** /api/v1/admin/user/{username}/remove | |
| [**clusterStatus()**](AgdbApi.md#clusterStatus) | **GET** /api/v1/cluster/status | |
| [**dbAdd()**](AgdbApi.md#dbAdd) | **POST** /api/v1/db/{owner}/{db}/add | |
Expand Down Expand Up @@ -73,7 +74,7 @@ $apiInstance = new Agnesoft\AgdbApi\Api\AgdbApi(
);
$owner = 'owner_example'; // string | user name
$db = 'db_example'; // string | db name
$db_type = new \Agnesoft\AgdbApi\Model\DbType(); // DbType
$db_type = new \Agnesoft\AgdbApi\Model\\Agnesoft\AgdbApi\Model\DbType(); // \Agnesoft\AgdbApi\Model\DbType

try {
$apiInstance->adminDbAdd($owner, $db, $db_type);
Expand All @@ -88,7 +89,7 @@ try {
| ------------- | ------------- | ------------- | ------------- |
| **owner** | **string**| user name | |
| **db** | **string**| db name | |
| **db_type** | [**DbType**](../Model/.md)| | |
| **db_type** | [**\Agnesoft\AgdbApi\Model\DbType**](../Model/.md)| | |

### Return type

Expand Down Expand Up @@ -730,7 +731,7 @@ $apiInstance = new Agnesoft\AgdbApi\Api\AgdbApi(
$owner = 'owner_example'; // string | db owner user name
$db = 'db_example'; // string | db name
$username = 'username_example'; // string | user name
$db_role = new \Agnesoft\AgdbApi\Model\DbUserRole(); // DbUserRole
$db_role = new \Agnesoft\AgdbApi\Model\\Agnesoft\AgdbApi\Model\DbUserRole(); // \Agnesoft\AgdbApi\Model\DbUserRole

try {
$apiInstance->adminDbUserAdd($owner, $db, $username, $db_role);
Expand All @@ -746,7 +747,7 @@ try {
| **owner** | **string**| db owner user name | |
| **db** | **string**| db name | |
| **username** | **string**| user name | |
| **db_role** | [**DbUserRole**](../Model/.md)| | |
| **db_role** | [**\Agnesoft\AgdbApi\Model\DbUserRole**](../Model/.md)| | |

### Return type

Expand Down Expand Up @@ -1168,6 +1169,63 @@ This endpoint does not need any parameter.
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `adminUserLogout()`

```php
adminUserLogout($username)
```



### Example

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


// Configure Bearer authorization: Token
$config = Agnesoft\AgdbApi\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');


$apiInstance = new Agnesoft\AgdbApi\Api\AgdbApi(
// 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
);
$username = 'username_example'; // string | user name

try {
$apiInstance->adminUserLogout($username);
} catch (Exception $e) {
echo 'Exception when calling AgdbApi->adminUserLogout: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

| Name | Type | Description | Notes |
| ------------- | ------------- | ------------- | ------------- |
| **username** | **string**| user name | |

### Return type

void (empty response body)

### Authorization

[Token](../../README.md#Token)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: Not defined

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `adminUserRemove()`

```php
Expand Down Expand Up @@ -1304,7 +1362,7 @@ $apiInstance = new Agnesoft\AgdbApi\Api\AgdbApi(
);
$owner = 'owner_example'; // string | user name
$db = 'db_example'; // string | db name
$db_type = new \Agnesoft\AgdbApi\Model\DbType(); // DbType
$db_type = new \Agnesoft\AgdbApi\Model\\Agnesoft\AgdbApi\Model\DbType(); // \Agnesoft\AgdbApi\Model\DbType

try {
$apiInstance->dbAdd($owner, $db, $db_type);
Expand All @@ -1319,7 +1377,7 @@ try {
| ------------- | ------------- | ------------- | ------------- |
| **owner** | **string**| user name | |
| **db** | **string**| db name | |
| **db_type** | [**DbType**](../Model/.md)| | |
| **db_type** | [**\Agnesoft\AgdbApi\Model\DbType**](../Model/.md)| | |

### Return type

Expand Down Expand Up @@ -1484,7 +1542,7 @@ $apiInstance = new Agnesoft\AgdbApi\Api\AgdbApi(
);
$owner = 'owner_example'; // string | user name
$db = 'db_example'; // string | db name
$resource = new \Agnesoft\AgdbApi\Model\DbResource(); // DbResource
$resource = new \Agnesoft\AgdbApi\Model\\Agnesoft\AgdbApi\Model\DbResource(); // \Agnesoft\AgdbApi\Model\DbResource

try {
$result = $apiInstance->dbClear($owner, $db, $resource);
Expand All @@ -1500,7 +1558,7 @@ try {
| ------------- | ------------- | ------------- | ------------- |
| **owner** | **string**| user name | |
| **db** | **string**| db name | |
| **resource** | [**DbResource**](../Model/.md)| | |
| **resource** | [**\Agnesoft\AgdbApi\Model\DbResource**](../Model/.md)| | |

### Return type

Expand Down Expand Up @@ -2023,7 +2081,7 @@ $apiInstance = new Agnesoft\AgdbApi\Api\AgdbApi(
$owner = 'owner_example'; // string | db owner user name
$db = 'db_example'; // string | db name
$username = 'username_example'; // string | user name
$db_role = new \Agnesoft\AgdbApi\Model\DbUserRole(); // DbUserRole
$db_role = new \Agnesoft\AgdbApi\Model\\Agnesoft\AgdbApi\Model\DbUserRole(); // \Agnesoft\AgdbApi\Model\DbUserRole

try {
$apiInstance->dbUserAdd($owner, $db, $username, $db_role);
Expand All @@ -2039,7 +2097,7 @@ try {
| **owner** | **string**| db owner user name | |
| **db** | **string**| db name | |
| **username** | **string**| user name | |
| **db_role** | [**DbUserRole**](../Model/.md)| | |
| **db_role** | [**\Agnesoft\AgdbApi\Model\DbUserRole**](../Model/.md)| | |

### Return type

Expand Down
1 change: 1 addition & 0 deletions agdb_api/php/docs/Model/UserStatus.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**login** | **bool** | |
**name** | **string** | |

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Loading