GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — snowflake-connector-python/auth_by_plugin.py at master · byule/snowflake-connector-python

Expand file tree

/

auth_by_plugin.py

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
44 lines (36 loc) · 1.25 KB
/

auth_by_plugin.py

Copy path

File metadata and controls

44 lines (36 loc) · 1.25 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2012-2019 Snowflake Computing Inc. All right reserved.
#
from .errors import Error, DatabaseError
from .sqlstate import SQLSTATE_CONNECTION_WAS_NOT_ESTABLISHED
class AuthByPlugin(object):
"""
External Authenticator interface.
"""
@property
def assertion_content(self):
raise NotImplementedError
def update_body(self, body):
raise NotImplementedError
def authenticate(
self, authenticator, service_name, account, user, password):
raise NotImplementedError
def handle_failure(self, ret):
""" Handles a failure when connecting to Snowflake
Args:
ret: dictionary returned from Snowflake.
"""
Error.errorhandler_wrapper(
self._rest._connection, None, DatabaseError,
{
u'msg': (u"Failed to connect to DB: {host}:{port}, "
u"{message}").format(
host=self._rest._host,
port=self._rest._port,
message=ret[u'message'],
),
u'errno': int(ret.get(u'code', -1)),
u'sqlstate': SQLSTATE_CONNECTION_WAS_NOT_ESTABLISHED,
})
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.