mirror of
https://github.com/aler9/gortsplib
synced 2025-10-03 14:26:42 +08:00
rename files
This commit is contained in:
19
auth-server_test.go
Normal file
19
auth-server_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package gortsplib
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
)
|
||||
|
||||
func TestAuthClientServer(t *testing.T) {
|
||||
as := NewAuthServer("testuser", "testpass")
|
||||
wwwAuthenticate := as.GenerateHeader()
|
||||
|
||||
ac, err := NewAuthClient(wwwAuthenticate, "testuser", "testpass")
|
||||
require.NoError(t, err)
|
||||
authorization := ac.GenerateHeader("ANNOUNCE", "rtsp://myhost/mypath")
|
||||
|
||||
err = as.ValidateHeader(authorization, "ANNOUNCE", "rtsp://myhost/mypath")
|
||||
require.NoError(t, err)
|
||||
}
|
Reference in New Issue
Block a user