def METHOD_NAME(self, request):
    if not request.token:
        return None
    key_prefix = self._temporary_credential_key_prefix
    key = key_prefix + request.token
    value = cache.get(key)
    if value:
        return TemporaryCredential(value)