diff --git a/src/IO.Ably.Shared/AblyAuth.cs b/src/IO.Ably.Shared/AblyAuth.cs index 86de038df..91065ff53 100644 --- a/src/IO.Ably.Shared/AblyAuth.cs +++ b/src/IO.Ably.Shared/AblyAuth.cs @@ -559,6 +559,7 @@ private void SetCurrentAuthOptions(AuthOptions options) /// . If null a token request is generated from options passed when the client was created. /// . If null the default AuthOptions are used. /// signed token request. + [Obsolete("This method will be removed in a future version, please use CreateTokenRequestObject instead")] public async Task CreateTokenRequestObjectAsync(TokenParams tokenParams, AuthOptions authOptions) { authOptions = authOptions ?? CurrentAuthOptions ?? Options; @@ -669,20 +670,19 @@ public TokenDetails Authorise(TokenParams tokenParams = null, AuthOptions option return AsyncHelper.RunSync(() => AuthorizeAsync(tokenParams, options)); } + [Obsolete("This method will be removed in a future version, please use CreateTokenRequest instead")] public TokenRequest CreateTokenRequestObject(TokenParams tokenParams = null, AuthOptions authOptions = null) { + Logger.Warning("CreateTokenRequest is deprecated and will be removed in the future, please use CreateTokenRequest instead"); return AsyncHelper.RunSync(() => CreateTokenRequestObjectAsync(tokenParams, authOptions)); } - [Obsolete("This method will be removed in a future version, please use CreateTokenRequestObjectAsync instead")] public async Task CreateTokenRequestAsync(TokenParams tokenParams, AuthOptions authOptions) { - Logger.Warning("CreateTokenRequest is deprecated and will be removed in the future, please use CreateTokenRequestObject instead"); var tokenRequest = await CreateTokenRequestObjectAsync(tokenParams, authOptions); return JsonHelper.Serialize(tokenRequest); } - [Obsolete("This method will be removed in a future version, please use CreateTokenRequestObject instead")] public string CreateTokenRequest(TokenParams tokenParams = null, AuthOptions authOptions = null) { return AsyncHelper.RunSync(() => CreateTokenRequestAsync(tokenParams, authOptions));