diff --git a/src/simpleauth.client/DeviceTokenRequest.cs b/src/simpleauth.client/DeviceTokenRequest.cs
new file mode 100644
index 000000000..fca97c79c
--- /dev/null
+++ b/src/simpleauth.client/DeviceTokenRequest.cs
@@ -0,0 +1,25 @@
+namespace SimpleAuth.Client
+{
+ using System.Collections.Generic;
+
+ ///
+ /// Defines the device token request.
+ ///
+ public record DeviceTokenRequest : TokenRequest
+ {
+ ///
+ /// Initializes a new instance of the record.
+ ///
+ /// The request form.
+ /// The polling interval.
+ public DeviceTokenRequest(Dictionary form, int interval) : base(form)
+ {
+ Interval = interval;
+ }
+
+ ///
+ /// Gets the polling interval.
+ ///
+ public int Interval { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/simpleauth.client/PkceBuilder.cs b/src/simpleauth.client/PkceBuilder.cs
index 535350968..a029c3e29 100644
--- a/src/simpleauth.client/PkceBuilder.cs
+++ b/src/simpleauth.client/PkceBuilder.cs
@@ -18,10 +18,18 @@ namespace SimpleAuth.Client
using System.Text;
using SimpleAuth.Shared.Models;
+ ///
+ /// Defines the PKCE builder.
+ ///
public static class PkceBuilder
{
private static readonly Random Random = new();
+ ///
+ /// Builds a PKCE challenge.
+ ///
+ /// The challenge method.
+ /// A instance.
public static Pkce BuildPkce(this string method)
{
var codeVerifier = GetCodeVerifier();
diff --git a/src/simpleauth.client/TokenCredentials.cs b/src/simpleauth.client/TokenCredentials.cs
index 9c9065103..1d89a0fe7 100644
--- a/src/simpleauth.client/TokenCredentials.cs
+++ b/src/simpleauth.client/TokenCredentials.cs
@@ -124,6 +124,10 @@ public static TokenCredentials FromClientSecret(string clientAssertion, string c
return new TokenCredentials(dict);
}
+ ///
+ /// Creates the credentials as a device.
+ ///
+ ///
public static TokenCredentials AsDevice()
{
return new(new Dictionary());
diff --git a/src/simpleauth.client/TokenRequest.cs b/src/simpleauth.client/TokenRequest.cs
index 7fc2b176c..9b54d5d52 100644
--- a/src/simpleauth.client/TokenRequest.cs
+++ b/src/simpleauth.client/TokenRequest.cs
@@ -27,6 +27,10 @@ public record TokenRequest : IEnumerable>
{
private readonly Dictionary _form;
+ ///
+ /// Initializes a new instance of the record.
+ ///
+ ///
protected internal TokenRequest(Dictionary form)
{
_form = form;
@@ -212,18 +216,13 @@ public static TokenRequest FromPassword(string userName, string password, string
return FromPassword(userName, password, scopes, new[] { amrValue });
}
- ///
- public IEnumerator> GetEnumerator()
- {
- return _form.GetEnumerator();
- }
-
- ///
- IEnumerator IEnumerable.GetEnumerator()
- {
- return GetEnumerator();
- }
-
+ ///
+ /// Creates a request from the device code.
+ ///
+ /// The client id.
+ /// The device code.
+ /// The polling interval.
+ /// A instance.
public static TokenRequest FromDeviceCode(string clientId, string deviceCode, int interval)
{
var dictionary = new Dictionary
@@ -234,15 +233,17 @@ public static TokenRequest FromDeviceCode(string clientId, string deviceCode, in
};
return new DeviceTokenRequest(dictionary, interval);
}
- }
- public record DeviceTokenRequest : TokenRequest
- {
- public DeviceTokenRequest(Dictionary form, int interval) : base(form)
+ ///
+ public IEnumerator> GetEnumerator()
{
- Interval = interval;
+ return _form.GetEnumerator();
}
- public int Interval { get; }
+ ///
+ IEnumerator IEnumerable.GetEnumerator()
+ {
+ return GetEnumerator();
+ }
}
}
\ No newline at end of file
diff --git a/src/simpleauth.shared/Repositories/IDeviceAuthorizationStore.cs b/src/simpleauth.shared/Repositories/IDeviceAuthorizationStore.cs
index 96b1ccf1c..652470625 100644
--- a/src/simpleauth.shared/Repositories/IDeviceAuthorizationStore.cs
+++ b/src/simpleauth.shared/Repositories/IDeviceAuthorizationStore.cs
@@ -5,16 +5,50 @@
using SimpleAuth.Shared.Requests;
using SimpleAuth.Shared.Responses;
+ ///
+ /// Defines the device authorization store interface.
+ ///
public interface IDeviceAuthorizationStore
{
+ ///
+ /// Gets the for the user code.
+ ///
+ /// The user code.
+ /// The for the async operation.
+ /// A as an async operation.
public Task