3.5 KiB

mycoreapi.api.AuthenticationApi

Load the API package

import 'package:mycoreapi/api.dart';

All URIs are relative to http://localhost:25049

Method HTTP request Description
authenticationAuthenticateWithForm POST /api/Authentication/Token Authenticate with form parameters (used by Swagger test client)
authenticationAuthenticateWithJson POST /api/Authentication/Authenticate Authenticate with Json parameters (used by most clients)

authenticationAuthenticateWithForm

TokenDTO authenticationAuthenticateWithForm(grantType, username, password, clientId, clientSecret)

Authenticate with form parameters (used by Swagger test client)

Example

import 'package:mycoreapi/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

LoginDTO authenticationAuthenticateWithJson(loginDTO)

Authenticate with Json parameters (used by most clients)

Example

import 'package:mycoreapi/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 | Login DTO

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 Login DTO

Return type

LoginDTO

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]