Skip to content

Commit

Permalink
fix private claims example to have a valid token
Browse files Browse the repository at this point in the history
  • Loading branch information
prince-chrismc committed Jun 3, 2024
1 parent 4a772ef commit f15edbc
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/jwt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:

- name: run
run: |
cmake --build --preset ci-asan --target private-claims-run
cmake --build --preset ci-asan --target rsa-create-run
cmake --build --preset ci-asan --target rsa-verify-run
cmake --build --preset ci-asan --target jwks-verify-run
Expand All @@ -87,6 +88,7 @@ jobs:

- name: run
run: |
cmake --build --preset ci-ubsan --target private-claims-run
cmake --build --preset ci-ubsan --target rsa-create-run
cmake --build --preset ci-ubsan --target rsa-verify-run
cmake --build --preset ci-ubsan --target jwks-verify-run
Expand Down
1 change: 1 addition & 0 deletions example/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ add_custom_target(print-claims-run COMMAND print-claims)

add_executable(private-claims private-claims.cpp)
target_link_libraries(private-claims jwt-cpp::jwt-cpp)
add_custom_target(private-claims-run COMMAND private-claims)

add_executable(rsa-create rsa-create.cpp)
target_link_libraries(rsa-create jwt-cpp::jwt-cpp)
Expand Down
2 changes: 1 addition & 1 deletion example/private-claims.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ int main() {
.set_issuer("auth.mydomain.io")
.set_audience("mydomain.io")
.set_issued_at(time)
.set_not_before(time + sec{15})
.set_not_before(time - sec{15})
.set_expires_at(time + sec{15} + min{2})
.set_payload_claim("boolean", picojson::value(true))
.set_payload_claim("integer", picojson::value(int64_t{12345}))
Expand Down

0 comments on commit f15edbc

Please sign in to comment.