quickjs-tart

quickjs-based runtime for wallet-core logic
Log | Files | Refs | README | LICENSE

CURLOPT_LOGIN_OPTIONS.md (2097B)


      1 ---
      2 c: Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
      3 SPDX-License-Identifier: curl
      4 Title: CURLOPT_LOGIN_OPTIONS
      5 Section: 3
      6 Source: libcurl
      7 See-also:
      8   - CURLOPT_PASSWORD (3)
      9   - CURLOPT_USERNAME (3)
     10 Protocol:
     11   - IMAP
     12   - LDAP
     13   - POP3
     14   - SMTP
     15 Added-in: 7.34.0
     16 ---
     17 
     18 # NAME
     19 
     20 CURLOPT_LOGIN_OPTIONS - login options
     21 
     22 # SYNOPSIS
     23 
     24 ~~~c
     25 #include <curl/curl.h>
     26 
     27 CURLcode curl_easy_setopt(CURL *handle, CURLOPT_LOGIN_OPTIONS, char *options);
     28 ~~~
     29 
     30 # DESCRIPTION
     31 
     32 Pass a char pointer as parameter, which should be pointing to the
     33 null-terminated *options* string to use for the transfer.
     34 
     35 For more information about the login options please see RFC 2384, RFC 5092 and
     36 the IETF draft **draft-earhart-url-smtp-00.txt**.
     37 
     38 CURLOPT_LOGIN_OPTIONS(3) can be used to set protocol specific login options,
     39 such as the preferred authentication mechanism via "AUTH=NTLM" or "AUTH=*",
     40 and should be used in conjunction with the CURLOPT_USERNAME(3) option.
     41 
     42 Since 8.2.0, IMAP supports the login option "AUTH=+LOGIN". With this option,
     43 curl uses the plain (not SASL) LOGIN IMAP command even if the server
     44 advertises SASL authentication. Care should be taken in using this option, as
     45 it sends your password in plain text. This does not work if the IMAP server
     46 disables the plain LOGIN (e.g. to prevent password snooping).
     47 
     48 The application does not have to keep the string around after setting this
     49 option.
     50 
     51 Using this option multiple times makes the last set string override the
     52 previous ones. Set it to NULL to disable its use again.
     53 
     54 # DEFAULT
     55 
     56 NULL
     57 
     58 # %PROTOCOLS%
     59 
     60 # EXAMPLE
     61 
     62 ~~~c
     63 int main(void)
     64 {
     65   CURL *curl = curl_easy_init();
     66   if(curl) {
     67     CURLcode res;
     68     curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
     69     curl_easy_setopt(curl, CURLOPT_LOGIN_OPTIONS, "AUTH=*");
     70     res = curl_easy_perform(curl);
     71     curl_easy_cleanup(curl);
     72   }
     73 }
     74 ~~~
     75 
     76 # HISTORY
     77 
     78 Support for OpenLDAP added in 7.82.0.
     79 
     80 # %AVAILABILITY%
     81 
     82 # RETURN VALUE
     83 
     84 curl_easy_setopt(3) returns a CURLcode indicating success or error.
     85 
     86 CURLE_OK (0) means everything was OK, non-zero means an error occurred, see
     87 libcurl-errors(3).