structgrpc__metadata__credentials__plugin.html 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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 Core: grpc_metadata_credentials_plugin Struct 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 Core
  25. &#160;<span id="projectnumber">6.0.0</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><!-- top -->
  59. <div class="header">
  60. <div class="summary">
  61. <a href="#pub-attribs">Data Fields</a> </div>
  62. <div class="headertitle">
  63. <div class="title">grpc_metadata_credentials_plugin Struct Reference</div> </div>
  64. </div><!--header-->
  65. <div class="contents">
  66. <p>grpc_metadata_credentials plugin is an API user provided structure used to create grpc_credentials objects that can be set on a channel (composed) or a call.
  67. <a href="structgrpc__metadata__credentials__plugin.html#details">More...</a></p>
  68. <p><code>#include &lt;<a class="el" href="grpc__security_8h_source.html">grpc_security.h</a>&gt;</code></p>
  69. <table class="memberdecls">
  70. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
  71. Data Fields</h2></td></tr>
  72. <tr class="memitem:af8506ea31e5709124899e4e406b4a9f1"><td class="memItemLeft" align="right" valign="top">int(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__metadata__credentials__plugin.html#af8506ea31e5709124899e4e406b4a9f1">get_metadata</a> )(void *<a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a>, <a class="el" href="structgrpc__auth__metadata__context.html">grpc_auth_metadata_context</a> context, <a class="el" href="grpc__security_8h.html#a08c13ff956af9e64b514c4af434faba2">grpc_credentials_plugin_metadata_cb</a> cb, void *user_data, <a class="el" href="structgrpc__metadata.html">grpc_metadata</a> creds_md[4], size_t *num_creds_md, <a class="el" href="impl_2codegen_2status_8h.html#a35ab2a68917eb836de84cb23253108eb">grpc_status_code</a> *status, const char **error_details)</td></tr>
  73. <tr class="memdesc:af8506ea31e5709124899e4e406b4a9f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">The implementation of this method has to be non-blocking, but can be performed synchronously or asynchronously. <a href="#af8506ea31e5709124899e4e406b4a9f1">More...</a><br /></td></tr>
  74. <tr class="separator:af8506ea31e5709124899e4e406b4a9f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
  75. <tr class="memitem:a445b45204d00f76d957a6065cc117cc6"><td class="memItemLeft" align="right" valign="top">void(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__metadata__credentials__plugin.html#a445b45204d00f76d957a6065cc117cc6">destroy</a> )(void *<a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a>)</td></tr>
  76. <tr class="memdesc:a445b45204d00f76d957a6065cc117cc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the plugin state. <a href="#a445b45204d00f76d957a6065cc117cc6">More...</a><br /></td></tr>
  77. <tr class="separator:a445b45204d00f76d957a6065cc117cc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
  78. <tr class="memitem:a3b571f8cbf3cffd887dec1ed5a662571"><td class="memItemLeft" align="right" valign="top">void *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a></td></tr>
  79. <tr class="memdesc:a3b571f8cbf3cffd887dec1ed5a662571"><td class="mdescLeft">&#160;</td><td class="mdescRight">State that will be set as the first parameter of the methods above. <a href="#a3b571f8cbf3cffd887dec1ed5a662571">More...</a><br /></td></tr>
  80. <tr class="separator:a3b571f8cbf3cffd887dec1ed5a662571"><td class="memSeparator" colspan="2">&#160;</td></tr>
  81. <tr class="memitem:a6c02843e7eff42cb3b397800bd64f2dc"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__metadata__credentials__plugin.html#a6c02843e7eff42cb3b397800bd64f2dc">type</a></td></tr>
  82. <tr class="memdesc:a6c02843e7eff42cb3b397800bd64f2dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of credentials that this plugin is implementing. <a href="#a6c02843e7eff42cb3b397800bd64f2dc">More...</a><br /></td></tr>
  83. <tr class="separator:a6c02843e7eff42cb3b397800bd64f2dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
  84. </table>
  85. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  86. <div class="textblock"><p>grpc_metadata_credentials plugin is an API user provided structure used to create grpc_credentials objects that can be set on a channel (composed) or a call. </p>
  87. <p>See grpc_credentials_metadata_create_from_plugin below. The grpc client stack will call the get_metadata method of the plugin for every call in scope for the credentials created from it. </p>
  88. </div><h2 class="groupheader">Field Documentation</h2>
  89. <a id="a445b45204d00f76d957a6065cc117cc6"></a>
  90. <h2 class="memtitle"><span class="permalink"><a href="#a445b45204d00f76d957a6065cc117cc6">&#9670;&nbsp;</a></span>destroy</h2>
  91. <div class="memitem">
  92. <div class="memproto">
  93. <table class="memname">
  94. <tr>
  95. <td class="memname">void(* grpc_metadata_credentials_plugin::destroy) (void *<a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a>)</td>
  96. </tr>
  97. </table>
  98. </div><div class="memdoc">
  99. <p>Destroys the plugin state. </p>
  100. </div>
  101. </div>
  102. <a id="af8506ea31e5709124899e4e406b4a9f1"></a>
  103. <h2 class="memtitle"><span class="permalink"><a href="#af8506ea31e5709124899e4e406b4a9f1">&#9670;&nbsp;</a></span>get_metadata</h2>
  104. <div class="memitem">
  105. <div class="memproto">
  106. <table class="memname">
  107. <tr>
  108. <td class="memname">int(* grpc_metadata_credentials_plugin::get_metadata) (void *<a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a>, <a class="el" href="structgrpc__auth__metadata__context.html">grpc_auth_metadata_context</a> context, <a class="el" href="grpc__security_8h.html#a08c13ff956af9e64b514c4af434faba2">grpc_credentials_plugin_metadata_cb</a> cb, void *user_data, <a class="el" href="structgrpc__metadata.html">grpc_metadata</a> creds_md[4], size_t *num_creds_md, <a class="el" href="impl_2codegen_2status_8h.html#a35ab2a68917eb836de84cb23253108eb">grpc_status_code</a> *status, const char **error_details)</td>
  109. </tr>
  110. </table>
  111. </div><div class="memdoc">
  112. <p>The implementation of this method has to be non-blocking, but can be performed synchronously or asynchronously. </p>
  113. <p>If processing occurs synchronously, returns non-zero and populates creds_md, num_creds_md, status, and error_details. In this case, the caller takes ownership of the entries in creds_md and of error_details. Note that if the plugin needs to return more than GRPC_METADATA_CREDENTIALS_PLUGIN_SYNC_MAX entries in creds_md, it must return asynchronously.</p>
  114. <p>If processing occurs asynchronously, returns zero and invokes <em>cb</em> when processing is completed. <em>user_data</em> will be passed as the first parameter of the callback. NOTE: <em>cb</em> MUST be invoked in a different thread, not from the thread in which <em><a class="el" href="structgrpc__metadata__credentials__plugin.html#af8506ea31e5709124899e4e406b4a9f1" title="The implementation of this method has to be non-blocking, but can be performed synchronously or async...">get_metadata()</a></em> is invoked.</p>
  115. <p><em>context</em> is the information that can be used by the plugin to create auth metadata. </p>
  116. </div>
  117. </div>
  118. <a id="a3b571f8cbf3cffd887dec1ed5a662571"></a>
  119. <h2 class="memtitle"><span class="permalink"><a href="#a3b571f8cbf3cffd887dec1ed5a662571">&#9670;&nbsp;</a></span>state</h2>
  120. <div class="memitem">
  121. <div class="memproto">
  122. <table class="memname">
  123. <tr>
  124. <td class="memname">void* grpc_metadata_credentials_plugin::state</td>
  125. </tr>
  126. </table>
  127. </div><div class="memdoc">
  128. <p>State that will be set as the first parameter of the methods above. </p>
  129. </div>
  130. </div>
  131. <a id="a6c02843e7eff42cb3b397800bd64f2dc"></a>
  132. <h2 class="memtitle"><span class="permalink"><a href="#a6c02843e7eff42cb3b397800bd64f2dc">&#9670;&nbsp;</a></span>type</h2>
  133. <div class="memitem">
  134. <div class="memproto">
  135. <table class="memname">
  136. <tr>
  137. <td class="memname">const char* grpc_metadata_credentials_plugin::type</td>
  138. </tr>
  139. </table>
  140. </div><div class="memdoc">
  141. <p>Type of credentials that this plugin is implementing. </p>
  142. </div>
  143. </div>
  144. <hr/>The documentation for this struct was generated from the following file:<ul>
  145. <li>include/grpc/<a class="el" href="grpc__security_8h_source.html">grpc_security.h</a></li>
  146. </ul>
  147. </div><!-- contents -->
  148. <!-- start footer part -->
  149. <hr class="footer"/><address class="footer"><small>
  150. Generated on Fri Apr 13 2018 15:03:52 for GRPC Core by &#160;<a href="http://www.doxygen.org/index.html">
  151. <img class="footer" src="doxygen.png" alt="doxygen"/>
  152. </a> 1.8.13
  153. </small></address>
  154. </body>
  155. </html>