3.2 KiB
3.2 KiB
managerapi.api.AuthenticationApi
Load the API package
import 'package:managerapi/api.dart';
All URIs are relative to http://192.168.31.96
| Method | HTTP request | Description |
|---|---|---|
| authenticationAuthenticateWithForm | POST /api/Authentication/Token | |
| authenticationAuthenticateWithJson | POST /api/Authentication/Authenticate |
authenticationAuthenticateWithForm
TokenDTO authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret)
Example
import 'package:managerapi/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
Authorization
HTTP request headers
- Content-Type: multipart/form-data
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
authenticationAuthenticateWithJson
TokenDTO authenticationAuthenticateWithJson(loginDTO)
Example
import 'package:managerapi/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 |
Return type
Authorization
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]