cache
Abstract base class for implementing a token cache interface.
This module defines the Cache class, which specifies the interface for caching OAuth2 tokens based on scopes and audiences.
Module Contents
Classes
Abstract base class for caching OAuth2 tokens. |
- class cache.Cache
Bases:
digraph inheritance3ffa7a6b5e { bgcolor=transparent; rankdir=LR; size="8.0, 12.0"; "ABC" [fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",tooltip="Helper class that provides a standard way to create an ABC using"]; "Cache" [URL="#cache.Cache",fillcolor=white,fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans",fontsize=10,height=0.25,shape=box,style="setlinewidth(0.5),filled",target="_top",tooltip="Abstract base class for caching OAuth2 tokens."]; "ABC" -> "Cache" [arrowsize=0.5,style="setlinewidth(0.5)"]; }abc.ABCAbstract base class for caching OAuth2 tokens.
This class defines the interface for a token cache that stores and retrieves OAuth2 access tokens based on a combination of scopes and audiences. It is intended to be subclassed by specific caching backends.
- abstract get_cache_token(scopes, audiences, key_prefix=None)
Retrieve a cached token based on scopes and audiences.
- abstract set_cache_token(scopes, audiences, token, key_prefix=None)
Store a token in the cache with a key based on scopes and audiences.