grpc/cpp/structgrpc__metadata__crede...

195 lines
13 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>GRPC C++: grpc_metadata_credentials_plugin Struct Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">GRPC C++
&#160;<span id="projectnumber">1.31.1</span>
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-attribs">Data Fields</a> </div>
<div class="headertitle">
<div class="title">grpc_metadata_credentials_plugin Struct Reference</div> </div>
</div><!--header-->
<div class="contents">
<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.
<a href="structgrpc__metadata__credentials__plugin.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="grpc__security_8h_source.html">grpc_security.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Data Fields</h2></td></tr>
<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="grpc_2impl_2codegen_2status_8h.html#a35ab2a68917eb836de84cb23253108eb">grpc_status_code</a> *status, const char **error_details)</td></tr>
<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="structgrpc__metadata__credentials__plugin.html#af8506ea31e5709124899e4e406b4a9f1">More...</a><br /></td></tr>
<tr class="separator:af8506ea31e5709124899e4e406b4a9f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a58e0aae253e35575146dc6b3252e8f55"><td class="memItemLeft" align="right" valign="top">char *(*&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structgrpc__metadata__credentials__plugin.html#a58e0aae253e35575146dc6b3252e8f55">debug_string</a> )(void *<a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a>)</td></tr>
<tr class="memdesc:a58e0aae253e35575146dc6b3252e8f55"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implements debug string of the given plugin. <a href="structgrpc__metadata__credentials__plugin.html#a58e0aae253e35575146dc6b3252e8f55">More...</a><br /></td></tr>
<tr class="separator:a58e0aae253e35575146dc6b3252e8f55"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:a445b45204d00f76d957a6065cc117cc6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroys the plugin state. <a href="structgrpc__metadata__credentials__plugin.html#a445b45204d00f76d957a6065cc117cc6">More...</a><br /></td></tr>
<tr class="separator:a445b45204d00f76d957a6065cc117cc6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">More...</a><br /></td></tr>
<tr class="separator:a3b571f8cbf3cffd887dec1ed5a662571"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="memdesc:a6c02843e7eff42cb3b397800bd64f2dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Type of credentials that this plugin is implementing. <a href="structgrpc__metadata__credentials__plugin.html#a6c02843e7eff42cb3b397800bd64f2dc">More...</a><br /></td></tr>
<tr class="separator:a6c02843e7eff42cb3b397800bd64f2dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<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>
<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>
</div><h2 class="groupheader">Field Documentation</h2>
<a id="a58e0aae253e35575146dc6b3252e8f55"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a58e0aae253e35575146dc6b3252e8f55">&#9670;&nbsp;</a></span>debug_string</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">char*(* grpc_metadata_credentials_plugin::debug_string) (void *<a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a>)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Implements debug string of the given plugin. </p>
<p>This method returns an allocated string that the caller needs to free using <a class="el" href="alloc_8h.html#a7f8641de6e80a37dd003d3100cc94bd7" title="free">gpr_free()</a> </p>
</div>
</div>
<a id="a445b45204d00f76d957a6065cc117cc6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a445b45204d00f76d957a6065cc117cc6">&#9670;&nbsp;</a></span>destroy</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void(* grpc_metadata_credentials_plugin::destroy) (void *<a class="el" href="structgrpc__metadata__credentials__plugin.html#a3b571f8cbf3cffd887dec1ed5a662571">state</a>)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroys the plugin state. </p>
</div>
</div>
<a id="af8506ea31e5709124899e4e406b4a9f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af8506ea31e5709124899e4e406b4a9f1">&#9670;&nbsp;</a></span>get_metadata</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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="grpc_2impl_2codegen_2status_8h.html#a35ab2a68917eb836de84cb23253108eb">grpc_status_code</a> *status, const char **error_details)</td>
</tr>
</table>
</div><div class="memdoc">
<p>The implementation of this method has to be non-blocking, but can be performed synchronously or asynchronously. </p>
<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>
<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>
<p><em>context</em> is the information that can be used by the plugin to create auth metadata. </p>
</div>
</div>
<a id="a3b571f8cbf3cffd887dec1ed5a662571"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3b571f8cbf3cffd887dec1ed5a662571">&#9670;&nbsp;</a></span>state</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void* grpc_metadata_credentials_plugin::state</td>
</tr>
</table>
</div><div class="memdoc">
<p>State that will be set as the first parameter of the methods above. </p>
</div>
</div>
<a id="a6c02843e7eff42cb3b397800bd64f2dc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c02843e7eff42cb3b397800bd64f2dc">&#9670;&nbsp;</a></span>type</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const char* grpc_metadata_credentials_plugin::type</td>
</tr>
</table>
</div><div class="memdoc">
<p>Type of credentials that this plugin is implementing. </p>
</div>
</div>
<hr/>The documentation for this struct was generated from the following file:<ul>
<li>include/grpc/<a class="el" href="grpc__security_8h_source.html">grpc_security.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Aug 18 2020 16:24:48 for GRPC C++ by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>