authLoginCreateWithHttpInfo method

Future<Response> authLoginCreateWithHttpInfo(
  1. TokenObtainRequest tokenObtainRequest
)

Takes a set of user credentials and returns an access and refresh JSON web token pair to prove the authentication of those credentials.

Note: This method returns the HTTP Response.

Parameters:

Implementation

Future<Response> authLoginCreateWithHttpInfo(
  TokenObtainRequest tokenObtainRequest,
) async {
  // ignore: prefer_const_declarations
  final path = r'/api/auth/login/';

  // ignore: prefer_final_locals
  Object? postBody = tokenObtainRequest;

  final queryParams = <QueryParam>[];
  final headerParams = <String, String>{};
  final formParams = <String, String>{};

  const contentTypes = <String>['application/json'];

  return apiClient.invokeAPI(
    path,
    'POST',
    queryParams,
    postBody,
    headerParams,
    formParams,
    contentTypes.isEmpty ? null : contentTypes.first,
  );
}