grpc/cpp/classgrpc_1_1_auth_metadata...

249 lines
14 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::AuthMetadataProcessor Class 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 id="nav-path" class="navpath">
<ul>
<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>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> </div>
<div class="headertitle">
<div class="title">grpc::AuthMetadataProcessor Class Reference<span class="mlabels"><span class="mlabel">abstract</span></span></div> </div>
</div><!--header-->
<div class="contents">
<p>Interface allowing custom server-side authorization based on credentials encoded in metadata.
<a href="classgrpc_1_1_auth_metadata_processor.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="grpcpp_2security_2auth__metadata__processor_8h_source.html">auth_metadata_processor.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<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>
<tr class="separator:a0c5846f57c862880f0f6db29577bb9e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<tr class="separator:a7146a5de3f081b257b3e468b83feac4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<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>
<tr class="separator:ae64e2159109378600eb17f613ec4bbeb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:a8d4e15dda8aa8ecbde4af7efbdd064f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<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>
<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>
<tr class="separator:aa98ff82634d4b3de2b7a7e2622c12a3c"><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>Interface allowing custom server-side authorization based on credentials encoded in metadata. </p>
<p>Objects of this type can be passed to <em><a class="el" href="classgrpc__impl_1_1_server_credentials.html#a304b180fa252a484c4ee637ec5b675bd" title="This method is not thread-safe and has to be called before the server is started.">ServerCredentials::SetAuthMetadataProcessor()</a></em>. </p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a id="a0c5846f57c862880f0f6db29577bb9e5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0c5846f57c862880f0f6db29577bb9e5">&#9670;&nbsp;</a></span>InputMetadata</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<a id="a7146a5de3f081b257b3e468b83feac4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7146a5de3f081b257b3e468b83feac4f">&#9670;&nbsp;</a></span>OutputMetadata</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<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>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ae64e2159109378600eb17f613ec4bbeb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae64e2159109378600eb17f613ec4bbeb">&#9670;&nbsp;</a></span>~AuthMetadataProcessor()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual grpc::AuthMetadataProcessor::~AuthMetadataProcessor </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a8d4e15dda8aa8ecbde4af7efbdd064f3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8d4e15dda8aa8ecbde4af7efbdd064f3">&#9670;&nbsp;</a></span>IsBlocking()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool grpc::AuthMetadataProcessor::IsBlocking </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<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>
</div>
</div>
<a id="aa98ff82634d4b3de2b7a7e2622c12a3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa98ff82634d4b3de2b7a7e2622c12a3c">&#9670;&nbsp;</a></span>Process()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="classgrpc_1_1_status.html">grpc::Status</a> grpc::AuthMetadataProcessor::Process </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a0c5846f57c862880f0f6db29577bb9e5">InputMetadata</a> &amp;&#160;</td>
<td class="paramname"><em>auth_metadata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classgrpc_1_1_auth_context.html">grpc::AuthContext</a> *&#160;</td>
<td class="paramname"><em>context</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">OutputMetadata</a> *&#160;</td>
<td class="paramname"><em>consumed_auth_metadata</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classgrpc_1_1_auth_metadata_processor.html#a7146a5de3f081b257b3e468b83feac4f">OutputMetadata</a> *&#160;</td>
<td class="paramname"><em>response_metadata</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">pure virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<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>
<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>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/grpcpp/security/<a class="el" href="grpcpp_2security_2auth__metadata__processor_8h_source.html">auth_metadata_processor.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>