Download | Plain Text | No Line Numbers


  1. /*
  2.   This program is free software; you can redistribute it and/or
  3.   modify it under the terms of the GNU General Public License as
  4.   published by the Free Software Foundation; either version 2, or (at
  5.   your option) any later version.
  6.  
  7.   This program is distributed in the hope that it will be useful, but
  8.   WITHOUT ANY WARRANTY; without even the implied warranty of
  9.   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10.   General Public License for more details.
  11.  
  12.   Copyright (c) Manuel Mausz <manuel@mausz.at> 2017
  13.  
  14.   Dovecot auth support for checkpassword-dovecot
  15. */
  16.  
  17. #ifndef DOVECOT_AUTH_H
  18. #define DOVECOT_AUTH_H
  19.  
  20. #include <stdio.h>
  21.  
  22. FILE *auth_connect(const char *uri, int timeout);
  23. char *auth_begin();
  24. char *auth_add_parameter(char *buf, const char *name, const char *value);
  25.  
  26. #define AUTH_ERROR -1
  27. #define AUTH_FAIL 1
  28. #define AUTH_TEMP 2
  29. #define AUTH_OK 0
  30. int auth_login(FILE *sock, char *buf, const char *username,
  31. const char *password, char **response);
  32.  
  33. #endif
  34.