MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / get_auth_sources

Function get_auth_sources

web/pgadmin/authenticate/__init__.py:327–344  ·  view source on GitHub ↗

Get the authenticated source object from the registry

(type)

Source from the content-addressed store, hash-verified

325
326
327def get_auth_sources(type):
328 """Get the authenticated source object from the registry"""
329
330 auth_sources = getattr(current_app, '_pgadmin_auth_sources', None)
331
332 if auth_sources is None or not isinstance(auth_sources, dict):
333 auth_sources = dict()
334
335 if type in auth_sources:
336 return auth_sources[type]
337
338 auth_source = AuthSourceRegistry.get(type)
339
340 if auth_source is not None:
341 auth_sources[type] = auth_source
342 setattr(current_app, '_pgadmin_auth_sources', auth_sources)
343
344 return auth_source
345
346
347def init_app(app):

Callers 4

oauth_authorizeFunction · 0.90
kerberos_update_ticketFunction · 0.90
validateMethod · 0.85
authenticateMethod · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected