def __init__(self, flow_expiration=60 * 15, flow_cache_size=1000):
"""
Create a new access manager for managing authorizations.
Parameters
----------
flow_expiration: int
The number of seconds to keep pending authorization flows in memory
flow_cache_size: int
The maximum number of pending authorization flows to keep in memory at a time
"""
self.store = None
self.endpoints = CaseInsensitiveDict()
self.state_cache = TTLCache(maxsize=flow_cache_size,
ttl=flow_expiration) # type: Dict[Tuple[str, str], Tuple[Endpoint, str, str]]
self.random = random.SystemRandom()
self.redirect_uri = "http://localhost/oauth2/callback/"
评论列表
文章目录