Skip to content

Commit a739e6a

Browse files
authored
fixed authentication popup issue (#57)
* changed http exception code to 401 when entered invalid creds and resolved pop up issue * remove flux-tree commands from flux restful api
1 parent c2006ea commit a739e6a

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

Dockerfile

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,6 @@ RUN pip install -r /requirements.txt && \
2727
apt-get autoremove && \
2828
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
2929

30-
# Copy the flux tree commands to the install
31-
RUN git clone --depth 1 https://github.com/flux-framework/flux-sched && \
32-
cp ./flux-sched/t/scripts/flux-tree* /usr/libexec/flux/cmd/ && \
33-
rm -rf ./flux-sched
34-
3530
WORKDIR /code
3631
COPY . /code
3732
ENTRYPOINT ["/code/entrypoint.sh"]

app/library/auth.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def check_auth(
5151
db, user_name=credentials.username, password=credentials.password
5252
)
5353
if not user:
54-
raise HTTPException(status_code=400, detail="Incorrect email or password")
54+
raise HTTPException(status_code=401, detail="Incorrect email or password", headers={"WWW-Authenticate": "Basic"})
5555
elif not crud_user.is_active(user):
5656
raise HTTPException(status_code=400, detail="Inactive user")
5757
return credentials.username

0 commit comments

Comments
 (0)