xeauth
Advanced tools
| from xeauth.settings import config | ||
| from xeauth.github import GitHubAuth | ||
| from panel.auth import GithubLoginHandler | ||
| from tornado.httpclient import HTTPError, HTTPRequest | ||
| import panel as pn | ||
| if pn.config.oauth_key: | ||
| config.DEFAULT_CLIENT_ID = pn.config.oauth_key | ||
| class XenonLoginHandler(GithubLoginHandler): | ||
| """Xenon login handler. | ||
| """ | ||
| _SCOPE = " ".join(["read:org", "read:user", "read:public_key", "user:email", "read:gpg_key"]) | ||
| def _on_auth(self, user_info, access_token, refresh_token=None): | ||
| auth = GitHubAuth(oauth_token=access_token) | ||
| if not auth.xenonnt_member: | ||
| raise HTTPError(500, f"Github authentication failed. You are not a member of the XENONnT organization.") |
+1
-1
| Metadata-Version: 2.1 | ||
| Name: xeauth | ||
| Version: 0.2.1 | ||
| Version: 0.2.2 | ||
| Summary: Top-level package for xeauth. | ||
@@ -5,0 +5,0 @@ Home-page: https://github.com/jmosbacher/xeauth |
+2
-4
| [tool] | ||
| [tool.poetry] | ||
| name = "xeauth" | ||
| version = "0.2.1" | ||
| version = "0.2.2" | ||
| homepage = "https://github.com/jmosbacher/xeauth" | ||
@@ -48,6 +48,4 @@ description = "Top-level package for xeauth." | ||
| [tool.poetry.plugins] | ||
| [tool.poetry.plugins."eve_panel.auth"] | ||
| "XenonAuth" = "xeauth.integrations.eve_panel:XenonEveAuth" | ||
| [tool.poetry.plugins."panel.auth"] | ||
| "xeauth" = "xeauth.integrations.panel_server:XenonPanelAuth" | ||
| "xeauth" = "xeauth.integrations.panel:XenonLoginHandler" | ||
@@ -54,0 +52,0 @@ [tool.poetry.scripts] |
+3
-4
@@ -5,3 +5,3 @@ # -*- coding: utf-8 -*- | ||
| packages = \ | ||
| ['tests', 'xeauth'] | ||
| ['tests', 'xeauth', 'xeauth.integrations'] | ||
@@ -21,8 +21,7 @@ package_data = \ | ||
| {'console_scripts': ['xeauth = xeauth.cli:main'], | ||
| 'eve_panel.auth': ['XenonAuth = xeauth.integrations.eve_panel:XenonEveAuth'], | ||
| 'panel.auth': ['xeauth = xeauth.integrations.panel_server:XenonPanelAuth']} | ||
| 'panel.auth': ['xeauth = xeauth.integrations.panel:XenonLoginHandler']} | ||
| setup_kwargs = { | ||
| 'name': 'xeauth', | ||
| 'version': '0.2.1', | ||
| 'version': '0.2.2', | ||
| 'description': 'Top-level package for xeauth.', | ||
@@ -29,0 +28,0 @@ 'long_description': '======\nxeauth\n======\n\n\n.. image:: https://img.shields.io/pypi/v/xeauth.svg\n :target: https://pypi.python.org/pypi/xeauth\n\n.. image:: https://img.shields.io/travis/jmosbacher/xeauth.svg\n :target: https://travis-ci.com/jmosbacher/xeauth\n\n.. image:: https://readthedocs.org/projects/xeauth/badge/?version=latest\n :target: https://xeauth.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n\n\n\nAuthentication client for the Xenon edark matter experiment.\n\n\n* Free software: MIT\n* Documentation: https://xeauth.readthedocs.io.\n\n\nFeatures\n--------\n\n* TODO\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `briggySmalls/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`briggySmalls/cookiecutter-pypackage`: https://github.com/briggySmalls/cookiecutter-pypackage\n', |
@@ -11,2 +11,2 @@ """Top-level package for xeauth.""" | ||
| __email__ = "joe.mosbacher@gmail.com" | ||
| __version__ = "0.2.1" | ||
| __version__ = "0.2.2" |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
28812
1.99%15
7.14%584
2.46%