mirror of
https://bitbucket.org/myhomie/mycorerepository.git
synced 2025-12-06 17:51:20 +00:00
102 lines
2.4 KiB
Markdown
102 lines
2.4 KiB
Markdown
# mycoreapi.api.TokenApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:mycoreapi/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *http://192.168.31.140*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**tokenConnectUser**](TokenApi.md#tokenconnectuser) | **POST** /api/token |
|
|
[**tokenCreate**](TokenApi.md#tokencreate) | **POST** /token |
|
|
|
|
|
|
# **tokenConnectUser**
|
|
> UserInfo tokenConnectUser(loginDTO)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:mycoreapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = TokenApi();
|
|
final loginDTO = LoginDTO(); // LoginDTO |
|
|
|
|
try {
|
|
final result = api_instance.tokenConnectUser(loginDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling TokenApi->tokenConnectUser: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**loginDTO** | [**LoginDTO**](LoginDTO.md)| |
|
|
|
|
### Return type
|
|
|
|
[**UserInfo**](UserInfo.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/json
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|
|
# **tokenCreate**
|
|
> MultipartFile tokenCreate(user)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:mycoreapi/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = TokenApi();
|
|
final user = User(); // User |
|
|
|
|
try {
|
|
final result = api_instance.tokenCreate(user);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling TokenApi->tokenCreate: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**user** | [**User**](User.md)| |
|
|
|
|
### Return type
|
|
|
|
[**MultipartFile**](MultipartFile.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: application/json
|
|
- **Accept**: application/octet-stream
|
|
|
|
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
|
|
|