classgrpc_1_1_auth_metadata_processor.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.17"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>GRPC C++: grpc::AuthMetadataProcessor Class Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">GRPC C++
  25. &#160;<span id="projectnumber">1.36.1</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.17 -->
  34. <script type="text/javascript">
  35. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  36. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  37. /* @license-end */
  38. </script>
  39. <script type="text/javascript" src="menudata.js"></script>
  40. <script type="text/javascript" src="menu.js"></script>
  41. <script type="text/javascript">
  42. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  43. $(function() {
  44. initMenu('',true,false,'search.php','Search');
  45. $(document).ready(function() { init_search(); });
  46. });
  47. /* @license-end */</script>
  48. <div id="main-nav"></div>
  49. <!-- window showing the filter options -->
  50. <div id="MSearchSelectWindow"
  51. onmouseover="return searchBox.OnSearchSelectShow()"
  52. onmouseout="return searchBox.OnSearchSelectHide()"
  53. onkeydown="return searchBox.OnSearchSelectKey(event)">
  54. </div>
  55. <!-- iframe showing the search results (closed by default) -->
  56. <div id="MSearchResultsWindow">
  57. <iframe src="javascript:void(0)" frameborder="0"
  58. name="MSearchResults" id="MSearchResults">
  59. </iframe>
  60. </div>
  61. <div id="nav-path" class="navpath">
  62. <ul>
  63. <li class="navelem"><a class="el" href="namespacegrpc.html">grpc</a></li><li class="navelem"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html">AuthMetadataProcessor</a></li> </ul>
  64. </div>
  65. </div><!-- top -->
  66. <div class="header">
  67. <div class="summary">
  68. <a href="#pub-types">Public Types</a> &#124;
  69. <a href="#pub-methods">Public Member Functions</a> </div>
  70. <div class="headertitle">
  71. <div class="title">grpc::AuthMetadataProcessor Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  72. </div><!--header-->
  73. <div class="contents">
  74. <p>Interface allowing custom server-side authorization based on credentials encoded in metadata.
  75. <a href="classgrpc_1_1_auth_metadata_processor.html#details">More...</a></p>
  76. <p><code>#include &lt;<a class="el" href="grpcpp_2security_2auth__metadata__processor_8h_source.html">auth_metadata_processor.h</a>&gt;</code></p>
  77. <table class="memberdecls">
  78. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  79. Public Types</h2></td></tr>
  80. <tr class="memitem:a0c5846f57c862880f0f6db29577bb9e5"><td class="memItemLeft" align="right" valign="top">typedef std::multimap&lt; <a class="el" href="classgrpc_1_1string__ref.html">grpc::string_ref</a>, <a class="el" href="classgrpc_1_1string__ref.html">grpc::string_ref</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a0c5846f57c862880f0f6db29577bb9e5">InputMetadata</a></td></tr>
  81. <tr class="separator:a0c5846f57c862880f0f6db29577bb9e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  82. <tr class="memitem:a7146a5de3f081b257b3e468b83feac4f"><td class="memItemLeft" align="right" valign="top">typedef std::multimap&lt; std::string, std::string &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">OutputMetadata</a></td></tr>
  83. <tr class="separator:a7146a5de3f081b257b3e468b83feac4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. </table><table class="memberdecls">
  85. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  86. Public Member Functions</h2></td></tr>
  87. <tr class="memitem:ae64e2159109378600eb17f613ec4bbeb"><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#ae64e2159109378600eb17f613ec4bbeb">~AuthMetadataProcessor</a> ()</td></tr>
  88. <tr class="separator:ae64e2159109378600eb17f613ec4bbeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:a8d4e15dda8aa8ecbde4af7efbdd064f3"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a8d4e15dda8aa8ecbde4af7efbdd064f3">IsBlocking</a> () const</td></tr>
  90. <tr class="memdesc:a8d4e15dda8aa8ecbde4af7efbdd064f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">If this method returns true, the <em>Process</em> function will be scheduled in a different thread from the one processing the call. <a href="classgrpc_1_1_auth_metadata_processor.html#a8d4e15dda8aa8ecbde4af7efbdd064f3">More...</a><br /></td></tr>
  91. <tr class="separator:a8d4e15dda8aa8ecbde4af7efbdd064f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. <tr class="memitem:aa98ff82634d4b3de2b7a7e2622c12a3c"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classgrpc_1_1_status.html">grpc::Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#aa98ff82634d4b3de2b7a7e2622c12a3c">Process</a> (const <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a0c5846f57c862880f0f6db29577bb9e5">InputMetadata</a> &amp;auth_metadata, <a class="el" href="classgrpc_1_1_auth_context.html">grpc::AuthContext</a> *context, <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">OutputMetadata</a> *consumed_auth_metadata, <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">OutputMetadata</a> *response_metadata)=0</td></tr>
  93. <tr class="memdesc:aa98ff82634d4b3de2b7a7e2622c12a3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">context is read/write: it contains the properties of the channel peer and it is the job of the Process method to augment it with properties derived from the passed-in auth_metadata. <a href="classgrpc_1_1_auth_metadata_processor.html#aa98ff82634d4b3de2b7a7e2622c12a3c">More...</a><br /></td></tr>
  94. <tr class="separator:aa98ff82634d4b3de2b7a7e2622c12a3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
  95. </table>
  96. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  97. <div class="textblock"><p>Interface allowing custom server-side authorization based on credentials encoded in metadata. </p>
  98. <p>Objects of this type can be passed to <em><a class="el" href="classgrpc_1_1_server_credentials.html#aac2d5861ec4c0534c3eaa7b36f5cc6fa" title="This method is not thread-safe and has to be called before the server is started.">ServerCredentials::SetAuthMetadataProcessor()</a></em>. </p>
  99. </div><h2 class="groupheader">Member Typedef Documentation</h2>
  100. <a id="a0c5846f57c862880f0f6db29577bb9e5"></a>
  101. <h2 class="memtitle"><span class="permalink"><a href="#a0c5846f57c862880f0f6db29577bb9e5">&#9670;&nbsp;</a></span>InputMetadata</h2>
  102. <div class="memitem">
  103. <div class="memproto">
  104. <table class="memname">
  105. <tr>
  106. <td class="memname">typedef std::multimap&lt;<a class="el" href="classgrpc_1_1string__ref.html">grpc::string_ref</a>, <a class="el" href="classgrpc_1_1string__ref.html">grpc::string_ref</a>&gt; <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a0c5846f57c862880f0f6db29577bb9e5">grpc::AuthMetadataProcessor::InputMetadata</a></td>
  107. </tr>
  108. </table>
  109. </div><div class="memdoc">
  110. </div>
  111. </div>
  112. <a id="a7146a5de3f081b257b3e468b83feac4f"></a>
  113. <h2 class="memtitle"><span class="permalink"><a href="#a7146a5de3f081b257b3e468b83feac4f">&#9670;&nbsp;</a></span>OutputMetadata</h2>
  114. <div class="memitem">
  115. <div class="memproto">
  116. <table class="memname">
  117. <tr>
  118. <td class="memname">typedef std::multimap&lt;std::string, std::string&gt; <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">grpc::AuthMetadataProcessor::OutputMetadata</a></td>
  119. </tr>
  120. </table>
  121. </div><div class="memdoc">
  122. </div>
  123. </div>
  124. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  125. <a id="ae64e2159109378600eb17f613ec4bbeb"></a>
  126. <h2 class="memtitle"><span class="permalink"><a href="#ae64e2159109378600eb17f613ec4bbeb">&#9670;&nbsp;</a></span>~AuthMetadataProcessor()</h2>
  127. <div class="memitem">
  128. <div class="memproto">
  129. <table class="mlabels">
  130. <tr>
  131. <td class="mlabels-left">
  132. <table class="memname">
  133. <tr>
  134. <td class="memname">virtual grpc::AuthMetadataProcessor::~AuthMetadataProcessor </td>
  135. <td>(</td>
  136. <td class="paramname"></td><td>)</td>
  137. <td></td>
  138. </tr>
  139. </table>
  140. </td>
  141. <td class="mlabels-right">
  142. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  143. </tr>
  144. </table>
  145. </div><div class="memdoc">
  146. </div>
  147. </div>
  148. <h2 class="groupheader">Member Function Documentation</h2>
  149. <a id="a8d4e15dda8aa8ecbde4af7efbdd064f3"></a>
  150. <h2 class="memtitle"><span class="permalink"><a href="#a8d4e15dda8aa8ecbde4af7efbdd064f3">&#9670;&nbsp;</a></span>IsBlocking()</h2>
  151. <div class="memitem">
  152. <div class="memproto">
  153. <table class="mlabels">
  154. <tr>
  155. <td class="mlabels-left">
  156. <table class="memname">
  157. <tr>
  158. <td class="memname">virtual bool grpc::AuthMetadataProcessor::IsBlocking </td>
  159. <td>(</td>
  160. <td class="paramname"></td><td>)</td>
  161. <td> const</td>
  162. </tr>
  163. </table>
  164. </td>
  165. <td class="mlabels-right">
  166. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  167. </tr>
  168. </table>
  169. </div><div class="memdoc">
  170. <p>If this method returns true, the <em>Process</em> function will be scheduled in a different thread from the one processing the call. </p>
  171. </div>
  172. </div>
  173. <a id="aa98ff82634d4b3de2b7a7e2622c12a3c"></a>
  174. <h2 class="memtitle"><span class="permalink"><a href="#aa98ff82634d4b3de2b7a7e2622c12a3c">&#9670;&nbsp;</a></span>Process()</h2>
  175. <div class="memitem">
  176. <div class="memproto">
  177. <table class="mlabels">
  178. <tr>
  179. <td class="mlabels-left">
  180. <table class="memname">
  181. <tr>
  182. <td class="memname">virtual <a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> grpc::AuthMetadataProcessor::Process </td>
  183. <td>(</td>
  184. <td class="paramtype">const <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a0c5846f57c862880f0f6db29577bb9e5">InputMetadata</a> &amp;&#160;</td>
  185. <td class="paramname"><em>auth_metadata</em>, </td>
  186. </tr>
  187. <tr>
  188. <td class="paramkey"></td>
  189. <td></td>
  190. <td class="paramtype"><a class="el" href="classgrpc_1_1_auth_context.html">grpc::AuthContext</a> *&#160;</td>
  191. <td class="paramname"><em>context</em>, </td>
  192. </tr>
  193. <tr>
  194. <td class="paramkey"></td>
  195. <td></td>
  196. <td class="paramtype"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">OutputMetadata</a> *&#160;</td>
  197. <td class="paramname"><em>consumed_auth_metadata</em>, </td>
  198. </tr>
  199. <tr>
  200. <td class="paramkey"></td>
  201. <td></td>
  202. <td class="paramtype"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">OutputMetadata</a> *&#160;</td>
  203. <td class="paramname"><em>response_metadata</em>&#160;</td>
  204. </tr>
  205. <tr>
  206. <td></td>
  207. <td>)</td>
  208. <td></td><td></td>
  209. </tr>
  210. </table>
  211. </td>
  212. <td class="mlabels-right">
  213. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  214. </tr>
  215. </table>
  216. </div><div class="memdoc">
  217. <p>context is read/write: it contains the properties of the channel peer and it is the job of the Process method to augment it with properties derived from the passed-in auth_metadata. </p>
  218. <p>consumed_auth_metadata needs to be filled with metadata that has been consumed by the processor and will be removed from the call. response_metadata is the metadata that will be sent as part of the response. If the return value is not <a class="el" href="classgrpc_1_1_status.html#acbac12f241ad08f449aa1b9086ec7acc" title="An OK pre-defined instance.">Status::OK</a>, the rpc call will be aborted with the error code and error message sent back to the client. </p>
  219. </div>
  220. </div>
  221. <hr/>The documentation for this class was generated from the following file:<ul>
  222. <li>include/grpcpp/security/<a class="el" href="grpcpp_2security_2auth__metadata__processor_8h_source.html">auth_metadata_processor.h</a></li>
  223. </ul>
  224. </div><!-- contents -->
  225. <!-- start footer part -->
  226. <hr class="footer"/><address class="footer"><small>
  227. Generated on Wed Mar 3 2021 19:17:24 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  228. <img class="footer" src="doxygen.png" alt="doxygen"/>
  229. </a> 1.8.17
  230. </small></address>
  231. </body>
  232. </html>