Initial release including wifi display based on gst-rtsp-server-1.4.1
[platform/upstream/gstreamer.git] / docs / libs / html / GstRTSPAuth.html
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html>
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <title>GStreamer RTSP Server Reference Manual: GstRTSPAuth</title>
6 <meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
7 <link rel="home" href="index.html" title="GStreamer RTSP Server Reference Manual">
8 <link rel="up" href="ch01.html" title="">
9 <link rel="prev" href="gst-rtsp-server-GstRTSPThreadPool.html" title="GstRTSPThreadPool">
10 <link rel="next" href="gst-rtsp-server-GstRTSPToken.html" title="GstRTSPToken">
11 <meta name="generator" content="GTK-Doc V1.21 (XML mode)">
12 <link rel="stylesheet" href="style.css" type="text/css">
13 </head>
14 <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
15 <table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
16 <td width="100%" align="left" class="shortcuts">
17 <a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
18                   <a href="#GstRTSPAuth.description" class="shortcut">Description</a></span><span id="nav_hierarchy">  <span class="dim">|</span> 
19                   <a href="#GstRTSPAuth.object-hierarchy" class="shortcut">Object Hierarchy</a></span>
20 </td>
21 <td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
22 <td><a accesskey="u" href="ch01.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
23 <td><a accesskey="p" href="gst-rtsp-server-GstRTSPThreadPool.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
24 <td><a accesskey="n" href="gst-rtsp-server-GstRTSPToken.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
25 </tr></table>
26 <div class="refentry">
27 <a name="GstRTSPAuth"></a><div class="titlepage"></div>
28 <div class="refnamediv"><table width="100%"><tr>
29 <td valign="top">
30 <h2><span class="refentrytitle"><a name="GstRTSPAuth.top_of_page"></a>GstRTSPAuth</span></h2>
31 <p>GstRTSPAuth — Authentication and authorization</p>
32 </td>
33 <td class="gallery_image" valign="top" align="right"></td>
34 </tr></table></div>
35 <div class="refsect1">
36 <a name="GstRTSPAuth.functions"></a><h2>Functions</h2>
37 <div class="informaltable"><table width="100%" border="0">
38 <colgroup>
39 <col width="150px" class="functions_return">
40 <col class="functions_name">
41 </colgroup>
42 <tbody>
43 <tr>
44 <td class="function_type">
45 <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="returnvalue">GstRTSPAuth</span></a> *
46 </td>
47 <td class="function_name">
48 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-new" title="gst_rtsp_auth_new ()">gst_rtsp_auth_new</a> <span class="c_punctuation">()</span>
49 </td>
50 </tr>
51 <tr>
52 <td class="function_type">
53 <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="returnvalue">GTlsCertificate</span></a> *
54 </td>
55 <td class="function_name">
56 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-get-tls-certificate" title="gst_rtsp_auth_get_tls_certificate ()">gst_rtsp_auth_get_tls_certificate</a> <span class="c_punctuation">()</span>
57 </td>
58 </tr>
59 <tr>
60 <td class="function_type">
61 <span class="returnvalue">void</span>
62 </td>
63 <td class="function_name">
64 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-set-tls-certificate" title="gst_rtsp_auth_set_tls_certificate ()">gst_rtsp_auth_set_tls_certificate</a> <span class="c_punctuation">()</span>
65 </td>
66 </tr>
67 <tr>
68 <td class="function_type">
69 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
70 </td>
71 <td class="function_name">
72 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-make-basic" title="gst_rtsp_auth_make_basic ()">gst_rtsp_auth_make_basic</a> <span class="c_punctuation">()</span>
73 </td>
74 </tr>
75 <tr>
76 <td class="function_type">
77 <span class="returnvalue">void</span>
78 </td>
79 <td class="function_name">
80 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-add-basic" title="gst_rtsp_auth_add_basic ()">gst_rtsp_auth_add_basic</a> <span class="c_punctuation">()</span>
81 </td>
82 </tr>
83 <tr>
84 <td class="function_type">
85 <span class="returnvalue">void</span>
86 </td>
87 <td class="function_name">
88 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-remove-basic" title="gst_rtsp_auth_remove_basic ()">gst_rtsp_auth_remove_basic</a> <span class="c_punctuation">()</span>
89 </td>
90 </tr>
91 <tr>
92 <td class="function_type">
93 <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
94 </td>
95 <td class="function_name">
96 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-check" title="gst_rtsp_auth_check ()">gst_rtsp_auth_check</a> <span class="c_punctuation">()</span>
97 </td>
98 </tr>
99 <tr>
100 <td class="function_type">
101 <a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="returnvalue">GstRTSPToken</span></a> *
102 </td>
103 <td class="function_name">
104 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-get-default-token" title="gst_rtsp_auth_get_default_token ()">gst_rtsp_auth_get_default_token</a> <span class="c_punctuation">()</span>
105 </td>
106 </tr>
107 <tr>
108 <td class="function_type">
109 <span class="returnvalue">void</span>
110 </td>
111 <td class="function_name">
112 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-set-default-token" title="gst_rtsp_auth_set_default_token ()">gst_rtsp_auth_set_default_token</a> <span class="c_punctuation">()</span>
113 </td>
114 </tr>
115 </tbody>
116 </table></div>
117 </div>
118 <div class="refsect1">
119 <a name="GstRTSPAuth.other"></a><h2>Types and Values</h2>
120 <div class="informaltable"><table width="100%" border="0">
121 <colgroup>
122 <col width="150px" class="name">
123 <col class="description">
124 </colgroup>
125 <tbody>
126 <tr>
127 <td class="datatype_keyword">struct</td>
128 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GstRTSPAuth-struct" title="struct GstRTSPAuth">GstRTSPAuth</a></td>
129 </tr>
130 <tr>
131 <td class="datatype_keyword">struct</td>
132 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GstRTSPAuthClass" title="struct GstRTSPAuthClass">GstRTSPAuthClass</a></td>
133 </tr>
134 <tr>
135 <td class="define_keyword">#define</td>
136 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-AUTH-CHECK-CONNECT:CAPS" title="GST_RTSP_AUTH_CHECK_CONNECT">GST_RTSP_AUTH_CHECK_CONNECT</a></td>
137 </tr>
138 <tr>
139 <td class="define_keyword">#define</td>
140 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-AUTH-CHECK-URL:CAPS" title="GST_RTSP_AUTH_CHECK_URL">GST_RTSP_AUTH_CHECK_URL</a></td>
141 </tr>
142 <tr>
143 <td class="define_keyword">#define</td>
144 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-AUTH-CHECK-MEDIA-FACTORY-ACCESS:CAPS" title="GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS">GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS</a></td>
145 </tr>
146 <tr>
147 <td class="define_keyword">#define</td>
148 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-AUTH-CHECK-MEDIA-FACTORY-CONSTRUCT:CAPS" title="GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT">GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT</a></td>
149 </tr>
150 <tr>
151 <td class="define_keyword">#define</td>
152 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-AUTH-CHECK-TRANSPORT-CLIENT-SETTINGS:CAPS" title="GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS">GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS</a></td>
153 </tr>
154 <tr>
155 <td class="define_keyword">#define</td>
156 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-TOKEN-MEDIA-FACTORY-ROLE:CAPS" title="GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE">GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE</a></td>
157 </tr>
158 <tr>
159 <td class="define_keyword">#define</td>
160 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-TOKEN-TRANSPORT-CLIENT-SETTINGS:CAPS" title="GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS">GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS</a></td>
161 </tr>
162 <tr>
163 <td class="define_keyword">#define</td>
164 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-PERM-MEDIA-FACTORY-ACCESS:CAPS" title="GST_RTSP_PERM_MEDIA_FACTORY_ACCESS">GST_RTSP_PERM_MEDIA_FACTORY_ACCESS</a></td>
165 </tr>
166 <tr>
167 <td class="define_keyword">#define</td>
168 <td class="function_name"><a class="link" href="GstRTSPAuth.html#GST-RTSP-PERM-MEDIA-FACTORY-CONSTRUCT:CAPS" title="GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT">GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT</a></td>
169 </tr>
170 </tbody>
171 </table></div>
172 </div>
173 <div class="refsect1">
174 <a name="GstRTSPAuth.object-hierarchy"></a><h2>Object Hierarchy</h2>
175 <pre class="screen">    <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObject">GObject</a>
176     <span class="lineart">╰──</span> GstRTSPAuth
177 </pre>
178 </div>
179 <div class="refsect1">
180 <a name="GstRTSPAuth.description"></a><h2>Description</h2>
181 <p>The <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> object is responsible for checking if the current user is
182 allowed to perform requested actions. The default implementation has some
183 reasonable checks but subclasses can implement custom security policies.</p>
184 <p>A new auth object is made with <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-new" title="gst_rtsp_auth_new ()"><code class="function">gst_rtsp_auth_new()</code></a>. It is usually configured
185 on the <a class="link" href="GstRTSPServer.html" title="GstRTSPServer"><span class="type">GstRTSPServer</span></a> object.</p>
186 <p>The RTSP server will call <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-check" title="gst_rtsp_auth_check ()"><code class="function">gst_rtsp_auth_check()</code></a> with a string describing the
187 check to perform. The possible checks are prefixed with
188 GST_RTSP_AUTH_CHECK_*. Depending on the check, the default implementation
189 will use the current <a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a>, <a class="link" href="gst-rtsp-server-GstRTSPContext.html#GstRTSPContext" title="struct GstRTSPContext"><span class="type">GstRTSPContext</span></a> and
190 <a class="link" href="gst-rtsp-server-GstRTSPPermissions.html#GstRTSPPermissions" title="struct GstRTSPPermissions"><span class="type">GstRTSPPermissions</span></a> on the object to check if an operation is allowed.</p>
191 <p>The default <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> object has support for basic authentication. With
192 <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-add-basic" title="gst_rtsp_auth_add_basic ()"><code class="function">gst_rtsp_auth_add_basic()</code></a> you can add a basic authentication string together
193 with the <a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a> that will become active when successfully
194 authenticated.</p>
195 <p>When a TLS certificate has been set with <a class="link" href="GstRTSPAuth.html#gst-rtsp-auth-set-tls-certificate" title="gst_rtsp_auth_set_tls_certificate ()"><code class="function">gst_rtsp_auth_set_tls_certificate()</code></a>,
196 the default auth object will require the client to connect with a TLS
197 connection.</p>
198 <p>Last reviewed on 2013-07-16 (1.0.0)</p>
199 </div>
200 <div class="refsect1">
201 <a name="GstRTSPAuth.functions_details"></a><h2>Functions</h2>
202 <div class="refsect2">
203 <a name="gst-rtsp-auth-new"></a><h3>gst_rtsp_auth_new ()</h3>
204 <pre class="programlisting"><a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="returnvalue">GstRTSPAuth</span></a> *
205 gst_rtsp_auth_new (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
206 <p>Create a new <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> instance.</p>
207 <div class="refsect3">
208 <a name="id-1.2.16.7.2.5"></a><h4>Returns</h4>
209 <p> a new <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a>. </p>
210 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
211 </div>
212 </div>
213 <hr>
214 <div class="refsect2">
215 <a name="gst-rtsp-auth-get-tls-certificate"></a><h3>gst_rtsp_auth_get_tls_certificate ()</h3>
216 <pre class="programlisting"><a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="returnvalue">GTlsCertificate</span></a> *
217 gst_rtsp_auth_get_tls_certificate (<em class="parameter"><code><a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> *auth</code></em>);</pre>
218 <p>Get the <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a> used for negotiating TLS <em class="parameter"><code>auth</code></em>
219 .</p>
220 <div class="refsect3">
221 <a name="id-1.2.16.7.3.5"></a><h4>Parameters</h4>
222 <div class="informaltable"><table width="100%" border="0">
223 <colgroup>
224 <col width="150px" class="parameters_name">
225 <col class="parameters_description">
226 <col width="200px" class="parameters_annotations">
227 </colgroup>
228 <tbody><tr>
229 <td class="parameter_name"><p>auth</p></td>
230 <td class="parameter_description"><p>a <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a></p></td>
231 <td class="parameter_annotations"> </td>
232 </tr></tbody>
233 </table></div>
234 </div>
235 <div class="refsect3">
236 <a name="id-1.2.16.7.3.6"></a><h4>Returns</h4>
237 <p> the <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a> of <em class="parameter"><code>auth</code></em>
238 . <a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-unref"><code class="function">g_object_unref()</code></a> after
239 usage. </p>
240 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
241 </div>
242 </div>
243 <hr>
244 <div class="refsect2">
245 <a name="gst-rtsp-auth-set-tls-certificate"></a><h3>gst_rtsp_auth_set_tls_certificate ()</h3>
246 <pre class="programlisting"><span class="returnvalue">void</span>
247 gst_rtsp_auth_set_tls_certificate (<em class="parameter"><code><a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> *auth</code></em>,
248                                    <em class="parameter"><code><a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a> *cert</code></em>);</pre>
249 <p>Set the TLS certificate for the auth. Client connections will only
250 be accepted when TLS is negotiated.</p>
251 <div class="refsect3">
252 <a name="id-1.2.16.7.4.5"></a><h4>Parameters</h4>
253 <div class="informaltable"><table width="100%" border="0">
254 <colgroup>
255 <col width="150px" class="parameters_name">
256 <col class="parameters_description">
257 <col width="200px" class="parameters_annotations">
258 </colgroup>
259 <tbody>
260 <tr>
261 <td class="parameter_name"><p>auth</p></td>
262 <td class="parameter_description"><p>a <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a></p></td>
263 <td class="parameter_annotations"> </td>
264 </tr>
265 <tr>
266 <td class="parameter_name"><p>cert</p></td>
267 <td class="parameter_description"><p> a <a href="http://library.gnome.org/devel/gio/unstable/GTlsCertificate.html"><span class="type">GTlsCertificate</span></a>. </p></td>
268 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
269 </tr>
270 </tbody>
271 </table></div>
272 </div>
273 </div>
274 <hr>
275 <div class="refsect2">
276 <a name="gst-rtsp-auth-make-basic"></a><h3>gst_rtsp_auth_make_basic ()</h3>
277 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> *
278 gst_rtsp_auth_make_basic (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *user</code></em>,
279                           <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *pass</code></em>);</pre>
280 <p>Construct a Basic authorisation token from <em class="parameter"><code>user</code></em>
281  and <em class="parameter"><code>pass</code></em>
282 .</p>
283 <div class="refsect3">
284 <a name="id-1.2.16.7.5.5"></a><h4>Parameters</h4>
285 <div class="informaltable"><table width="100%" border="0">
286 <colgroup>
287 <col width="150px" class="parameters_name">
288 <col class="parameters_description">
289 <col width="200px" class="parameters_annotations">
290 </colgroup>
291 <tbody>
292 <tr>
293 <td class="parameter_name"><p>user</p></td>
294 <td class="parameter_description"><p>a userid</p></td>
295 <td class="parameter_annotations"> </td>
296 </tr>
297 <tr>
298 <td class="parameter_name"><p>pass</p></td>
299 <td class="parameter_description"><p>a password</p></td>
300 <td class="parameter_annotations"> </td>
301 </tr>
302 </tbody>
303 </table></div>
304 </div>
305 <div class="refsect3">
306 <a name="id-1.2.16.7.5.6"></a><h4>Returns</h4>
307 <p> the base64 encoding of the string <em class="parameter"><code>user</code></em>
308 :<em class="parameter"><code>pass</code></em>
309 .
310 <a href="http://library.gnome.org/devel/glib/unstable/glib-Memory-Allocation.html#g-free"><code class="function">g_free()</code></a> after usage. </p>
311 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
312 </div>
313 </div>
314 <hr>
315 <div class="refsect2">
316 <a name="gst-rtsp-auth-add-basic"></a><h3>gst_rtsp_auth_add_basic ()</h3>
317 <pre class="programlisting"><span class="returnvalue">void</span>
318 gst_rtsp_auth_add_basic (<em class="parameter"><code><a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> *auth</code></em>,
319                          <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *basic</code></em>,
320                          <em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a> *token</code></em>);</pre>
321 <p>Add a basic token for the default authentication algorithm that
322 enables the client with privileges listed in <em class="parameter"><code>token</code></em>
323 .</p>
324 <div class="refsect3">
325 <a name="id-1.2.16.7.6.5"></a><h4>Parameters</h4>
326 <div class="informaltable"><table width="100%" border="0">
327 <colgroup>
328 <col width="150px" class="parameters_name">
329 <col class="parameters_description">
330 <col width="200px" class="parameters_annotations">
331 </colgroup>
332 <tbody>
333 <tr>
334 <td class="parameter_name"><p>auth</p></td>
335 <td class="parameter_description"><p>a <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a></p></td>
336 <td class="parameter_annotations"> </td>
337 </tr>
338 <tr>
339 <td class="parameter_name"><p>basic</p></td>
340 <td class="parameter_description"><p>the basic token</p></td>
341 <td class="parameter_annotations"> </td>
342 </tr>
343 <tr>
344 <td class="parameter_name"><p>token</p></td>
345 <td class="parameter_description"><p> authorisation token. </p></td>
346 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
347 </tr>
348 </tbody>
349 </table></div>
350 </div>
351 </div>
352 <hr>
353 <div class="refsect2">
354 <a name="gst-rtsp-auth-remove-basic"></a><h3>gst_rtsp_auth_remove_basic ()</h3>
355 <pre class="programlisting"><span class="returnvalue">void</span>
356 gst_rtsp_auth_remove_basic (<em class="parameter"><code><a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> *auth</code></em>,
357                             <em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *basic</code></em>);</pre>
358 <p>Add a basic token for the default authentication algorithm that
359 enables the client with privileges from <em class="parameter"><code>authgroup</code></em>
360 .</p>
361 <div class="refsect3">
362 <a name="id-1.2.16.7.7.5"></a><h4>Parameters</h4>
363 <div class="informaltable"><table width="100%" border="0">
364 <colgroup>
365 <col width="150px" class="parameters_name">
366 <col class="parameters_description">
367 <col width="200px" class="parameters_annotations">
368 </colgroup>
369 <tbody>
370 <tr>
371 <td class="parameter_name"><p>auth</p></td>
372 <td class="parameter_description"><p>a <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a></p></td>
373 <td class="parameter_annotations"> </td>
374 </tr>
375 <tr>
376 <td class="parameter_name"><p>basic</p></td>
377 <td class="parameter_description"><p> the basic token. </p></td>
378 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span></td>
379 </tr>
380 </tbody>
381 </table></div>
382 </div>
383 </div>
384 <hr>
385 <div class="refsect2">
386 <a name="gst-rtsp-auth-check"></a><h3>gst_rtsp_auth_check ()</h3>
387 <pre class="programlisting"><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a>
388 gst_rtsp_auth_check (<em class="parameter"><code>const <a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gchar"><span class="type">gchar</span></a> *check</code></em>);</pre>
389 <p>Check if <em class="parameter"><code>check</code></em>
390  is allowed in the current context.</p>
391 <div class="refsect3">
392 <a name="id-1.2.16.7.8.5"></a><h4>Parameters</h4>
393 <div class="informaltable"><table width="100%" border="0">
394 <colgroup>
395 <col width="150px" class="parameters_name">
396 <col class="parameters_description">
397 <col width="200px" class="parameters_annotations">
398 </colgroup>
399 <tbody><tr>
400 <td class="parameter_name"><p>check</p></td>
401 <td class="parameter_description"><p>the item to check</p></td>
402 <td class="parameter_annotations"> </td>
403 </tr></tbody>
404 </table></div>
405 </div>
406 <div class="refsect3">
407 <a name="id-1.2.16.7.8.6"></a><h4>Returns</h4>
408 <p> FALSE if check failed.</p>
409 <p></p>
410 </div>
411 </div>
412 <hr>
413 <div class="refsect2">
414 <a name="gst-rtsp-auth-get-default-token"></a><h3>gst_rtsp_auth_get_default_token ()</h3>
415 <pre class="programlisting"><a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="returnvalue">GstRTSPToken</span></a> *
416 gst_rtsp_auth_get_default_token (<em class="parameter"><code><a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> *auth</code></em>);</pre>
417 <p>Get the default token for <em class="parameter"><code>auth</code></em>
418 . This token will be used for unauthenticated
419 users.</p>
420 <div class="refsect3">
421 <a name="id-1.2.16.7.9.5"></a><h4>Parameters</h4>
422 <div class="informaltable"><table width="100%" border="0">
423 <colgroup>
424 <col width="150px" class="parameters_name">
425 <col class="parameters_description">
426 <col width="200px" class="parameters_annotations">
427 </colgroup>
428 <tbody><tr>
429 <td class="parameter_name"><p>auth</p></td>
430 <td class="parameter_description"><p>a <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a></p></td>
431 <td class="parameter_annotations"> </td>
432 </tr></tbody>
433 </table></div>
434 </div>
435 <div class="refsect3">
436 <a name="id-1.2.16.7.9.6"></a><h4>Returns</h4>
437 <p> the <a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a> of <em class="parameter"><code>auth</code></em>
438 . <a class="link" href="gst-rtsp-server-GstRTSPToken.html#gst-rtsp-token-unref" title="gst_rtsp_token_unref ()"><code class="function">gst_rtsp_token_unref()</code></a> after
439 usage. </p>
440 <p><span class="annotation">[<acronym title="Free data after the code is done."><span class="acronym">transfer full</span></acronym>]</span></p>
441 </div>
442 </div>
443 <hr>
444 <div class="refsect2">
445 <a name="gst-rtsp-auth-set-default-token"></a><h3>gst_rtsp_auth_set_default_token ()</h3>
446 <pre class="programlisting"><span class="returnvalue">void</span>
447 gst_rtsp_auth_set_default_token (<em class="parameter"><code><a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> *auth</code></em>,
448                                  <em class="parameter"><code><a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a> *token</code></em>);</pre>
449 <p>Set the default <a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a> to <em class="parameter"><code>token</code></em>
450  in <em class="parameter"><code>auth</code></em>
451 . The default token will
452 be used for unauthenticated users.</p>
453 <div class="refsect3">
454 <a name="id-1.2.16.7.10.5"></a><h4>Parameters</h4>
455 <div class="informaltable"><table width="100%" border="0">
456 <colgroup>
457 <col width="150px" class="parameters_name">
458 <col class="parameters_description">
459 <col width="200px" class="parameters_annotations">
460 </colgroup>
461 <tbody>
462 <tr>
463 <td class="parameter_name"><p>auth</p></td>
464 <td class="parameter_description"><p>a <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a></p></td>
465 <td class="parameter_annotations"> </td>
466 </tr>
467 <tr>
468 <td class="parameter_name"><p>token</p></td>
469 <td class="parameter_description"><p> a <a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a>. </p></td>
470 <td class="parameter_annotations"><span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>][<acronym title="NULL is OK, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span></td>
471 </tr>
472 </tbody>
473 </table></div>
474 </div>
475 </div>
476 </div>
477 <div class="refsect1">
478 <a name="GstRTSPAuth.other_details"></a><h2>Types and Values</h2>
479 <div class="refsect2">
480 <a name="GstRTSPAuth-struct"></a><h3>struct GstRTSPAuth</h3>
481 <pre class="programlisting">struct GstRTSPAuth;</pre>
482 <p>The authentication structure.</p>
483 </div>
484 <hr>
485 <div class="refsect2">
486 <a name="GstRTSPAuthClass"></a><h3>struct GstRTSPAuthClass</h3>
487 <pre class="programlisting">struct GstRTSPAuthClass {
488   GObjectClass  parent_class;
489
490   gboolean           (*authenticate) (GstRTSPAuth *auth, GstRTSPContext *ctx);
491   gboolean           (*check)        (GstRTSPAuth *auth, GstRTSPContext *ctx,
492                                       const gchar *check);
493 };
494 </pre>
495 <p>The authentication class.</p>
496 <div class="refsect3">
497 <a name="id-1.2.16.8.3.5"></a><h4>Members</h4>
498 <div class="informaltable"><table width="100%" border="0">
499 <colgroup>
500 <col width="300px" class="struct_members_name">
501 <col class="struct_members_description">
502 <col width="200px" class="struct_members_annotations">
503 </colgroup>
504 <tbody>
505 <tr>
506 <td class="struct_member_name"><p><a href="http://library.gnome.org/devel/gobject/unstable/gobject-The-Base-Object-Type.html#GObjectClass"><span class="type">GObjectClass</span></a> <em class="structfield"><code><a name="GstRTSPAuthClass.parent-class"></a>parent_class</code></em>;</p></td>
507 <td> </td>
508 <td> </td>
509 </tr>
510 <tr>
511 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstRTSPAuthClass.authenticate"></a>authenticate</code></em> ()</p></td>
512 <td class="struct_member_description"><p>check the authentication of a client. The default implementation
513 checks if the authentication in the header matches one of the basic
514 authentication tokens. This function should set the authgroup field
515 in the context.</p></td>
516 <td class="struct_member_annotations"> </td>
517 </tr>
518 <tr>
519 <td class="struct_member_name"><p><em class="structfield"><code><a name="GstRTSPAuthClass.check"></a>check</code></em> ()</p></td>
520 <td class="struct_member_description"><p>check if a resource can be accessed. this function should
521 call authenticate to authenticate the client when needed. The method
522 should also construct and send an appropriate response message on
523 error.</p></td>
524 <td class="struct_member_annotations"> </td>
525 </tr>
526 </tbody>
527 </table></div>
528 </div>
529 </div>
530 <hr>
531 <div class="refsect2">
532 <a name="GST-RTSP-AUTH-CHECK-CONNECT:CAPS"></a><h3>GST_RTSP_AUTH_CHECK_CONNECT</h3>
533 <pre class="programlisting">#define GST_RTSP_AUTH_CHECK_CONNECT                  "auth.check.connect"
534 </pre>
535 <p>Check a new connection</p>
536 </div>
537 <hr>
538 <div class="refsect2">
539 <a name="GST-RTSP-AUTH-CHECK-URL:CAPS"></a><h3>GST_RTSP_AUTH_CHECK_URL</h3>
540 <pre class="programlisting">#define GST_RTSP_AUTH_CHECK_URL                      "auth.check.url"
541 </pre>
542 <p>Check the URL and methods</p>
543 </div>
544 <hr>
545 <div class="refsect2">
546 <a name="GST-RTSP-AUTH-CHECK-MEDIA-FACTORY-ACCESS:CAPS"></a><h3>GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS</h3>
547 <pre class="programlisting">#define GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_ACCESS     "auth.check.media.factory.access"
548 </pre>
549 <p>Check if access is allowed to a factory.
550 When access is not allowed an 404 Not Found is sent in the response.</p>
551 </div>
552 <hr>
553 <div class="refsect2">
554 <a name="GST-RTSP-AUTH-CHECK-MEDIA-FACTORY-CONSTRUCT:CAPS"></a><h3>GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT</h3>
555 <pre class="programlisting">#define GST_RTSP_AUTH_CHECK_MEDIA_FACTORY_CONSTRUCT  "auth.check.media.factory.construct"
556 </pre>
557 <p>Check if media can be constructed from a media factory
558 A response should be sent on error.</p>
559 </div>
560 <hr>
561 <div class="refsect2">
562 <a name="GST-RTSP-AUTH-CHECK-TRANSPORT-CLIENT-SETTINGS:CAPS"></a><h3>GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS</h3>
563 <pre class="programlisting">#define GST_RTSP_AUTH_CHECK_TRANSPORT_CLIENT_SETTINGS  "auth.check.transport.client-settings"
564 </pre>
565 <p>Check if the client can specify TTL, destination and
566 port pair in multicast. No response is sent when the check returns
567 <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a>.</p>
568 </div>
569 <hr>
570 <div class="refsect2">
571 <a name="GST-RTSP-TOKEN-MEDIA-FACTORY-ROLE:CAPS"></a><h3>GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE</h3>
572 <pre class="programlisting">#define GST_RTSP_TOKEN_MEDIA_FACTORY_ROLE      "media.factory.role"
573 </pre>
574 <p>G_TYPE_STRING, the role to use when dealing with media factories</p>
575 <p>The default <a class="link" href="GstRTSPAuth.html" title="GstRTSPAuth"><span class="type">GstRTSPAuth</span></a> object uses this string in the token to find the
576 role of the media factory. It will then retrieve the <a class="link" href="gst-rtsp-server-GstRTSPPermissions.html#GstRTSPPermissions" title="struct GstRTSPPermissions"><span class="type">GstRTSPPermissions</span></a> of
577 the media factory and retrieve the role with the same name.</p>
578 </div>
579 <hr>
580 <div class="refsect2">
581 <a name="GST-RTSP-TOKEN-TRANSPORT-CLIENT-SETTINGS:CAPS"></a><h3>GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS</h3>
582 <pre class="programlisting">#define GST_RTSP_TOKEN_TRANSPORT_CLIENT_SETTINGS   "transport.client-settings"
583 </pre>
584 <p>G_TYPE_BOOLEAN, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the client can specify TTL, destination and
585     port pair in multicast.</p>
586 </div>
587 <hr>
588 <div class="refsect2">
589 <a name="GST-RTSP-PERM-MEDIA-FACTORY-ACCESS:CAPS"></a><h3>GST_RTSP_PERM_MEDIA_FACTORY_ACCESS</h3>
590 <pre class="programlisting">#define GST_RTSP_PERM_MEDIA_FACTORY_ACCESS      "media.factory.access"
591 </pre>
592 <p>G_TYPE_BOOLEAN, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the media can be accessed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will
593 return a 404 Not Found error when trying to access the media.</p>
594 </div>
595 <hr>
596 <div class="refsect2">
597 <a name="GST-RTSP-PERM-MEDIA-FACTORY-CONSTRUCT:CAPS"></a><h3>GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT</h3>
598 <pre class="programlisting">#define GST_RTSP_PERM_MEDIA_FACTORY_CONSTRUCT   "media.factory.construct"
599 </pre>
600 <p>G_TYPE_BOOLEAN, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the media can be constructed, <a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#FALSE:CAPS"><code class="literal">FALSE</code></a> will
601 return a 404 Not Found error when trying to access the media.</p>
602 </div>
603 </div>
604 <div class="refsect1">
605 <a name="GstRTSPAuth.see-also"></a><h2>See Also</h2>
606 <p><a class="link" href="gst-rtsp-server-GstRTSPPermissions.html#GstRTSPPermissions" title="struct GstRTSPPermissions"><span class="type">GstRTSPPermissions</span></a>, <a class="link" href="gst-rtsp-server-GstRTSPToken.html#GstRTSPToken" title="struct GstRTSPToken"><span class="type">GstRTSPToken</span></a></p>
607 </div>
608 </div>
609 <div class="footer">
610 <hr>
611           Generated by GTK-Doc V1.21</div>
612 </body>
613 </html>