Skip to content

Commit

Permalink
Merge branch 'authenticator-tidy-ups'
Browse files Browse the repository at this point in the history
  • Loading branch information
JedS6391 committed Jul 11, 2021
2 parents b4f7502 + 87a824b commit 8dfb0c4
Show file tree
Hide file tree
Showing 11 changed files with 565 additions and 14 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.1.1] - 2021-07-11

### Fixed

- `AuthenticateWithUsernamePasswordCommand` will no longer send a `duration` parameter, as it not supported for the `password` grant type

## [1.1.0] - 2021-07-10

### Added
Expand Down Expand Up @@ -37,5 +43,6 @@ This release also includes a number of new tests, both for new and existing func
- Submissions
- Comments

[1.1.1]: https://github.com/JedS6391/Reddit.NET/compare/1.1.0...1.1.1
[1.1.0]: https://github.com/JedS6391/Reddit.NET/compare/1.0.0...1.1.0
[1.0.0]: https://github.com/JedS6391/Reddit.NET/tree/1.0.0
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ public override HttpRequestMessage BuildRequest()
{
{ "grant_type", "password" },
{ "username", _parameters.Username },
{ "password", _parameters.Password },
{ "duration", "permanent" }
{ "password", _parameters.Password }
};

var request = new HttpRequestMessage()
Expand Down
17 changes: 13 additions & 4 deletions src/Reddit.NET.Client/Command/CommandExecutor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,21 @@
namespace Reddit.NET.Client.Command
{
/// <summary>
/// Responsible for executing HTTP communication with reddit.
/// Responsible for facilitating HTTP communication with reddit.
/// </summary>
/// <remarks>
/// All HTTP operations are encapsulated in <see cref="ClientCommand" /> instances which this executor knows
/// how to handle. This design allows components that need to execute HTTP requests to be decoupled from
/// the actual HTTP communication, and instead just operate in terms of commands.
/// <para>
/// All HTTP operations are encapsulated in <see cref="ClientCommand" /> instances which this class can execute.
///
/// This design allows components that need to execute HTTP requests to be decoupled from the actual HTTP communication.
/// </para>
/// <para>
/// Requests that result in transient HTTP response status codes will be retried a number of times, with an exponential back-off sleep duration.
/// </para>
/// <para>
/// To remain with the reddit API rate limits, command execution will be managed to ensure that the number of requests being ,ade
/// falls within the rate limits imposed.
/// </para>
/// </remarks>
public sealed class CommandExecutor
{
Expand Down
2 changes: 1 addition & 1 deletion src/Reddit.NET.Client/Reddit.NET.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<Title>Reddit.NET.Client</Title>
<PackageDescription>Provides a .NET client for interacting with reddit.</PackageDescription>
<PackageId>Reddit.NET.Client</PackageId>
<Version>1.1.0</Version>
<Version>1.1.1</Version>
<Authors>Jed Simson</Authors>
<PackageTags>reddit client</PackageTags>
<RepositoryUrl>https://github.com/JedS6391/Reddit.NET</RepositoryUrl>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using Reddit.NET.Client.Command;
using Reddit.NET.Client.Models.Internal;

namespace Reddit.NET.Client.UnitTests
namespace Reddit.NET.Client.UnitTests.Authentication
{
public class AuthenticationContextTests
{
Expand Down
Loading

0 comments on commit 8dfb0c4

Please sign in to comment.