Skip to content

Commit

Permalink
v0.6.1 (#67)
Browse files Browse the repository at this point in the history
* Apply clippy suggestiong of auto-deriving Eq alongside PartialEq as long as all struct fields also derive impl Eq

* ci: Bump codecov to 3.1.1

* v0.6.1: Bump MSRV and copyright year
  • Loading branch information
brycx authored Sep 20, 2022
1 parent 829402f commit 444967d
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/code_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ jobs:
args: '-- --test-threads 1'

- name: Upload to codecov.io
uses: codecov/codecov-action@81cd2dc8148241f03f5839d295e000b8f761e378
uses: codecov/codecov-action@d9f34f8cd5cb3b3eb79b3e4b5dae3a16df499a70
with:
fail_ci_if_error: true
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
matrix:
rust:
- stable
- 1.57.0 # MSRV
- 1.59.0 # MSRV
- nightly

runs-on: ubuntu-latest
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
### 0.6.1

__Date:__ September 20, 2022.

__Changelog:__
- Bump MSRV to `1.59.0`
- `clippy` fixes
- Add `rust-version` field to `Cargo.toml`
- Update copyright year to 2022


### 0.6.0

__Date:__ June 20, 2022.
Expand Down
3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pasetors"
version = "0.6.0" # Update html_root_url in lib.rs along with this.
version = "0.6.1" # Update html_root_url in lib.rs along with this.
authors = ["brycx <[email protected]>"]
edition = "2018"
description = "PASETO: Platform-Agnostic Security Tokens (in Rust)"
Expand All @@ -10,6 +10,7 @@ readme = "README.md"
repository = "https://github.com/brycx/pasetors"
documentation = "https://docs.rs/pasetors"
license = "MIT"
rust-version = "1.59.0" # Update CI test along with this.

[package.metadata.docs.rs]
all-features = true
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020-2021 brycx
Copyright (c) 2020-2022 brycx

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
![Tests](https://github.com/brycx/pasetors/workflows/Tests/badge.svg) [![Documentation](https://docs.rs/pasetors/badge.svg)](https://docs.rs/pasetors/) [![Crates.io](https://img.shields.io/crates/v/pasetors.svg)](https://crates.io/crates/pasetors) [![Safety Dance](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) [![MSRV](https://img.shields.io/badge/MSRV-1.57-informational.svg)](https://img.shields.io/badge/MSRV-1.57-informational) [![codecov](https://codecov.io/gh/brycx/pasetors/branch/master/graph/badge.svg)](https://codecov.io/gh/brycx/pasetors)
![Tests](https://github.com/brycx/pasetors/workflows/Tests/badge.svg) [![Documentation](https://docs.rs/pasetors/badge.svg)](https://docs.rs/pasetors/) [![Crates.io](https://img.shields.io/crates/v/pasetors.svg)](https://crates.io/crates/pasetors) [![Safety Dance](https://img.shields.io/badge/unsafe-forbidden-success.svg)](https://github.com/rust-secure-code/safety-dance/) [![MSRV](https://img.shields.io/badge/MSRV-1.59.0-informational.svg)](https://img.shields.io/badge/MSRV-1.59.0-informational) [![codecov](https://codecov.io/gh/brycx/pasetors/branch/master/graph/badge.svg)](https://codecov.io/gh/brycx/pasetors)

### PASETOrs

Expand Down Expand Up @@ -26,7 +26,7 @@ This library includes:
This library has **not undergone any third-party security audit**. Usage is at **own risk**.

### Minimum Supported Rust Version
Rust 1.57 or later is supported however, the majority of testing happens with latest stable Rust.
Rust 1.59.0 or later is supported however, the majority of testing happens with latest stable Rust.

MSRV may be changed at any point and will not be considered a SemVer breaking change.

Expand Down
4 changes: 2 additions & 2 deletions src/claims.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::collections::HashMap;
use time::format_description::well_known::Rfc3339;
use time::{Duration, OffsetDateTime};

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// A collection of claims that are passed as payload for a PASETO token.
pub struct Claims {
list_of: HashMap<String, Value>,
Expand Down Expand Up @@ -224,7 +224,7 @@ impl Claims {
}
}

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// The validation rules that are used to validate a set of [`Claims`].
pub struct ClaimsValidationRules {
validate_currently_valid: bool,
Expand Down
2 changes: 1 addition & 1 deletion src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
/// Errors for token operations.
pub enum Error {
/// Error for a token with an invalid format.
Expand Down
2 changes: 1 addition & 1 deletion src/footer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use regex::Regex;
use serde_json::Value;
use std::collections::HashMap;

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// A footer with optional claims that are JSON-encoded.
pub struct Footer {
list_of: HashMap<String, Value>,
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
unused_qualifications,
overflowing_literals
)]
#![doc(html_root_url = "https://docs.rs/pasetors/0.6.0")]
#![doc(html_root_url = "https://docs.rs/pasetors/0.6.1")]
#![cfg_attr(docsrs, feature(doc_cfg))]

#[macro_use]
Expand Down
8 changes: 4 additions & 4 deletions src/token.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ pub(crate) mod private {
}
}

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// A public token.
pub struct Public;

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// A local token.
pub struct Local;

Expand Down Expand Up @@ -87,7 +87,7 @@ impl<V: Version> Purpose<V> for Local {
}
}

#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, Eq, PartialEq)]
/// A [`TrustedToken`] is returned by either a `verify()` or `decrypt()` operation and represents
/// a validated token.
///
Expand Down Expand Up @@ -188,7 +188,7 @@ impl TryFrom<&TrustedToken> for Footer {
}
}

#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
/// [`UntrustedToken`] can parse PASETO tokens in order to extract individual parts of it.
///
/// A use-case for this would be parsing the tokens footer, if this is not known before receiving it. Then,
Expand Down
2 changes: 1 addition & 1 deletion src/version2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ use orion::hazardous::mac::blake2b;
use orion::hazardous::mac::poly1305::POLY1305_OUTSIZE;
use orion::hazardous::stream::xchacha20::XCHACHA_NONCESIZE;

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// Version 2 of the PASETO spec.
pub struct V2;

Expand Down
2 changes: 1 addition & 1 deletion src/version3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use p384::PublicKey;
use rand_core::OsRng;
use sha2::Digest;

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// Version 3 of the PASETO spec.
pub struct V3;

Expand Down
2 changes: 1 addition & 1 deletion src/version4.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ use orion::hazardous::stream::xchacha20;
use xchacha20::Nonce as EncNonce;
use xchacha20::SecretKey as EncKey;

#[derive(Debug, PartialEq, Clone)]
#[derive(Debug, PartialEq, Eq, Clone)]
/// Version 4 of the PASETO spec.
pub struct V4;

Expand Down

0 comments on commit 444967d

Please sign in to comment.