anchor.diff:  authenticate_by_basic_credentials(Login, Password) ->
       Headers = basic_auth_header(Login, Password),
       URL = get_onepanel_rest_user_url(Login),
  -    {ok, CaCertsDir} = application:get_env(?APP_NAME, cacerts_dir),
  -    CaCerts = cert_utils:load_ders_in_dir(CaCertsDir),
  -    Opts = [{ssl_options, [{cacerts, CaCerts}]}],
  -    RestCallResult = case http_client:get(URL, Headers, <<"">>, Opts) of
  +    RestCallResult = case http_client:get(URL, Headers, <<"">>, ?ONEPANEL_SSL_OPTS) of
           {ok, 200, _, JSON} ->
               json_utils:decode(JSON);
           {ok, 401, _, _} ->
  
positive.code:         <<"currentPassword">> => OldPassword,
          <<"newPassword">> => NewPassword
      }),
      {ok, CaCertsDir} = application:get_env(?APP_NAME, cacerts_dir),
      CaCerts = cert_utils:load_ders_in_dir(CaCertsDir),
      Opts = [{ssl_options, [{cacerts, CaCerts}]}],
      case http_client:patch(URL, Headers, Body, Opts) of
          {ok, 204, _, _} ->
              ok;
          {ok, 401, _, _} ->
  
negative.code: % (Artificial) identity provider id used for creating user ids for users
  % coming from onepanel.
  -define(ONEZONE_IDP_ID, onezone).
  
  % SSL Opts used to connect to onepanel.
  % Onepanel is usually available under 127.0.0.1 or localhost, so hostname
  % verification should be omitted here (the cert signature is still checked).
  -define(ONEPANEL_SSL_OPTS, begin
      {ok, __CaCertsDir} = application:get_env(?APP_NAME, cacerts_dir),
      [{ssl_options, [
          {secure, only_verify_peercert},
          {cacerts, cert_utils:load_ders_in_dir(__CaCertsDir)}
      ]}]
  end).
  
  -export([
      create/1, create/2,
  