From c30606de4d4d3ea5611b857aac36093ec7d3b9e3 Mon Sep 17 00:00:00 2001 From: Simone Cottini Date: Thu, 6 Oct 2022 17:59:16 +0200 Subject: [PATCH] v0.4.1; update changelog (#29) * v0.4.1; update changelog * Something was broken..? * format.......... --- CHANGELOG.md | 36 ++++++++++++++++++++++++++++++++++-- Cargo.lock | 2 +- Cargo.toml | 2 +- src/model/claims.rs | 2 +- src/model/jwks.rs | 14 ++++++-------- 5 files changed, 43 insertions(+), 13 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8b0fee2..9a29409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,13 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +--- + +## [0.4.1] + +### Added + +- Added `x5c` field in `access_token` to expose the certificate. +- Added configuration value `access_token` with custom fields to enrich `access_token`. + +### Changed + +- Improved CI .drone.yml file. + +--- + +## [0.4.0] + ### Added - Extend `/oauth/token` endpoint content type compatibility with `application/x-www-form-urlencoded`. - Added `/oauth/login` endpoint to support authentication with `response_type: code`. - Grant type field added to claims with values `client_credentials` and `authorization_code`. - Added `id_token` to get user info. -- Added configuration value `user_info` with custom fields. +- Added configuration value `user_info`. +- Added `custom_fields` in config. Custom fields are used to enrich `id_token`. + +--- ## [0.3.0] - 2022-05-31 @@ -21,6 +41,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - New page for SSO login at +--- + ## [0.2.2] - 2022-05-04 ### Added @@ -34,31 +56,41 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Improve `README.md` - Improve docker caching for better local development +--- + ## [0.2.1] - 2022-04-14 ### Changed - Expose frontend & backend under a single service +--- + ## [0.2.0] - 2022-04-08 ### Added - New WASM 😎 frontend to set permissions for audiences & get a valid token +--- + ## [0.1.1] - 2022-02-15 ### Changed - Align tag version & `Cargo.toml` version +--- + ## [0.1.0] - 2022-02-15 ### Added - First release 🎉 -[Unreleased]: https://github.com/primait/localauth0/compare/0.3.0...HEAD +[Unreleased]: https://github.com/primait/localauth0/compare/0.4.1...HEAD +[0.4.1]: https://github.com/primait/localauth0/compare/0.4.0...0.4.1 +[0.4.0]: https://github.com/primait/localauth0/compare/0.3.0...0.4.0 [0.3.0]: https://github.com/primait/localauth0/compare/0.2.2...0.3.0 [0.2.2]: https://github.com/primait/localauth0/compare/0.2.1...0.2.2 [0.2.1]: https://github.com/primait/localauth0/compare/0.2.0...0.2.1 diff --git a/Cargo.lock b/Cargo.lock index 5c3f028..c1c6d47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -848,7 +848,7 @@ checksum = "e34f76eb3611940e0e7d53a9aaa4e6a3151f69541a282fd0dad5571420c53ff1" [[package]] name = "localauth0" -version = "0.4.0" +version = "0.4.1" dependencies = [ "actix-files", "actix-web", diff --git a/Cargo.toml b/Cargo.toml index 193f7e6..f94ff5e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "localauth0" -version = "0.4.0" +version = "0.4.1" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/src/model/claims.rs b/src/model/claims.rs index 6b0af9b..cfdde0e 100644 --- a/src/model/claims.rs +++ b/src/model/claims.rs @@ -56,7 +56,7 @@ impl Claims { #[cfg(test)] pub fn custom_claims(&self) -> &Vec { - &&self.custom_claims + &self.custom_claims } } diff --git a/src/model/jwks.rs b/src/model/jwks.rs index 4ca57fc..e037203 100644 --- a/src/model/jwks.rs +++ b/src/model/jwks.rs @@ -267,14 +267,12 @@ mod tests { audience.to_string(), vec![permission.to_string()], issuer.to_string(), - gty.clone(), - custom_claims.clone(), + gty, + custom_claims, ); let jwt: String = random_jwk.encode(&claims).unwrap(); - let content = jwks - .parse::(jwt.as_ref(), &[audience]) - .expect("unable to parse jwt"); + let content: serde_json::Value = jwks.parse(jwt.as_ref(), &[audience]).expect("unable to parse jwt"); assert_eq!(content.get("at_custom_claims_str").unwrap(), "my_str"); let custom_claim_vec: Vec = serde_json::from_value(content.get("at_custom_claims_vec").unwrap().to_owned()).unwrap(); @@ -302,12 +300,12 @@ mod tests { audience.to_string(), vec![permission.to_string()], issuer.to_string(), - gty.clone(), - custom_claims.clone(), + gty, + custom_claims, ); let jwt: String = random_jwk.encode(&claims).unwrap(); - let result = jwks.parse::(jwt.as_ref(), &[audience]).unwrap(); + let result: serde_json::Value = jwks.parse(jwt.as_ref(), &[audience]).unwrap(); assert_eq!(result.get("at_custom_claims_str").unwrap(), "my-str-2"); } }