classgrpc_1_1_auth_metadata_processor.html 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://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.13"/>
  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. <script type="text/javascript"> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-60127042-1', 'auto'); ga('send', 'pageview'); </script></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.13.0-dev</span>
  26. </div>
  27. </td>
  28. </tr>
  29. </tbody>
  30. </table>
  31. </div>
  32. <!-- end header part -->
  33. <!-- Generated by Doxygen 1.8.13 -->
  34. <script type="text/javascript">
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. </script>
  37. <script type="text/javascript" src="menudata.js"></script>
  38. <script type="text/javascript" src="menu.js"></script>
  39. <script type="text/javascript">
  40. $(function() {
  41. initMenu('',true,false,'search.php','Search');
  42. $(document).ready(function() { init_search(); });
  43. });
  44. </script>
  45. <div id="main-nav"></div>
  46. <!-- window showing the filter options -->
  47. <div id="MSearchSelectWindow"
  48. onmouseover="return searchBox.OnSearchSelectShow()"
  49. onmouseout="return searchBox.OnSearchSelectHide()"
  50. onkeydown="return searchBox.OnSearchSelectKey(event)">
  51. </div>
  52. <!-- iframe showing the search results (closed by default) -->
  53. <div id="MSearchResultsWindow">
  54. <iframe src="javascript:void(0)" frameborder="0"
  55. name="MSearchResults" id="MSearchResults">
  56. </iframe>
  57. </div>
  58. <div id="nav-path" class="navpath">
  59. <ul>
  60. <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>
  61. </div>
  62. </div><!-- top -->
  63. <div class="header">
  64. <div class="summary">
  65. <a href="#pub-types">Public Types</a> &#124;
  66. <a href="#pub-methods">Public Member Functions</a> </div>
  67. <div class="headertitle">
  68. <div class="title">grpc::AuthMetadataProcessor Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
  69. </div><!--header-->
  70. <div class="contents">
  71. <p>Interface allowing custom server-side authorization based on credentials encoded in metadata.
  72. <a href="classgrpc_1_1_auth_metadata_processor.html#details">More...</a></p>
  73. <p><code>#include &lt;<a class="el" href="grpcpp_2security_2auth__metadata__processor_8h_source.html">auth_metadata_processor.h</a>&gt;</code></p>
  74. <table class="memberdecls">
  75. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
  76. Public Types</h2></td></tr>
  77. <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>
  78. <tr class="separator:a0c5846f57c862880f0f6db29577bb9e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
  79. <tr class="memitem:a809ec4913c189b392be05338acebb69a"><td class="memItemLeft" align="right" valign="top">typedef std::multimap&lt; <a class="el" href="namespacegrpc.html#ab04a87625da3bf85cdaf5e7856b00203">grpc::string</a>, <a class="el" href="namespacegrpc.html#ab04a87625da3bf85cdaf5e7856b00203">grpc::string</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a809ec4913c189b392be05338acebb69a">OutputMetadata</a></td></tr>
  80. <tr class="separator:a809ec4913c189b392be05338acebb69a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. </table><table class="memberdecls">
  82. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
  83. Public Member Functions</h2></td></tr>
  84. <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>
  85. <tr class="separator:ae64e2159109378600eb17f613ec4bbeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
  86. <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>
  87. <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="#a8d4e15dda8aa8ecbde4af7efbdd064f3">More...</a><br /></td></tr>
  88. <tr class="separator:a8d4e15dda8aa8ecbde4af7efbdd064f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
  89. <tr class="memitem:adc0db66aa261c59bd29f81c53f466303"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="classgrpc_1_1_status.html">Status</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#adc0db66aa261c59bd29f81c53f466303">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">AuthContext</a> *context, <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a809ec4913c189b392be05338acebb69a">OutputMetadata</a> *consumed_auth_metadata, <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a809ec4913c189b392be05338acebb69a">OutputMetadata</a> *response_metadata)=0</td></tr>
  90. <tr class="memdesc:adc0db66aa261c59bd29f81c53f466303"><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="#adc0db66aa261c59bd29f81c53f466303">More...</a><br /></td></tr>
  91. <tr class="separator:adc0db66aa261c59bd29f81c53f466303"><td class="memSeparator" colspan="2">&#160;</td></tr>
  92. </table>
  93. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  94. <div class="textblock"><p>Interface allowing custom server-side authorization based on credentials encoded in metadata. </p>
  95. <p>Objects of this type can be passed to <em><a class="el" href="classgrpc_1_1_server_credentials.html#a72cd4ae61b6c43024df0ffb3f1d51650" title="This method is not thread-safe and has to be called before the server is started. ...">ServerCredentials::SetAuthMetadataProcessor()</a></em>. </p>
  96. </div><h2 class="groupheader">Member Typedef Documentation</h2>
  97. <a id="a0c5846f57c862880f0f6db29577bb9e5"></a>
  98. <h2 class="memtitle"><span class="permalink"><a href="#a0c5846f57c862880f0f6db29577bb9e5">&#9670;&nbsp;</a></span>InputMetadata</h2>
  99. <div class="memitem">
  100. <div class="memproto">
  101. <table class="memname">
  102. <tr>
  103. <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>
  104. </tr>
  105. </table>
  106. </div><div class="memdoc">
  107. </div>
  108. </div>
  109. <a id="a809ec4913c189b392be05338acebb69a"></a>
  110. <h2 class="memtitle"><span class="permalink"><a href="#a809ec4913c189b392be05338acebb69a">&#9670;&nbsp;</a></span>OutputMetadata</h2>
  111. <div class="memitem">
  112. <div class="memproto">
  113. <table class="memname">
  114. <tr>
  115. <td class="memname">typedef std::multimap&lt;<a class="el" href="namespacegrpc.html#ab04a87625da3bf85cdaf5e7856b00203">grpc::string</a>, <a class="el" href="namespacegrpc.html#ab04a87625da3bf85cdaf5e7856b00203">grpc::string</a>&gt; <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a809ec4913c189b392be05338acebb69a">grpc::AuthMetadataProcessor::OutputMetadata</a></td>
  116. </tr>
  117. </table>
  118. </div><div class="memdoc">
  119. </div>
  120. </div>
  121. <h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
  122. <a id="ae64e2159109378600eb17f613ec4bbeb"></a>
  123. <h2 class="memtitle"><span class="permalink"><a href="#ae64e2159109378600eb17f613ec4bbeb">&#9670;&nbsp;</a></span>~AuthMetadataProcessor()</h2>
  124. <div class="memitem">
  125. <div class="memproto">
  126. <table class="mlabels">
  127. <tr>
  128. <td class="mlabels-left">
  129. <table class="memname">
  130. <tr>
  131. <td class="memname">virtual grpc::AuthMetadataProcessor::~AuthMetadataProcessor </td>
  132. <td>(</td>
  133. <td class="paramname"></td><td>)</td>
  134. <td></td>
  135. </tr>
  136. </table>
  137. </td>
  138. <td class="mlabels-right">
  139. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  140. </tr>
  141. </table>
  142. </div><div class="memdoc">
  143. </div>
  144. </div>
  145. <h2 class="groupheader">Member Function Documentation</h2>
  146. <a id="a8d4e15dda8aa8ecbde4af7efbdd064f3"></a>
  147. <h2 class="memtitle"><span class="permalink"><a href="#a8d4e15dda8aa8ecbde4af7efbdd064f3">&#9670;&nbsp;</a></span>IsBlocking()</h2>
  148. <div class="memitem">
  149. <div class="memproto">
  150. <table class="mlabels">
  151. <tr>
  152. <td class="mlabels-left">
  153. <table class="memname">
  154. <tr>
  155. <td class="memname">virtual bool grpc::AuthMetadataProcessor::IsBlocking </td>
  156. <td>(</td>
  157. <td class="paramname"></td><td>)</td>
  158. <td> const</td>
  159. </tr>
  160. </table>
  161. </td>
  162. <td class="mlabels-right">
  163. <span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
  164. </tr>
  165. </table>
  166. </div><div class="memdoc">
  167. <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>
  168. </div>
  169. </div>
  170. <a id="adc0db66aa261c59bd29f81c53f466303"></a>
  171. <h2 class="memtitle"><span class="permalink"><a href="#adc0db66aa261c59bd29f81c53f466303">&#9670;&nbsp;</a></span>Process()</h2>
  172. <div class="memitem">
  173. <div class="memproto">
  174. <table class="mlabels">
  175. <tr>
  176. <td class="mlabels-left">
  177. <table class="memname">
  178. <tr>
  179. <td class="memname">virtual <a class="el" href="classgrpc_1_1_status.html">Status</a> grpc::AuthMetadataProcessor::Process </td>
  180. <td>(</td>
  181. <td class="paramtype">const <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a0c5846f57c862880f0f6db29577bb9e5">InputMetadata</a> &amp;&#160;</td>
  182. <td class="paramname"><em>auth_metadata</em>, </td>
  183. </tr>
  184. <tr>
  185. <td class="paramkey"></td>
  186. <td></td>
  187. <td class="paramtype"><a class="el" href="classgrpc_1_1_auth_context.html">AuthContext</a> *&#160;</td>
  188. <td class="paramname"><em>context</em>, </td>
  189. </tr>
  190. <tr>
  191. <td class="paramkey"></td>
  192. <td></td>
  193. <td class="paramtype"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a809ec4913c189b392be05338acebb69a">OutputMetadata</a> *&#160;</td>
  194. <td class="paramname"><em>consumed_auth_metadata</em>, </td>
  195. </tr>
  196. <tr>
  197. <td class="paramkey"></td>
  198. <td></td>
  199. <td class="paramtype"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a809ec4913c189b392be05338acebb69a">OutputMetadata</a> *&#160;</td>
  200. <td class="paramname"><em>response_metadata</em>&#160;</td>
  201. </tr>
  202. <tr>
  203. <td></td>
  204. <td>)</td>
  205. <td></td><td></td>
  206. </tr>
  207. </table>
  208. </td>
  209. <td class="mlabels-right">
  210. <span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
  211. </tr>
  212. </table>
  213. </div><div class="memdoc">
  214. <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>
  215. <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>
  216. </div>
  217. </div>
  218. <hr/>The documentation for this class was generated from the following file:<ul>
  219. <li>include/grpcpp/security/<a class="el" href="grpcpp_2security_2auth__metadata__processor_8h_source.html">auth_metadata_processor.h</a></li>
  220. </ul>
  221. </div><!-- contents -->
  222. <!-- start footer part -->
  223. <hr class="footer"/><address class="footer"><small>
  224. Generated on Tue May 15 2018 17:01:01 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
  225. <img class="footer" src="doxygen.png" alt="doxygen"/>
  226. </a> 1.8.13
  227. </small></address>
  228. </body>
  229. </html>