RTSP authentication type
- Basic Authentication: an authentication scheme proposed in HTTP 1.0. Messages are transmitted without encryption and conversion, causing serious security risks.
- Digest Authentication: An alternative to basic authentication proposed in HTTP 1.1, messages are converted into MD5 hashes for higher security.
Basic certification:
1. The client sends the DESCRIBE request to the server;
2. The RTSP server considers that the authentication fails and sends a WWw-authenticate response
RTSP/1.0 401 Unauthorized\r\n
CSeq: 1\r\n
WWW-Authenticate: Basic realm=”RTSPD”\r\n\r\n
If the password authentication window is displayed, the user name is displayed. Enter the authentication information in the password authentication window and check the response message. If Basic authentication is found, perform the following operations. 3: The client can send DESCRIBE request again with Authorization string.
Abstract Certification:
1. The client sends DESCRIBE request;
2. The server returns a 401 error indicating that the authentication is not performed and uses the Nonce query.
RTSP / 1.0 401 Unauthorized
Server: HiIpcam/V100R003 VodServer / 1.0.0
Cseq: 2
WWW-Authenticate:Digest realm=”HipcamRealServer”, nonce=”3b27a446bfa49b0c48c3edb83139543d”
3. The client generates response information based on the user name, password, nonce, HTTP method, request URI and other information.
4. The server verifies the response received from the client. If the response passes, RTSP/1.0 200 OK is returned.