iptsec.docs 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /* -*- C -*- */
  2. /**@MODULEPAGE "iptsec" - Authentication Module
  3. *
  4. * @section iptsec_meta Module Meta Information
  5. *
  6. * The iptsec module currently provides interfaces to HTTP
  7. * Basic and Digest authentication, used by HTTP and SIP protocol elements.
  8. * There are both
  9. * @ref auth_client "client-side" and
  10. * @ref auth_module "server-side"
  11. * (authentication verification) functionality available.
  12. *
  13. * @CONTACT Pekka Pessi <Pekka.Pessi@nokia.com>
  14. *
  15. * @STATUS @SofiaSIP Core library
  16. *
  17. * @LICENSE LGPL
  18. *
  19. * @section auth_module Server Verifying Authentication
  20. *
  21. * The file <sofia-sip/auth_module.h> defines the interface used by a server
  22. * verifying the authentication from client. After the server has created an
  23. * @ref auth_mod_t "authentication module", the usual authentication
  24. * operation is simple enough:
  25. * -# server initializes an #auth_status_t structure with information from
  26. * the request
  27. * -# server calls auth_mod_method()
  28. * -# server checks the status from auth_status_t structure, sends an error
  29. * response to the client if authentication fails
  30. * -# server proceeds serving the authenticated request.
  31. *
  32. * If the operation is asynchronous, only a preliminary result is stored in
  33. * the auth_status_t structure when the call to auth_mod_method() returns.
  34. * In that case, the application can assign a callback function to the
  35. * structure. The callback function is invoked when the authentication
  36. * operation is completed. An asynchronous authentication operation can be
  37. * terminated before its completion by calling auth_mod_cancel().
  38. *
  39. * @subsection auth_module_tags Server-Side Authentication Parameters
  40. *
  41. * When the server creates the authentication module with auth_mod_create(),
  42. * it can specify numerous parameters affecting the authentication protocol
  43. * and algorithms. The parameter tags are defined in
  44. * <sofia-sip/auth_module.h>. The most important parameters include:
  45. *
  46. * - AUTHTAG_METHOD(),
  47. * - AUTHTAG_ALGORITHM(),
  48. * - AUTHTAG_QOP(), and
  49. * - AUTHTAG_REMOTE().
  50. *
  51. * @section auth_client Client Authenticating User
  52. *
  53. * The file <sofia-sip/auth_client.h> defines the interface used by a client
  54. * authenticating a user with a server. Because there may be multiple
  55. * servers or proxies requiring authentication, the client-side
  56. * authentication information is represented using a list of #auth_client_t
  57. * objects. The client-side operation is as follows:
  58. *
  59. * -# send a request
  60. * -# get a response with specific response code (401 or 407) and challenge
  61. * -# store the challenge to a list with auc_challenge()
  62. * -# prompt user and feed credentials (username and password) to the list
  63. * with auc_credentials() or auc_all_credentials()
  64. * -# authorize a request (add credential headers to it) with
  65. * auc_authorization() and resend the request
  66. *
  67. * If there are several username/password pairs for multiple authentication
  68. * realms required, the application must provide the corresponding realm as
  69. * an argument to auc_all_credentials().
  70. */