home *** CD-ROM | disk | FTP | other *** search
/ Collection of Internet / Collection of Internet.iso / msdos / lynx / source / www / library / implemen / htauth.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-25  |  1.8 KB  |  65 lines

  1. /*                                   AUTHENTICATION MODULE
  2.                                              
  3.    This is the authentication module. By modifying the function HTAA_authenticate() it can
  4.    be made to support external authentication methods.
  5.    
  6.  */
  7.  
  8. #ifndef HTAUTH_H
  9. #define HTAUTH_H
  10.  
  11. #include "HTUtils.h"
  12. #include "HTAAUtil.h"
  13. #include "HTAAProt.h"
  14.  
  15.  
  16. #ifdef SHORT_NAMES
  17. #define HTAAauth        HTAA_authenticate
  18. #endif /* SHORT_NAMES */
  19.  
  20.  
  21. /*
  22. ** Server's representation of a user (fields in authentication string)
  23. */
  24. typedef struct {
  25.     HTAAScheme  scheme;         /* Scheme used to authenticate this user */
  26.     char *      username;
  27.     char *      password;
  28.     char *      inet_addr;
  29.     char *      timestamp;
  30.     char *      secret_key;
  31. } HTAAUser;
  32. /*
  33.  
  34. User Authentication
  35.  
  36.  */
  37.  
  38. /* SERVER PUBLIC                                        HTAA_authenticate()
  39. **                      AUTHENTICATE USER
  40. ** ON ENTRY:
  41. **      scheme          used authentication scheme.
  42. **      scheme_specifics the scheme specific parameters
  43. **                      (authentication string for Basic and
  44. **                      Pubkey schemes).
  45. **      prot            is the protection information structure
  46. **                      for the file.
  47. **
  48. ** ON EXIT:
  49. **      returns         NULL, if authentication failed.
  50. **                      Otherwise a pointer to a structure
  51. **                      representing authenticated user,
  52. **                      which should not be freed.
  53. */
  54. PUBLIC HTAAUser *HTAA_authenticate PARAMS((HTAAScheme   scheme,
  55.                                            char *       scheme_specifics,
  56.                                            HTAAProt *   prot));
  57. /*
  58.  
  59.  */
  60.  
  61. #endif /* not HTAUTH_H */
  62. /*
  63.  
  64.    End of file HTAuth.h.  */
  65.