manager-app/manager_api_new/doc/AuthenticationApi.md
Thomas Fransolet c7396012b3 misc
2025-05-23 17:06:40 +02:00

3.3 KiB

manager_api_new.api.AuthenticationApi

Load the API package

import 'package:manager_api_new/api.dart';

All URIs are relative to https://localhost:5001

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: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

Authorization

bearer

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: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

Return type

TokenDTO

Authorization

bearer

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]