Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
Merge pull request #152 from CSCfi/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
blankdots committed Sep 18, 2020
2 parents 1fdc0da + c55b31b commit e189de6
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ jobs:
max-parallel: 4
matrix:
os: [ubuntu-latest]
python-version: [3.6, 3.7]
python-version: [3.6, 3.7.7]

runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install libcurl-devel
Expand Down
2 changes: 1 addition & 1 deletion beacon_api/conf/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
title=GA4GHBeacon at CSC

# Version of the Beacon implementation
version=1.7.0
version=1.7.1

# Author of this software
author=CSC developers
Expand Down
4 changes: 3 additions & 1 deletion beacon_api/utils/validate_jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ..api.exceptions import BeaconUnauthorised, BeaconForbidden, BeaconServerError
from aiohttp import web
from authlib.jose import jwt
from authlib.jose.errors import MissingClaimError, InvalidClaimError, ExpiredTokenError, InvalidTokenError
from authlib.jose.errors import MissingClaimError, InvalidClaimError, ExpiredTokenError, InvalidTokenError, DecodeError
import re
import aiohttp
from os import environ
Expand Down Expand Up @@ -131,6 +131,8 @@ async def token_middleware(request: web.Request, handler):
raise BeaconForbidden(obj, request.host, f'Token info not corresponding with claim: {e}') # pragma: no cover
except InvalidTokenError as e: # pragma: no cover
raise BeaconUnauthorised(obj, request.host, "invalid_token", f'Invalid authorization token: {e}') # pragma: no cover
except DecodeError as e: # pragma: no cover
raise BeaconUnauthorised(obj, request.host, "invalid_token", f'Invalid JWT format: {e}') # pragma: no cover
else:
request["token"] = {"bona_fide_status": False,
"permissions": None,
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,5 @@ commands = py.test -x --cov=beacon_api tests/ --cov-fail-under=80

[gh-actions]
python =
3.6: flake8, unit_tests, docs, bandit, mypy
3.6: unit_tests
3.7: flake8, unit_tests, docs, bandit, mypy

0 comments on commit e189de6

Please sign in to comment.