Browse code

secsipid: docs for secsipid_check_identity_pubkey()

Daniel-Constantin Mierla authored on 17/11/2020 09:16:55
Showing 1 changed files
... ...
@@ -171,6 +171,40 @@ request_route {
171 171
     ...
172 172
 }
173 173
 ...
174
+</programlisting>
175
+		</example>
176
+		<para>
177
+			Further checks can be done with config operations, decoding the JWT header
178
+			and payload using {s.select} and {s.decode.base64t} transformations
179
+			together with jansson module.
180
+		</para>
181
+	</section>
182
+	<section id="secsipid.f.secsipid_check_identity_pubkey">
183
+		<title>
184
+		<function moreinfo="none">secsipid_check_identity(pubkeyVal)</function>
185
+		</title>
186
+		<para>
187
+			Similar to secsipid_check_identity() with the public key value
188
+			provided in the parameter.
189
+		</para>
190
+		<para>
191
+		The parameters can contain pseudo-variables.
192
+		</para>
193
+		<para>
194
+		This function can be used from ANY_ROUTE.
195
+		</para>
196
+		<example>
197
+		<title><function>secsipid_check_identity_pubkey</function> usage</title>
198
+		<programlisting format="linespecific">
199
+...
200
+request_route {
201
+  ...
202
+  http_client_query("https://provider.com/stir-shaken/cert.pem", "$var(pubkey)");
203
+  ...
204
+  if(secsipid_check_identity_pubkey("$var(pubkey)")) { ... }
205
+  ...
206
+}
207
+...
174 208
 </programlisting>
175 209
 		</example>
176 210
 		<para>