tsip_header_Proxy_Authorization.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /*
  2. * Copyright (C) 2010-2011 Mamadou Diop.
  3. *
  4. * Contact: Mamadou Diop <diopmamadou(at)doubango[dot]org>
  5. *
  6. * This file is part of Open Source Doubango Framework.
  7. *
  8. * DOUBANGO is free software: you can redistribute it and/or modify
  9. * it under the terms of the GNU General Public License as published by
  10. * the Free Software Foundation, either version 3 of the License, or
  11. * (at your option) any later version.
  12. *
  13. * DOUBANGO is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with DOUBANGO.
  20. *
  21. */
  22. /**@file tsip_header_Proxy_Authorization.h
  23. * @brief SIP header 'Proxy-Authorization'.
  24. *
  25. * @author Mamadou Diop <diopmamadou(at)doubango[dot]org>
  26. *
  27. */
  28. #ifndef _TSIP_HEADER_PROXY_AUTHORIZATION_H_
  29. #define _TSIP_HEADER_PROXY_AUTHORIZATION_H_
  30. #include "tinysip_config.h"
  31. #include "tinysip/headers/tsip_header.h"
  32. TSIP_BEGIN_DECLS
  33. ////////////////////////////////////////////////////////////////////////////////////////////////////
  34. ///
  35. /// @brief SIP header 'Proxy-Authorization'.
  36. ///
  37. /// @par ABNF = "Proxy-Authorization" HCOLON credentials
  38. /// credentials = ("Digest" LWS digest-response) / other-response
  39. /// digest-response = dig-resp *(COMMA dig-resp)
  40. /// dig-resp = username / realm / nonce / digest-uri / dresponse / algorithm / cnonce / opaque / message-qop / nonce-count / auth-param / auts
  41. /// username = "username" EQUAL username-value
  42. /// username-value = quoted-string
  43. /// digest-uri = "uri" EQUAL LDQUOT digest-uri-value RDQUOT
  44. /// digest-uri-value = auth-request-uri ; equal to request-uri as specified by HTTP/1.1
  45. /// message-qop = "qop" EQUAL qop-value
  46. /// cnonce = "cnonce" EQUAL cnonce-value
  47. /// cnonce-value = nonce-value
  48. /// nonce-count = "nc" EQUAL nc-value
  49. /// nc-value = 8LHEX
  50. /// dresponse = "response" EQUAL request-digest
  51. /// request-digest = LDQUOT 32LHEX RDQUOT
  52. /// auth-request-uri = not-defined
  53. ///
  54. /// auth-param = auth-param-name EQUAL ( token / quoted-string )
  55. /// auth-param-name = token
  56. ///
  57. /// other-response = auth-scheme LWS auth-param *(COMMA auth-param)
  58. /// auth-scheme = token
  59. /// auts = "auts" EQUAL auts-param
  60. /// auts-param = LDQUOT auts-value RDQUOT
  61. /// auts-value = [base64 encoding of AUTS]
  62. ///
  63. ////////////////////////////////////////////////////////////////////////////////////////////////////
  64. typedef struct tsip_header_Proxy_Authorization_s {
  65. TSIP_DECLARE_HEADER;
  66. char* scheme;
  67. char* username;
  68. char* realm;
  69. char* nonce;
  70. char* uri;
  71. char* response;
  72. char* algorithm;
  73. char* cnonce;
  74. char* opaque;
  75. char* qop;
  76. char* nc;
  77. }
  78. tsip_header_Proxy_Authorization_t;
  79. TINYSIP_API tsip_header_Proxy_Authorization_t* tsip_header_Proxy_Authorization_create();
  80. TINYSIP_API tsip_header_Proxy_Authorization_t *tsip_header_Proxy_Authorization_parse(const char *data, tsk_size_t size);
  81. TINYSIP_GEXTERN const tsk_object_def_t *tsip_header_Proxy_Authorization_def_t;
  82. TSIP_END_DECLS
  83. #endif /* _TSIP_HEADER_PROXY_AUTHORIZATION_H_ */