Trait gstreamer_rtsp_server::prelude::RTSPAuthExt [−][src]
pub trait RTSPAuthExt: 'static {}Show methods
fn add_basic(&self, basic: &str, token: &RTSPToken); fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken); fn default_token(&self) -> Option<RTSPToken>; fn realm(&self) -> Option<GString>; fn supported_methods(&self) -> RTSPAuthMethod; fn tls_authentication_mode(&self) -> TlsAuthenticationMode; fn tls_certificate(&self) -> Option<TlsCertificate>; fn tls_database(&self) -> Option<TlsDatabase>; fn parse_htdigest<P: AsRef<Path>>(&self, path: P, token: &RTSPToken) -> bool; fn remove_basic(&self, basic: &str); fn remove_digest(&self, user: &str); fn set_realm(&self, realm: &str); fn set_supported_methods(&self, methods: RTSPAuthMethod); fn set_tls_authentication_mode(&self, mode: TlsAuthenticationMode); fn set_tls_certificate<P: IsA<TlsCertificate>>(&self, cert: Option<&P>); fn set_tls_database<P: IsA<TlsDatabase>>(&self, database: Option<&P>); fn connect_accept_certificate<F: Fn(&Self, &TlsConnection, &TlsCertificate, TlsCertificateFlags) -> bool + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId;
Required methods
fn add_basic(&self, basic: &str, token: &RTSPToken)
[src]
Add a basic token for the default authentication algorithm that
enables the client with privileges listed in token
.
basic
the basic token
token
authorisation token
fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken)
[src]
v1_12
only.Add a digest user
and pass
for the default authentication algorithm that
enables the client with privileges listed in token
.
user
the digest user name
pass
the digest password
token
authorisation token
fn default_token(&self) -> Option<RTSPToken>
[src]
Get the default token for self
. This token will be used for unauthenticated
users.
Returns
the crate::RTSPToken
of self
. gst_rtsp_token_unref()
after
usage.
fn realm(&self) -> Option<GString>
[src]
v1_16
only.Returns
the realm
of self
fn supported_methods(&self) -> RTSPAuthMethod
[src]
v1_12
only.fn tls_authentication_mode(&self) -> TlsAuthenticationMode
[src]
fn tls_certificate(&self) -> Option<TlsCertificate>
[src]
Get the crate::gio::TlsCertificate
used for negotiating TLS self
.
Returns
the crate::gio::TlsCertificate
of self
. [crate::glib::object::ObjectExt::unref()
] after
usage.
fn tls_database(&self) -> Option<TlsDatabase>
[src]
Get the crate::gio::TlsDatabase
used for verifying client certificate.
Returns
the crate::gio::TlsDatabase
of self
. [crate::glib::object::ObjectExt::unref()
] after
usage.
fn parse_htdigest<P: AsRef<Path>>(&self, path: P, token: &RTSPToken) -> bool
[src]
v1_16
only.Parse the contents of the file at path
and enable the privileges
listed in token
for the users it describes.
The format of the file is expected to match the format described by
https://en.wikipedia.org/wiki/Digest_access_authentication`The_.htdigest_file`,
as output by the htdigest
command.
path
Path to the htdigest file
token
authorisation token
Returns
fn remove_basic(&self, basic: &str)
[src]
fn remove_digest(&self, user: &str)
[src]
v1_12
only.fn set_realm(&self, realm: &str)
[src]
v1_16
only.Set the realm
of self
fn set_supported_methods(&self, methods: RTSPAuthMethod)
[src]
v1_12
only.fn set_tls_authentication_mode(&self, mode: TlsAuthenticationMode)
[src]
The crate::gio::TlsAuthenticationMode
to set on the underlying GTlsServerConnection.
When set to another value than crate::gio::TlsAuthenticationMode::None
,
[crate::RTSPAuth::accept-certificate
] signal will be emitted and must be handled.
mode
fn set_tls_certificate<P: IsA<TlsCertificate>>(&self, cert: Option<&P>)
[src]
Set the TLS certificate for the auth. Client connections will only be accepted when TLS is negotiated.
cert
fn set_tls_database<P: IsA<TlsDatabase>>(&self, database: Option<&P>)
[src]
Sets the certificate database that is used to verify peer certificates.
If set to None
(the default), then peer certificate validation will always
set the [crate::gio::TlsCertificateFlags::UnknownCa
] error.
database
fn connect_accept_certificate<F: Fn(&Self, &TlsConnection, &TlsCertificate, TlsCertificateFlags) -> bool + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId
Emitted during the TLS handshake after the client certificate has
been received. See also Self::set_tls_authentication_mode()
.
connection
peer_cert
the peer’s crate::gio::TlsCertificate
errors
the problems with peer_cert
.
Returns
true
to accept peer_cert
(which will also
immediately end the signal emission). false
to allow the signal
emission to continue, which will cause the handshake to fail if
no one else overrides it.
Implementors
impl<O: IsA<RTSPAuth>> RTSPAuthExt for O
[src]
impl<O: IsA<RTSPAuth>> RTSPAuthExt for O
[src]fn add_basic(&self, basic: &str, token: &RTSPToken)
[src]
fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken)
[src]
fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken)
[src]v1_12
only.fn default_token(&self) -> Option<RTSPToken>
[src]
fn supported_methods(&self) -> RTSPAuthMethod
[src]
fn supported_methods(&self) -> RTSPAuthMethod
[src]v1_12
only.fn tls_authentication_mode(&self) -> TlsAuthenticationMode
[src]
fn tls_certificate(&self) -> Option<TlsCertificate>
[src]
fn tls_database(&self) -> Option<TlsDatabase>
[src]
fn parse_htdigest<P: AsRef<Path>>(&self, path: P, token: &RTSPToken) -> bool
[src]
fn parse_htdigest<P: AsRef<Path>>(&self, path: P, token: &RTSPToken) -> bool
[src]v1_16
only.fn remove_basic(&self, basic: &str)
[src]
fn remove_digest(&self, user: &str)
[src]
fn remove_digest(&self, user: &str)
[src]v1_12
only.fn set_supported_methods(&self, methods: RTSPAuthMethod)
[src]
fn set_supported_methods(&self, methods: RTSPAuthMethod)
[src]v1_12
only.fn set_tls_authentication_mode(&self, mode: TlsAuthenticationMode)
[src]
fn set_tls_certificate<P: IsA<TlsCertificate>>(&self, cert: Option<&P>)
[src]
fn set_tls_database<P: IsA<TlsDatabase>>(&self, database: Option<&P>)
[src]
fn connect_accept_certificate<F: Fn(&Self, &TlsConnection, &TlsCertificate, TlsCertificateFlags) -> bool + Send + Sync + 'static>(
&self,
f: F
) -> SignalHandlerId
[src]
&self,
f: F
) -> SignalHandlerId