From 4d7a82e45610a9ed6e2e239e202d861e5ade4496 Mon Sep 17 00:00:00 2001 From: Matthew Scheirer Date: Mon, 23 Oct 2017 22:36:48 -0400 Subject: [PATCH] Userinfo birthdate should map to NaiveDate --- src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 1ac0a6d..7a51639 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -89,7 +89,7 @@ use biscuit::{Empty, SingleOrMultiple}; use biscuit::jwa::{self, SignatureAlgorithm}; use biscuit::jwk::{AlgorithmParameters, JWKSet}; use biscuit::jws::{Compact, Secret}; -use chrono::{Duration, Utc}; +use chrono::{Duration, NaiveDate, Utc}; use inth_oauth2::token::Token as _t; use reqwest::{header, Url}; use validator::Validate; @@ -455,8 +455,8 @@ pub struct Userinfo { #[serde(default)] pub email_verified: Option, // Isn't required to be just male or female #[serde(default)] pub gender: Option, - // ISO 9601:2004 YYYY-MM-DD or YYYY. Would be nice to serialize to chrono::Date. - #[serde(default)] pub birthdate: Option, + // ISO 9601:2004 YYYY-MM-DD or YYYY. + #[serde(default)] pub birthdate: Option, // Region/City codes. Should also have a more concrete serializer form. #[serde(default)] pub zoneinfo: Option, // Usually RFC5646 langcode-countrycode, maybe with a _ sep, could be arbitrary