Skip to content

Commit 9ccdd9e

Browse files
committed
fix: expose ThirdPartyRequest and ThirdPartyBlock
1 parent d029802 commit 9ccdd9e

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# Unreleased
2+
3+
- support for third-party blocks
4+
15
# 0.4.0-beta.2
26

37
- pre-built wheels for python 3.9-3.13

biscuit_auth.pyi

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -626,6 +626,7 @@ class UnverifiedBiscuit:
626626
def revocation_ids(self) -> List[str]: ...
627627
def verify(self, root: PublicKey) -> Biscuit: ...
628628

629+
# Third party block request
629630
class ThirdPartyRequest:
630631
# Create a third-party block
631632
#
@@ -643,5 +644,6 @@ class ThirdPartyRequest:
643644
block: BlockBuilder
644645
) -> ThirdPartyBlock: ...
645646

647+
# Third party block contents
646648
class ThirdPartyBlock:
647649
pass

src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1065,6 +1065,7 @@ impl PyBlockBuilder {
10651065
}
10661066
}
10671067

1068+
/// Third party block request
10681069
#[pyclass(name = "ThirdPartyRequest")]
10691070
pub struct PyThirdPartyRequest(Option<ThirdPartyRequest>);
10701071

@@ -1097,6 +1098,7 @@ impl PyThirdPartyRequest {
10971098
}
10981099
}
10991100

1101+
/// Third party block contents
11001102
#[pyclass(name = "ThirdPartyBlock")]
11011103
pub struct PyThirdPartyBlock(ThirdPartyBlock);
11021104

@@ -1706,6 +1708,8 @@ pub fn biscuit_auth(py: Python, m: &Bound<PyModule>) -> PyResult<()> {
17061708
m.add_class::<PyPolicy>()?;
17071709
m.add_class::<PyUnverifiedBiscuit>()?;
17081710
m.add_class::<PyAlgorithm>()?;
1711+
m.add_class::<PyThirdPartyRequest>()?;
1712+
m.add_class::<PyThirdPartyBlock>()?;
17091713

17101714
m.add("DataLogError", py.get_type::<DataLogError>())?;
17111715
m.add("AuthorizationError", py.get_type::<AuthorizationError>())?;

0 commit comments

Comments
 (0)