You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OAuth1Authenticator.ForAccessToken with a blank consumer secret should still generate the OAuth signature. Happy to submit a PR for this if approved.
Actual Behavior
When setting client authenticator as such: client.Authenticator = OAuth1Authenticator.ForAccessToken("xx", "", "xxx", "xxxx", OAuthSignatureMethod.PlainText);
You receive an argument null exception thrown by the OAuthWorkflow validation logic for consumer secret. This came up when trying to authenticate against the a 0-legged OAuth (Canonical MAAS API in this instance - https://maas.io/docs/snap/2.9/ui/api-authentication) and causes RestSharp to fail signature validation.
Steps to Reproduce the Problem
1.Create a rest client with an OAuth1Authenticator and a blank consumer secret
2.Execute any request using the client created above
3.Receive ArgumentNullException
Specifications
Version:Nuget 106.11.7
Platform: .NET Core 3.1
StackTrace
at RestSharp.Validation.Ensure.NotEmpty(String parameter, String name)
at RestSharp.Authenticators.OAuth.OAuthWorkflow.ValidateAccessRequestState()
at RestSharp.Authenticators.OAuth.OAuthWorkflow.BuildAccessTokenSignature(String method, WebPairCollection parameters)
at RestSharp.Authenticators.OAuth1Authenticator.AddOAuthData(IRestClient client, IRestRequest request, OAuthWorkflow workflow)
at RestSharp.Authenticators.OAuth1Authenticator.Authenticate(IRestClient client, IRestRequest request)
at RestSharp.RestClient.AuthenticateIfNeeded(IRestRequest request)
at RestSharp.RestClient.Execute(IRestRequest request, String httpMethod, Func`3 getResponse)
at RestSharp.RestClient.Execute(IRestRequest request)
The text was updated successfully, but these errors were encountered:
Expected Behavior
OAuth1Authenticator.ForAccessToken with a blank consumer secret should still generate the OAuth signature. Happy to submit a PR for this if approved.
Actual Behavior
When setting client authenticator as such:
client.Authenticator = OAuth1Authenticator.ForAccessToken("xx", "", "xxx", "xxxx", OAuthSignatureMethod.PlainText);
You receive an argument null exception thrown by the OAuthWorkflow validation logic for consumer secret. This came up when trying to authenticate against the a 0-legged OAuth (Canonical MAAS API in this instance - https://maas.io/docs/snap/2.9/ui/api-authentication) and causes RestSharp to fail signature validation.
Steps to Reproduce the Problem
1.Create a rest client with an OAuth1Authenticator and a blank consumer secret
2.Execute any request using the client created above
3.Receive ArgumentNullException
Specifications
StackTrace
The text was updated successfully, but these errors were encountered: