diff --git a/src/proof_of_possession.rs b/src/proof_of_possession.rs index 4147ed5..24f21d4 100644 --- a/src/proof_of_possession.rs +++ b/src/proof_of_possession.rs @@ -88,12 +88,12 @@ impl ProofOfPossession { let (h_kid, h_jwk) = match (self.controller.vm.clone(), jwk.key_id.clone()) { (Some(did), _) => (Some(did), None), (None, Some(kid)) => (Some(kid), None), - (None, None) => (None, Some(jwk)), + (None, None) => (None, Some(jwk.to_public())), }; let header = Header { algorithm: alg, key_id: h_kid, - jwk: h_jwk.cloned(), + jwk: h_jwk, type_: Some(JWS_TYPE.to_string()), ..Default::default() }; diff --git a/src/token.rs b/src/token.rs index 73b0894..314cc2f 100644 --- a/src/token.rs +++ b/src/token.rs @@ -22,6 +22,13 @@ pub enum Request { #[serde(alias = "pin")] user_pin: Option, }, + #[serde(rename = "urn:ietf:params:oauth:grant-type:refresh_token")] + RefreshToken { + client_id: Option, + refresh_token: String, + #[serde(alias = "pin")] + user_pin: Option, + }, } #[derive(Debug, Default, Deserialize, Serialize)]