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

Function get_logout_url

web/pgadmin/authenticate/__init__.py:51–71  ·  view source on GitHub ↗

Returns the logout url based on the current authentication method. Returns: str: logout url

()

Source from the content-addressed store, hash-verified

49
50
51def get_logout_url() -> str:
52 """
53 Returns the logout url based on the current authentication method.
54
55 Returns:
56 str: logout url
57 """
58 BROWSER_INDEX = 'browser.index'
59 if config.SERVER_MODE and\
60 session['auth_source_manager']['current_source'] == \
61 KERBEROS:
62 return _URL_WITH_NEXT_PARAM.format(url_for(
63 'kerberos.logout'), url_for(BROWSER_INDEX))
64 elif config.SERVER_MODE and\
65 session['auth_source_manager']['current_source'] == \
66 OAUTH2:
67 return _URL_WITH_NEXT_PARAM.format(url_for(
68 'oauth2.logout'), url_for(BROWSER_INDEX))
69
70 return _URL_WITH_NEXT_PARAM.format(
71 url_for('security.logout'), url_for(BROWSER_INDEX))
72
73
74def socket_login_required(f):

Callers 2

utilsFunction · 0.90
validate_viewFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected