Skip to content

Commit

Permalink
raise the minimum schema version to 5
Browse files Browse the repository at this point in the history
set the block version when using 3rd party blocks
  • Loading branch information
Geal committed May 12, 2024
1 parent 2281ac5 commit c62aeab
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion biscuit-auth/src/token/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ pub use third_party::*;
/// minimum supported version of the serialization format
pub const MIN_SCHEMA_VERSION: u32 = 3;
/// maximum supported version of the serialization format
pub const MAX_SCHEMA_VERSION: u32 = 4;
pub const MAX_SCHEMA_VERSION: u32 = 5;
/// starting version for 3rd party blocks
pub const THIRD_PARTY_BLOCK_VERSION: u32 = 4;

/// some symbols are predefined and available in every implementation, to avoid
/// transmitting them with every token
Expand Down
2 changes: 1 addition & 1 deletion biscuit-auth/src/token/third_party.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ impl ThirdPartyRequest {
let mut symbols = SymbolTable::new();
symbols.public_keys = self.public_keys.clone();
let mut block = block_builder.build(symbols);
block.version = super::MAX_SCHEMA_VERSION;
block.version = super::THIRD_PARTY_BLOCK_VERSION;

let mut v = Vec::new();
token_block_to_proto_block(&block)
Expand Down

0 comments on commit c62aeab

Please sign in to comment.