Skip to content

Commit

Permalink
Revert "Adding oauthn (#655)"
Browse files Browse the repository at this point in the history
This reverts commit d553095.
  • Loading branch information
ZohebShaikh authored Oct 25, 2024
1 parent d553095 commit a0523b9
Show file tree
Hide file tree
Showing 19 changed files with 223 additions and 1,127 deletions.
146 changes: 77 additions & 69 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,102 +1,107 @@
accessible-pygments==0.0.5
aioca==1.8
aioca==1.7
aiofiles==24.1.0
aiohappyeyeballs==2.4.3
aiohttp==3.10.10
aiohappyeyeballs==2.4.0
aiohttp==3.10.5
aiosignal==1.3.1
alabaster==1.0.0
annotated-types==0.7.0
anyio==4.6.2.post1
anyio==4.4.0
appdirs==1.4.4
asciitree==0.3.3
asttokens==2.4.1
async-timeout==4.0.3
attrs==24.2.0
babel==2.16.0
beautifulsoup4==4.12.3
bidict==0.23.1
bluesky==1.13
bluesky==1.13.0a4
bluesky-kafka==0.10.0
bluesky-live==0.0.8
bluesky-stomp==0.1.2
boltons==24.0.0
bump-pydantic==0.8.0
cachetools==5.5.0
caproto==1.1.1
certifi==2024.8.30
cffi==1.17.1
cfgv==3.4.0
charset-normalizer==3.4.0
charset-normalizer==3.3.2
click==8.1.7
cloudpickle==3.1.0
cloudpickle==3.0.0
colorama==0.4.6
colorlog==6.8.2
comm==0.2.2
compress-pickle==2.1.0
confluent-kafka==2.6.0
confluent-kafka==2.5.3
contourpy==1.3.0
copier==9.4.0
coverage==7.6.3
cryptography==43.0.1
copier==9.3.1
coverage==7.6.1
cycler==0.12.1
dask==2024.9.1
dask==2024.9.0
databroker==1.2.5
dataclasses-json==0.6.7
decorator==5.1.1
deepdiff==8.0.1
deepmerge==2.0
Deprecated==1.2.14
distlib==0.3.9
distlib==0.3.8
dls-bluesky-core==0.0.4
dls-dodal==1.33.0
dnspython==2.7.0
dls-dodal==1.31.1
dnspython==2.6.1
docopt==0.6.2
doct==1.1.0
docutils==0.21.2
dunamai==1.22.0
email_validator==2.2.0
entrypoints==0.4
epicscorelibs==7.0.7.99.1.1
epicscorelibs==7.0.7.99.0.2
event-model==1.21.0
exceptiongroup==1.2.2
executing==2.1.0
fastapi==0.115.2
fastapi==0.114.2
fastapi-cli==0.0.5
fasteners==0.19
filelock==3.16.1
filelock==3.16.0
flexcache==0.3
flexparser==0.3.1
fonttools==4.54.1
fonttools==4.53.1
frozenlist==1.4.1
fsspec==2024.9.0
funcy==2.0
gitdb==4.0.11
GitPython==3.1.43
graypy==2.1.0
h11==0.14.0
h5py==3.12.1
h5py==3.11.0
HeapDict==1.0.1
historydict==1.2.6
httpcore==1.0.6
httpcore==1.0.5
httptools==0.6.1
httpx==0.27.2
humanize==4.11.0
humanize==4.10.0
identify==2.6.1
idna==3.10
imageio==2.36.0
imageio==2.35.1
imagesize==1.4.1
importlib_metadata==8.4.0
importlib_metadata==8.5.0
importlib_resources==6.4.5
iniconfig==2.0.0
intake==0.6.4
ipython==8.18.0
ipywidgets==8.1.5
itsdangerous==2.2.0
jedi==0.19.1
Jinja2==3.1.4
jinja2-ansible-filters==1.3.2
jsonschema==4.23.0
jsonschema-specifications==2024.10.1
jsonschema-specifications==2023.12.1
jupyterlab_widgets==3.0.13
kiwisolver==1.4.7
ldap3==2.9.1
libcst==1.4.0
livereload==2.7.0
locket==1.0.0
lz4==4.3.3
markdown-it-py==3.0.0
MarkupSafe==3.0.1
MarkupSafe==2.1.5
marshmallow==3.22.0
matplotlib==3.9.2
matplotlib-inline==0.1.7
Expand All @@ -108,91 +113,90 @@ mongoquery==1.4.2
msgpack==1.1.0
msgpack-numpy==0.4.8
multidict==6.1.0
mypy==1.12.0
mypy==1.11.2
mypy-extensions==1.0.0
myst-parser==4.0.0
networkx==3.4.1
networkx==3.3
nodeenv==1.9.1
nose2==0.15.1
nslsii==0.10.5
numcodecs==0.13.1
nslsii==0.10.3
numcodecs==0.13.0
numpy==1.26.4
opencv-python-headless==4.10.0.84
opentelemetry-api==1.27.0
ophyd==1.9.0
ophyd-async==0.6.0
orderly-set==5.2.2
ophyd-async==0.5.2
orjson==3.10.7
p4p==4.2.0
p4p==4.1.12
packaging==24.1
pandas==2.2.3
pandas==2.2.2
parso==0.8.4
partd==1.4.2
pathlib2==2.3.7.post1
pathspec==0.12.1
pexpect==4.9.0
picobox==4.0.0
pika==1.3.2
pillow==11.0.0
pillow==10.4.0
PIMS==0.7
Pint==0.24.3
pipdeptree==2.23.4
platformdirs==4.3.6
pipdeptree==2.23.3
platformdirs==4.3.3
pluggy==1.5.0
plumbum==1.9.0
plumbum==1.8.3
ply==3.11
pre_commit==4.0.1
pre-commit==3.8.0
prettytable==3.11.0
prompt-toolkit==3.0.36
propcache==0.2.0
psutil==6.0.0
ptyprocess==0.7.0
pure_eval==0.2.3
pvxslibs==1.3.2
pvxslibs==1.3.1
py==1.11.0
pyasn1==0.6.1
pycparser==2.22
pycryptodome==3.21.0
pydantic==2.9.2
pycryptodome==3.20.0
pydantic==2.9.1
pydantic-extra-types==2.9.0
pydantic-settings==2.5.2
pydantic_core==2.23.4
pydantic_core==2.23.3
pydantic_numpy==5.0.2
pydata-sphinx-theme==0.15.4
pyepics==3.5.7
Pygments==2.18.0
PyJWT==2.9.0
pymongo==4.10.1
pymongo==4.8.0
pyOlog==4.5.0
pyparsing==3.2.0
pyparsing==3.1.4
pytest==8.3.3
pytest-asyncio==0.24.0
pytest-cov==5.0.0
python-dateutil==2.9.0.post0
python-dotenv==1.0.1
python-multipart==0.0.12
python-multipart==0.0.9
pytz==2024.2
PyYAML==6.0.2
pyyaml-include==2.1
questionary==2.0.1
redis==5.1.1
redis-json-dict==0.2.1
redis==5.0.8
redis-json-dict==0.2.0
referencing==0.35.1
requests==2.32.3
responses==0.25.3
rich==13.7.1
rpds-py==0.20.0
ruamel.yaml==0.18.6
ruamel.yaml.clib==0.2.8
ruff==0.6.9
ruff==0.6.5
scanspec==0.7.2
semver==3.0.2
setuptools-dso==2.11
shellingham==1.5.4
six==1.16.0
slicerator==1.1.0
smmap==5.0.1
sniffio==1.3.1
snowballstemmer==2.2.0
soupsieve==2.6
Sphinx==8.1.3
sphinx-autobuild==2024.10.3
Sphinx==8.0.2
sphinx-autobuild==2024.9.3
sphinx-click==6.0.0
sphinx-copybutton==0.5.2
sphinx_design==0.6.1
Expand All @@ -206,39 +210,43 @@ sphinxcontrib-openapi==0.8.4
sphinxcontrib-qthelp==2.0.0
sphinxcontrib-serializinghtml==2.0.0
stack-data==0.6.3
starlette==0.40.0
starlette==0.38.5
stomp-py==8.1.2
suitcase-mongo==0.6.0
suitcase-msgpack==0.3.0
suitcase-utils==0.5.4
super-state-machine==2.0.2
tifffile==2024.9.20
toolz==1.0.0
tifffile==2024.8.30
tomli==2.0.1
toolz==0.12.1
tornado==6.4.1
tox==3.28.0
tox-direct==0.4
tqdm==4.66.5
traitlets==5.14.3
typer==0.12.4
types-mock==5.1.0.20240425
types-PyYAML==6.0.12.20240917
types-requests==2.32.0.20241016
types-requests==2.32.0.20240914
types-urllib3==1.26.25.14
typing-inspect==0.9.0
typing_extensions==4.12.2
tzdata==2024.2
tzdata==2024.1
tzlocal==5.2
ujson==5.10.0
urllib3==2.2.3
uvicorn==0.32.0
virtualenv==20.26.6
uvicorn==0.30.6
uvloop==0.19.0
virtualenv==20.26.4
watchfiles==0.24.0
wcwidth==0.2.13
websocket-client==1.8.0
websockets==13.1
websockets==13.0.1
widgetsnbextension==4.0.13
workflows==2.27
wrapt==1.16.0
xarray==2024.9.0
yarl==1.15.3
yarl==1.11.1
zarr==2.18.3
zict==2.2.0
zipp==3.20.2
zocalo==1.1.1
zocalo==1.1.0
3 changes: 0 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@ dependencies = [
"super-state-machine", # See GH issue 553
"GitPython",
"bluesky-stomp>=0.1.2",
"pyjwt",
"python-multipart",
"cryptography"
]
dynamic = ["version"]
license.file = "LICENSE"
Expand Down
40 changes: 2 additions & 38 deletions src/blueapi/cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,8 @@
from blueapi.client.client import BlueapiClient
from blueapi.client.event_bus import AnyEvent, BlueskyStreamingError, EventBusClient
from blueapi.client.rest import BlueskyRemoteControlError
from blueapi.config import (
ApplicationConfig,
CLIClientConfig,
ConfigLoader,
)
from blueapi.config import ApplicationConfig, ConfigLoader
from blueapi.core import DataEvent
from blueapi.service.authentication import CliTokenManager, SessionManager
from blueapi.service.main import start
from blueapi.service.openapi import (
DOCS_SCHEMA_LOCATION,
Expand Down Expand Up @@ -258,6 +253,7 @@ def pause(obj: dict, defer: bool = False) -> None:
@click.pass_obj
def resume(obj: dict) -> None:
"""Resume the execution of the current task"""

client: BlueapiClient = obj["client"]
pprint(client.resume())

Expand Down Expand Up @@ -333,35 +329,3 @@ def scratch(obj: dict) -> None:
setup_scratch(config.scratch)
else:
raise KeyError("No scratch config supplied")


@main.command(name="login")
@click.pass_obj
def login(obj: dict) -> None:
config: ApplicationConfig = obj["config"]
if isinstance(config.oauth_client, CLIClientConfig) and config.oauth_server:
print("Logging in")
auth: SessionManager = SessionManager(
server_config=config.oauth_server,
client_config=config.oauth_client,
token_manager=CliTokenManager(Path(config.oauth_client.token_file_path)),
)
auth.start_device_flow()
else:
print("Please provide configuration to login!")


@main.command(name="logout")
@click.pass_obj
def logout(obj: dict) -> None:
config: ApplicationConfig = obj["config"]
if isinstance(config.oauth_client, CLIClientConfig) and config.oauth_server:
auth: SessionManager = SessionManager(
server_config=config.oauth_server,
client_config=config.oauth_client,
token_manager=CliTokenManager(Path(config.oauth_client.token_file_path)),
)
auth.logout()
print("Logged out")
else:
print("Please provide configuration to logout!")
Loading

0 comments on commit a0523b9

Please sign in to comment.