Skip to content

Commit

Permalink
Public OAuth uptake for C# libraries
Browse files Browse the repository at this point in the history
  • Loading branch information
AsabuHere committed Oct 16, 2024
1 parent 4ca2eed commit 3486d1a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
5 changes: 5 additions & 0 deletions src/Twilio/AuthStrategies/BasicAuthStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,10 @@ public override bool Equals(object obj)
return username == that.username && password == that.password;
}

public override int GetHashCode()
{
return HashCode.Combine(username, password);

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 40 in src/Twilio/AuthStrategies/BasicAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context
}

}
}
5 changes: 5 additions & 0 deletions src/Twilio/AuthStrategies/TokenAuthStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,11 @@ public override bool Equals(object obj)
return token == that.token && tokenManager.Equals(that.tokenManager);
}

public override int GetHashCode()
{
return HashCode.Combine(token, tokenManager);

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context

Check failure on line 67 in src/Twilio/AuthStrategies/TokenAuthStrategy.cs

View workflow job for this annotation

GitHub Actions / Test

The name 'HashCode' does not exist in the current context
}


public bool tokenExpired(String accessToken){
#if NET35
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ namespace Twilio.Clients.BearerToken
/// <summary>
/// Implementation of a TwilioRestClient.
/// </summary>
[Beta]
[Deprecated]
public class TwilioOrgsTokenRestClient
{
/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Twilio/Clients/TwilioRestClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public Response Request(Request request)
catch (Exception clientException)
{
throw new ApiConnectionException(
"Connection Error1: " + request.Method + request.ConstructUrl(),
"Connection Error: " + request.Method + request.ConstructUrl(),
clientException
);
}
Expand Down

0 comments on commit 3486d1a

Please sign in to comment.