MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / rejects_expired

Function rejects_expired

nodedb-cluster/src/auth/join_token.rs:208–217  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

206
207 #[test]
208 fn rejects_expired() {
209 let secret = [0xAAu8; 32];
210 // expiry in the distant past
211 let expiry = 1u64;
212 let hex = issue_token(&secret, 1, expiry).unwrap();
213 assert_eq!(
214 verify_token(&hex, &secret).unwrap_err(),
215 TokenError::Expired
216 );
217 }
218
219 #[test]
220 fn rejects_wrong_length() {

Callers

nothing calls this directly

Calls 1

issue_tokenFunction · 0.85

Tested by

no test coverage detected