MCPcopy Create free account
hub / github.com/authlib/authlib / exists_nonce

Function exists_nonce

authlib/integrations/flask_oauth1/cache.py:66–72  ·  view source on GitHub ↗
(nonce, timestamp, client_id, oauth_token)

Source from the content-addressed store, hash-verified

64 """
65
66 def exists_nonce(nonce, timestamp, client_id, oauth_token):
67 key = f"{key_prefix}{nonce}-{timestamp}-{client_id}"
68 if oauth_token:
69 key = f"{key}-{oauth_token}"
70 rv = cache.has(key)
71 cache.set(key, 1, timeout=expires)
72 return rv
73
74 return exists_nonce
75

Callers 1

validate_nonceFunction · 0.50

Calls 2

hasMethod · 0.80
setMethod · 0.45

Tested by

no test coverage detected