about summary refs log tree commit diff
path: root/indieauth
diff options
context:
space:
mode:
Diffstat (limited to 'indieauth')
-rw-r--r--indieauth/src/lib.rs18
1 files changed, 11 insertions, 7 deletions
diff --git a/indieauth/src/lib.rs b/indieauth/src/lib.rs
index ce0ef9f..cbe9085 100644
--- a/indieauth/src/lib.rs
+++ b/indieauth/src/lib.rs
@@ -585,13 +585,17 @@ pub enum GrantResponse {
     ///
     /// This is suitable for confirming the identity of the user, but
     /// no more than that.
-    ProfileUrl {
-        /// The authenticated user's URL.
-        me: Url,
-        /// The user's profile information, if it was requested.
-        #[serde(skip_serializing_if = "Option::is_none")]
-        profile: Option<Profile>
-    }
+    ProfileUrl(ProfileUrl)
+}
+
+/// The contents of a profile URL response.
+#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
+pub struct ProfileUrl {
+    /// The authenticated user's URL.
+    pub me: Url,
+    /// The user's profile information, if it was requested.
+    #[serde(skip_serializing_if = "Option::is_none")]
+    pub profile: Option<Profile>
 }
 
 #[cfg(feature = "axum")]