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

Function register_nonce_hooks

authlib/integrations/flask_oauth1/cache.py:77–88  ·  view source on GitHub ↗

Register nonce related hooks to authorization server. :param authorization_server: AuthorizationServer instance :param cache: Cache instance :param key_prefix: key prefix for temporary credential :param expires: Expire time for nonce

(
    authorization_server, cache, key_prefix="nonce:", expires=86400
)

Source from the content-addressed store, hash-verified

75
76
77def register_nonce_hooks(
78 authorization_server, cache, key_prefix="nonce:", expires=86400
79):
80 """Register nonce related hooks to authorization server.
81
82 :param authorization_server: AuthorizationServer instance
83 :param cache: Cache instance
84 :param key_prefix: key prefix for temporary credential
85 :param expires: Expire time for nonce
86 """
87 exists_nonce = create_exists_nonce_func(cache, key_prefix, expires)
88 authorization_server.register_hook("exists_nonce", exists_nonce)

Callers 1

Calls 2

create_exists_nonce_funcFunction · 0.85
register_hookMethod · 0.45

Tested by

no test coverage detected