This RTSPSecurity class is used for implementing security in the RTSP server.
public class RTSPSecurity : IDisposable
Public Class RTSPSecurity
Implements System.IDisposable
public ref class RTSPSecurity : public System.IDisposable
RTSP Servers use security that is similar to that used in HTML servers and is based on authentication. The authentication methods rely on the server specifying a username and a password pair with the right to access a certain Media file.
There are two authentication methods:
From a performance standpoint, the two authentication methods have roughly the same speed. So the method you choose depends on how secure you want your server to be and in what kind of authentication is supported in your client.
The LEAD RTSP Server supports both authentication methods.
Authentication is optional, you do not need to use it unless your application requires it.
If you don't do anything, the server will not restrict access.
To implement security, you create a RTSPSecurity object and set it to the RTSPServer object using RTSPServer.SetSecurity The RTSPServer object keeps a reference to the actual RTSPSecurity object, so if you add/remove users to the RTSPSecurity object after you set it to the RTSPServer object, these changes will be reflected in the security settings for that RTSPServer instance.
To implement different security settings for each file, you create a different RTSPSecurity object for each session.
To use the same security settings for all the files, you can create one RTSPSecurity object and use it for every session you create.
In general, you need to do the following:
using Leadtools;
using Leadtools.Multimedia;
using LeadtoolsMultimediaExamples.Fixtures;
public void SetSecurity()
{
RTSPSecurity security = new RTSPSecurity();
security.RealmName = "MyRTSPServer";
security.AuthenticationRequired = RTSPAuthenticationType.Basic;
security.AddUser("TestUser", "TestPassword");
_server.SetSecurity(-1, security);
}
Imports Leadtools
Imports Leadtools.Multimedia
Imports LeadtoolsMultimediaExamples.Fixtures
Public Sub SetSecurity()
Dim security As RTSPSecurity = New RTSPSecurity()
security.RealmName = "MyRTSPServer"
security.AuthenticationRequired = RTSPAuthenticationType.Basic
security.AddUser("TestUser", "TestPassword")
_server.SetSecurity(-1, security)
End Sub
Raster .NET | C API | C++ Class Library | JavaScript HTML5
Document .NET | C API | C++ Class Library | JavaScript HTML5
Medical .NET | C API | C++ Class Library | JavaScript HTML5
Medical Web Viewer .NET