From d91fccbb10b608d31638cb9b029bc9dee6bc30bb Mon Sep 17 00:00:00 2001 From: Jedd Morgan <45512892+JR-Morgan@users.noreply.github.com> Date: Thu, 11 Sep 2025 12:03:27 +0100 Subject: [PATCH] Merge pull request #386 from specklesystems/jrm/local-account-ids chore(sdk): deprecate local ids --- src/Speckle.Sdk/Credentials/Account.cs | 3 +++ src/Speckle.Sdk/Credentials/AccountManager.cs | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/Speckle.Sdk/Credentials/Account.cs b/src/Speckle.Sdk/Credentials/Account.cs index dbedf5c1..a9dbbbe2 100644 --- a/src/Speckle.Sdk/Credentials/Account.cs +++ b/src/Speckle.Sdk/Credentials/Account.cs @@ -102,6 +102,8 @@ public class Account : IEquatable #endregion + internal const string LOCAL_IDENTIFIER_DEPRECATION_MESSAGE = "Local identifiers no longer nesseary"; + /// /// Retrieves the local identifier for the current user. /// @@ -126,5 +128,6 @@ public class Account : IEquatable /// https://speckle.xyz?id=123 /// /// + [Obsolete(LOCAL_IDENTIFIER_DEPRECATION_MESSAGE)] internal Uri GetLocalIdentifier() => new($"{serverInfo.url}?id={userInfo.id}"); } diff --git a/src/Speckle.Sdk/Credentials/AccountManager.cs b/src/Speckle.Sdk/Credentials/AccountManager.cs index d4433ef1..7fb97826 100644 --- a/src/Speckle.Sdk/Credentials/AccountManager.cs +++ b/src/Speckle.Sdk/Credentials/AccountManager.cs @@ -419,6 +419,7 @@ public sealed class AccountManager( /// /// /// + [Obsolete(Account.LOCAL_IDENTIFIER_DEPRECATION_MESSAGE)] public Uri? GetLocalIdentifierForAccount(Account account) { var identifier = account.GetLocalIdentifier(); @@ -440,6 +441,7 @@ public sealed class AccountManager( /// /// The local identifier of the account. /// The account that matches the local identifier, or null if no match is found. + [Obsolete(Account.LOCAL_IDENTIFIER_DEPRECATION_MESSAGE)] public Account? GetAccountForLocalIdentifier(Uri localIdentifier) { var searchResult = GetAccounts()