Skip to content

Commit

Permalink
add missing interface
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Apr 5, 2024
1 parent a1ab99e commit 8d70d0d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/Sdkgen.Client/Authenticator/OAuth2Authenticator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace Sdkgen.Client.Authenticator;

public class OAuth2Authenticator : AuthenticatorBase
public class OAuth2Authenticator : AuthenticatorBase, IAuthenticator
{
private const int EXPIRE_THRESHOLD = 60 * 10;

Expand Down
20 changes: 10 additions & 10 deletions src/Sdkgen.Client/AuthenticatorFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,25 @@ public class AuthenticatorFactory
{
public static IAuthenticator Factory(ICredentials credentials)
{
if (credentials is HttpBasic)
if (credentials is HttpBasic httpBasic)
{
return new HttpBasicAuthenticator((HttpBasic)credentials);
return new HttpBasicAuthenticator(httpBasic);
}
else if (credentials is HttpBearer)
else if (credentials is HttpBearer httpBearer)
{
return new HttpBearerAuthenticator((HttpBearer)credentials);
return new HttpBearerAuthenticator(httpBearer);
}
else if (credentials is ApiKey)
else if (credentials is ApiKey apiKey)
{
return new ApiKeyAuthenticator((ApiKey)credentials);
return new ApiKeyAuthenticator(apiKey);
}
else if (credentials is OAuth2)
else if (credentials is OAuth2 oauth2)
{
return new OAuth2Authenticator((OAuth2)credentials);
return new OAuth2Authenticator(oauth2);
}
else if (credentials is Anonymous)
else if (credentials is Anonymous anonymous)
{
return new AnonymousAuthenticator((Anonymous)credentials);
return new AnonymousAuthenticator(anonymous);
}
else
{
Expand Down

0 comments on commit 8d70d0d

Please sign in to comment.