Skip to content

Latest commit

 

History

History
137 lines (91 loc) · 3.41 KB

NaiveAuthenticationApi.md

File metadata and controls

137 lines (91 loc) · 3.41 KB

openapi.api.NaiveAuthenticationApi

Load the API package

import 'package:openapi/api.dart';

All URIs are relative to https://demo.erpnext.com

Method HTTP request Description
apiMethodLogoutGet GET /api/method/logout Logout from current session
authGetLoggedUser GET /api/method/frappe.auth.get_logged_user Get the user that is logged in
login POST /api/method/login Authenticate yourself

apiMethodLogoutGet

Object apiMethodLogoutGet()

Logout from current session

Example

import 'package:openapi/api.dart';

var api_instance = NaiveAuthenticationApi();

try { 
    var result = api_instance.apiMethodLogoutGet();
    print(result);
} catch (e) {
    print("Exception when calling NaiveAuthenticationApi->apiMethodLogoutGet: $e\n");
}

Parameters

This endpoint does not need any parameter.

Return type

Object

Authorization

No authorization required

HTTP request headers

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

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

authGetLoggedUser

Message authGetLoggedUser()

Get the user that is logged in

Get the currently logged in user

Example

import 'package:openapi/api.dart';

var api_instance = NaiveAuthenticationApi();

try { 
    var result = api_instance.authGetLoggedUser();
    print(result);
} catch (e) {
    print("Exception when calling NaiveAuthenticationApi->authGetLoggedUser: $e\n");
}

Parameters

This endpoint does not need any parameter.

Return type

Message

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json, text/html,

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

login

InlineResponse2001 login(usr, pwd, body1)

Authenticate yourself

Example

import 'package:openapi/api.dart';

var api_instance = NaiveAuthenticationApi();
var usr = Administrator; // String | Your username
var pwd = admin; // String | Your password
var body1 = Body1(); // Body1 | 

try { 
    var result = api_instance.login(usr, pwd, body1);
    print(result);
} catch (e) {
    print("Exception when calling NaiveAuthenticationApi->login: $e\n");
}

Parameters

Name Type Description Notes
usr String Your username [optional] [default to null]
pwd String Your password [optional] [default to null]
body1 Body1 [optional]

Return type

InlineResponse2001

Authorization

No authorization required

HTTP request headers

  • Content-Type: application/json, application/x-www-form-urlencoded
  • Accept: application/json, text/html,

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