From 52a43104ed5a64a6ad2e8e5d0ba4ceb5f6d7ad17 Mon Sep 17 00:00:00 2001 From: pgautier404 Date: Thu, 14 Sep 2023 11:57:35 -0700 Subject: [PATCH] chore: add ToString override for disposable token that returns truncated token (#493) --- src/Momento.Sdk/Responses/GenerateDisposableTokenResponse.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Momento.Sdk/Responses/GenerateDisposableTokenResponse.cs b/src/Momento.Sdk/Responses/GenerateDisposableTokenResponse.cs index 37cb0e30..4b468828 100644 --- a/src/Momento.Sdk/Responses/GenerateDisposableTokenResponse.cs +++ b/src/Momento.Sdk/Responses/GenerateDisposableTokenResponse.cs @@ -56,6 +56,11 @@ public Success(_GenerateDisposableTokenResponse response) Endpoint = response.Endpoint; ExpiresAt = ExpiresAt.FromEpoch((int)response.ValidUntil); } + + public override string ToString() + { + return $"{AuthToken.Substring(0, 10)}...{AuthToken.Substring((AuthToken.Length - 10), 10)}"; + } } ///