diff --git a/src/discovery.rs b/src/discovery.rs index f6fedff..a515f0e 100644 --- a/src/discovery.rs +++ b/src/discovery.rs @@ -17,7 +17,7 @@ pub(crate) fn secure(url: &Url) -> Result<(), Error> { } // TODO I wish we could impl default for this, but you cannot have a config without issuer etc -#[derive(Debug, Deserialize, Serialize)] +#[derive(Debug, Serialize, Deserialize)] pub struct Config { #[serde(with = "url_serde")] pub issuer: Url, #[serde(with = "url_serde")] pub authorization_endpoint: Url, diff --git a/src/lib.rs b/src/lib.rs index 94319f4..b499462 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -439,7 +439,7 @@ pub struct Options { /// The userinfo struct contains all possible userinfo fields regardless of scope. [See spec.](https://openid.net/specs/openid-connect-basic-1_0.html#StandardClaims) // TODO is there a way to use claims_supported in config to simplify this struct? -#[derive(Deserialize, Validate)] +#[derive(Serialize, Deserialize, Validate)] pub struct Userinfo { pub sub: String, #[serde(default)] pub name: Option, @@ -510,7 +510,7 @@ impl Prompt { } /// Address Claim struct. Can be only formatted, only the rest, or both. -#[derive(Deserialize)] +#[derive(Serialize, Deserialize)] pub struct Address { #[serde(default)] pub formatted: Option, #[serde(default)] pub street_address: Option,