110 lines
3.3 KiB
Markdown
110 lines
3.3 KiB
Markdown
# manager_api_new.api.AuthenticationApi
|
|
|
|
## Load the API package
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
```
|
|
|
|
All URIs are relative to *https://api.mymuseum.be*
|
|
|
|
Method | HTTP request | Description
|
|
------------- | ------------- | -------------
|
|
[**authenticationAuthenticateWithForm**](AuthenticationApi.md#authenticationauthenticatewithform) | **POST** /api/Authentication/Token |
|
|
[**authenticationAuthenticateWithJson**](AuthenticationApi.md#authenticationauthenticatewithjson) | **POST** /api/Authentication/Authenticate |
|
|
|
|
|
|
# **authenticationAuthenticateWithForm**
|
|
> TokenDTO authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = AuthenticationApi();
|
|
final grantType = grantType_example; // String |
|
|
final username = username_example; // String |
|
|
final password = password_example; // String |
|
|
final clientId = clientId_example; // String |
|
|
final clientSecret = clientSecret_example; // String |
|
|
|
|
try {
|
|
final result = api_instance.authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AuthenticationApi->authenticationAuthenticateWithForm: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**grantType** | **String**| | [optional]
|
|
**username** | **String**| | [optional]
|
|
**password** | **String**| | [optional]
|
|
**clientId** | **String**| | [optional]
|
|
**clientSecret** | **String**| | [optional]
|
|
|
|
### Return type
|
|
|
|
[**TokenDTO**](TokenDTO.md)
|
|
|
|
### Authorization
|
|
|
|
[bearer](../README.md#bearer)
|
|
|
|
### HTTP request headers
|
|
|
|
- **Content-Type**: multipart/form-data
|
|
- **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)
|
|
|
|
# **authenticationAuthenticateWithJson**
|
|
> TokenDTO authenticationAuthenticateWithJson(loginDTO)
|
|
|
|
|
|
|
|
### Example
|
|
```dart
|
|
import 'package:manager_api_new/api.dart';
|
|
// TODO Configure OAuth2 access token for authorization: bearer
|
|
//defaultApiClient.getAuthentication<OAuth>('bearer').accessToken = 'YOUR_ACCESS_TOKEN';
|
|
|
|
final api_instance = AuthenticationApi();
|
|
final loginDTO = LoginDTO(); // LoginDTO |
|
|
|
|
try {
|
|
final result = api_instance.authenticationAuthenticateWithJson(loginDTO);
|
|
print(result);
|
|
} catch (e) {
|
|
print('Exception when calling AuthenticationApi->authenticationAuthenticateWithJson: $e\n');
|
|
}
|
|
```
|
|
|
|
### Parameters
|
|
|
|
Name | Type | Description | Notes
|
|
------------- | ------------- | ------------- | -------------
|
|
**loginDTO** | [**LoginDTO**](LoginDTO.md)| |
|
|
|
|
### Return type
|
|
|
|
[**TokenDTO**](TokenDTO.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)
|
|
|