$confirmPassword_Request method

  1. @experimental
Request $confirmPassword_Request({
  1. required String password,
})

Confirm the user password.

Returns a DynamiteRequest backing the confirmPassword operation. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • password The password of the user.

Status codes:

  • 200: Password confirmation succeeded
  • 403: Password confirmation failed

See:

Implementation

@_i2.experimental
_i3.Request $confirmPassword_Request({required String password}) {
  final _parameters = <String, Object?>{};
  final $password = _$jsonSerializers.serialize(password, specifiedType: const FullType(String));
  _parameters['password'] = $password;

  final _path = _i5.UriTemplate('/index.php/login/confirm{?password*}').expand(_parameters);
  final _uri = Uri.parse('${_rootClient.baseURL}$_path');
  final _request = _i3.Request('post', _uri);
  _request.headers['Accept'] = 'application/json';
// coverage:ignore-start
  final authentication = _rootClient.authentications?.firstWhereOrNull(
    (auth) => switch (auth) {
      _i1.DynamiteHttpBearerAuthentication() || _i1.DynamiteHttpBasicAuthentication() => true,
      _ => false,
    },
  );

  if (authentication != null) {
    _request.headers.addAll(
      authentication.headers,
    );
  } else {
    throw Exception('Missing authentication for bearer_auth or basic_auth');
  }

// coverage:ignore-end
  return _request;
}