Trait gstreamer_rtsp_server::RTSPAuthExt[][src]

pub trait RTSPAuthExt {
    fn add_basic(&self, basic: &str, token: &RTSPToken);
fn add_digest(&self, user: &str, pass: &str, token: &RTSPToken);
fn get_default_token(&self) -> Option<RTSPToken>;
fn get_supported_methods(&self) -> RTSPAuthMethod;
fn get_tls_authentication_mode(&self) -> TlsAuthenticationMode;
fn get_tls_certificate(&self) -> Option<TlsCertificate>;
fn get_tls_database(&self) -> Option<TlsDatabase>;
fn remove_basic(&self, basic: &str);
fn remove_digest(&self, user: &str);
fn set_supported_methods(&self, methods: RTSPAuthMethod);
fn set_tls_authentication_mode(&self, mode: TlsAuthenticationMode);
fn set_tls_certificate<'a, P: Into<Option<&'a TlsCertificate>>>(
        &self,
        cert: P
    );
fn set_tls_database<'a, P: IsA<TlsDatabase> + 'a, Q: Into<Option<&'a P>>>(
        &self,
        database: Q
    );
fn connect_accept_certificate<F: Fn(&Self, &TlsConnection, &TlsCertificate, TlsCertificateFlags) -> bool + Send + Sync + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; }

Trait containing all RTSPAuth methods.

Implementors

RTSPAuth

Required Methods

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

Add a digest user and pass for the default authentication algorithm that enables the client with privileges listed in token.

Feature: v1_12

user

the digest user name

pass

the digest password

token

authorisation token

Get the default token for self. This token will be used for unauthenticated users.

Returns

the RTSPToken of self. gst_rtsp_token_unref after usage.

Gets the supported authentication methods of self.

Feature: v1_12

Returns

The supported authentication methods

Get the gio::TlsAuthenticationMode.

Returns

the gio::TlsAuthenticationMode.

Get the gio::TlsCertificate used for negotiating TLS self.

Returns

the gio::TlsCertificate of self. gobject::ObjectExt::unref after usage.

Get the gio::TlsDatabase used for verifying client certificate.

Returns

the gio::TlsDatabase of self. gobject::ObjectExt::unref after usage.

Removes basic authentication token.

basic

the basic token

Removes a digest user.

Feature: v1_12

user

the digest user name

Sets the supported authentication methods for self.

Feature: v1_12

methods

supported methods

The gio::TlsAuthenticationMode to set on the underlying GTlsServerConnection. When set to another value than gio::TlsAuthenticationMode::None, RTSPAuth::accept-certificate signal will be emitted and must be handled.

mode

a gio::TlsAuthenticationMode

Set the TLS certificate for the auth. Client connections will only be accepted when TLS is negotiated.

cert

a gio::TlsCertificate

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 gio::TlsCertificateFlags::UnknownCa error.

Since 1.6

database

a gio::TlsDatabase

Emitted during the TLS handshake after the client certificate has been received. See also RTSPAuthExt::set_tls_authentication_mode.

connection

a gio::TlsConnection

peer_cert

the peer's 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