Skip to content

Commit

Permalink
v0.4.1; update changelog (#29)
Browse files Browse the repository at this point in the history
* v0.4.1; update changelog

* Something was broken..?

* format..........
  • Loading branch information
cottinisimone authored Oct 6, 2022
1 parent 300b905 commit c30606d
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 13 deletions.
36 changes: 34 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,42 @@ 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

### Added

- New page for SSO login at <http://localhost:3000/authorize>

---

## [0.2.2] - 2022-05-04

### Added
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/model/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Claims {

#[cfg(test)]
pub fn custom_claims(&self) -> &Vec<CustomField> {
&&self.custom_claims
&self.custom_claims
}
}

Expand Down
14 changes: 6 additions & 8 deletions src/model/jwks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::<serde_json::Value>(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<String> =
serde_json::from_value(content.get("at_custom_claims_vec").unwrap().to_owned()).unwrap();
Expand Down Expand Up @@ -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::<serde_json::Value>(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");
}
}

0 comments on commit c30606d

Please sign in to comment.