Use RTSP server for RTSP auth realm.

PiperOrigin-RevId: 420053894
This commit is contained in:
claincly 2022-01-06 15:10:56 +00:00 committed by bachinger
parent 152a1650f6
commit be99b97a46
3 changed files with 6 additions and 6 deletions

View File

@ -50,7 +50,7 @@ public class RtspAuthenticationInfoTest {
RtspAuthenticationInfo authenticator = RtspAuthenticationInfo authenticator =
new RtspAuthenticationInfo( new RtspAuthenticationInfo(
RtspAuthenticationInfo.DIGEST, RtspAuthenticationInfo.DIGEST,
/* realm= */ "LIVE555 Streaming Media", /* realm= */ "RTSP server",
/* nonce= */ "0cdfe9719e7373b7d5bb2913e2115f3f", /* nonce= */ "0cdfe9719e7373b7d5bb2913e2115f3f",
/* opaque= */ "5ccc069c403ebaf9f0171e9517f40e41"); /* opaque= */ "5ccc069c403ebaf9f0171e9517f40e41");
@ -60,10 +60,10 @@ public class RtspAuthenticationInfoTest {
Uri.parse("rtsp://localhost:554/imax_cd_2k_264_6ch.mkv"), Uri.parse("rtsp://localhost:554/imax_cd_2k_264_6ch.mkv"),
RtspRequest.METHOD_DESCRIBE)) RtspRequest.METHOD_DESCRIBE))
.isEqualTo( .isEqualTo(
"Digest username=\"username\", realm=\"LIVE555 Streaming Media\"," "Digest username=\"username\", realm=\"RTSP server\","
+ " nonce=\"0cdfe9719e7373b7d5bb2913e2115f3f\"," + " nonce=\"0cdfe9719e7373b7d5bb2913e2115f3f\","
+ " uri=\"rtsp://localhost:554/imax_cd_2k_264_6ch.mkv\"," + " uri=\"rtsp://localhost:554/imax_cd_2k_264_6ch.mkv\","
+ " response=\"ba9433847439387776f7fb905db3fcae\"," + " response=\"cb635712efbdd027f0c823d0623449f6\","
+ " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\""); + " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"");
} }
} }

View File

@ -133,7 +133,7 @@ public final class RtspMediaPeriodTest {
.add(RtspHeaders.CSEQ, headers.get(RtspHeaders.CSEQ)) .add(RtspHeaders.CSEQ, headers.get(RtspHeaders.CSEQ))
.add( .add(
RtspHeaders.WWW_AUTHENTICATE, RtspHeaders.WWW_AUTHENTICATE,
"Digest realm=\"LIVE555 Streaming Media\"," "Digest realm=\"RTSP server\","
+ " nonce=\"0cdfe9719e7373b7d5bb2913e2115f3f\"," + " nonce=\"0cdfe9719e7373b7d5bb2913e2115f3f\","
+ " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"") + " opaque=\"5ccc069c403ebaf9f0171e9517f40e41\"")
.add(RtspHeaders.WWW_AUTHENTICATE, "BASIC realm=\"WallyWorld\"") .add(RtspHeaders.WWW_AUTHENTICATE, "BASIC realm=\"WallyWorld\"")

View File

@ -539,10 +539,10 @@ public final class RtspMessageUtilTest {
public void parseWWWAuthenticateHeader_withDigestAuthentication_succeeds() throws Exception { public void parseWWWAuthenticateHeader_withDigestAuthentication_succeeds() throws Exception {
RtspAuthenticationInfo authenticationInfo = RtspAuthenticationInfo authenticationInfo =
RtspMessageUtil.parseWwwAuthenticateHeader( RtspMessageUtil.parseWwwAuthenticateHeader(
"Digest realm=\"LIVE555 Streaming Media\", nonce=\"0cdfe9719e7373b7d5bb2913e2115f3f\""); "Digest realm=\"RTSP server\", nonce=\"0cdfe9719e7373b7d5bb2913e2115f3f\"");
assertThat(authenticationInfo.authenticationMechanism).isEqualTo(RtspAuthenticationInfo.DIGEST); assertThat(authenticationInfo.authenticationMechanism).isEqualTo(RtspAuthenticationInfo.DIGEST);
assertThat(authenticationInfo.nonce).isEqualTo("0cdfe9719e7373b7d5bb2913e2115f3f"); assertThat(authenticationInfo.nonce).isEqualTo("0cdfe9719e7373b7d5bb2913e2115f3f");
assertThat(authenticationInfo.realm).isEqualTo("LIVE555 Streaming Media"); assertThat(authenticationInfo.realm).isEqualTo("RTSP server");
assertThat(authenticationInfo.opaque).isEmpty(); assertThat(authenticationInfo.opaque).isEmpty();
} }