Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ In this example we will see how we can create a token, add some checks, serializ
```rust
extern crate biscuit_auth as biscuit;

use biscuit::{KeyPair, Biscuit, error};
use biscuit::{PrivateKey, Biscuit, error};

fn main() -> Result<(), error::Token> {
// let's generate the root key pair. The root public key will be necessary
// to verify the token
let root = KeyPair::new();
let root = PrivateKey::new();
let public_key = root.public();

// creating a first token
Expand Down
29 changes: 29 additions & 0 deletions biscuit-auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# `7.0.0`

- Abstract biscuits over the crypto implementation (#334) Tokens are generic over the key type used
to sign them and four new traits are added: `Sign` and `SerializePrivateKey` for private keys and
`Verify` and `SerializePublicKey` for public keys.
- New `PublicKeyData` type representing the inert data representation of a public key as it is
stored in a token, as well as `PublicKeys`, the block's public key table. (#334)
- `Term` implements `From<Uuid>` with the `uuid` feature.
- Scope parameters are `Into<PublicKeyData>` so they can take anything which can be converted into a
public key (including `&K: SerializePublicKey`).

## Breaking changes

- `KeyPair` is removed; use `PrivateKey` directly instead of `KeyPair`. APIs that previously took a
keypair are replaced with APIs that take a `PrivateKey` (i.e. `append_with_keypair` ->
`append_with_key`, `append_third_party_with_keypair` -> `append_third_party_with_key`).
- `Biscuit` and `UnverifiedBiscuit` are generic over the private key type contained in their
proof. These are defaulted to `PrivateKey`, so this change should be transparent for most users
who use the default crypto types.
- `RootKeyProvider` has an associated `Key` type, which is the type of the root key that is
provided.
- All `algorithm()` methods return `builder::Algorithm` instead of
`format::schema::public_key::Algorithm`.
- Datalog scopes now take `PublicKeyData` instead of the cryptographic `PublicKey` type.
- The `ToAnyParam` trait and `AnyParam` enum are removed; users who were implementing `ToAnyParam`
for custom types should implement `From<MyType> for Term` instead.
- The `set_macro_param` and `set_macro_scope_param` methods are removed; macros now call
`set_lenient` and `set_scope_lenient`.

# `6.0.0`

- support for `pem` / `der` private and public keys (#212 and #265)
Expand Down
4 changes: 2 additions & 2 deletions biscuit-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ In this example we will see how we can create a token, add some checks, serializ
```rust
extern crate biscuit_auth as biscuit;

use biscuit::{KeyPair, Biscuit, error};
use biscuit::{PrivateKey, Biscuit, error};

fn main() -> Result<(), error::Token> {
// let's generate the root key pair. The root public key will be necessary
// to verify the token
let root = KeyPair::new();
let root = PrivateKey::new();
let public_key = root.public();

// creating a first token
Expand Down
Loading