Apply freshness policy to a verified session
A still-valid token can represent an old or insufficiently verified session. Apply application policy after the identity provider has verified the token. The verified session is eight ticks old and meets the required assurance level. The expiration boundary remains exclusive.
Run the framework with your own input
Install Blyx 0.2.1 and a Rust toolchain with a host linker, then run the versioned project. Each positional argument is a number or a comma-separated numerical vector. The CLI accepts up to 16 entries per vector. The imported module accepts longer inputs.
git clone --depth 1 --branch v0.1.0 https://github.com/Rahulchaube1/blyx-harrier.git
cd blyx-harrier
blyxc native-run project.blyx -- 100 90 110 0 2 2 92 10API and return values
Returns [policy accepted, claims time accepted, assurance/freshness accepted, session age]. Use only after the host has authenticated and verified the issuer, audience and signature. Invalid input returns an empty vector.
| Argument | Accepted input |
|---|---|
| now | exact signed integer |
| begins | exact signed integer |
| expires | exact signed integer |
| skew | nonnegative exact integer |
| observed | nonnegative exact integer |
| required | nonnegative exact integer |
| auth_time | exact signed integer |
| max_age | nonnegative exact integer |
Use the libraries independently
The framework vendors the same library source published in these two repositories. Each module has its own package page, input contract and regression suite.
Try the program
Expected output
1 1 1 8
Practice
Change now = 110.0, auth_time = 105.0. Predict the result, then run the program.
Hint
Returns [policy accepted, claims time accepted, assurance/freshness accepted, session age]. Use only after the host has authenticated and verified the issuer, audience and signature.
Worked solution
The result vector is [0, 0, 1, 5]. Compare its fields with the return layout in the API section.
Find
let now = 100.0;Replace with
let now = 110.0;Find
let auth_time = 92.0;Replace with
let auth_time = 105.0;Output after the change
0 0 1 5
