Skip to content

Commit 5371ff5

Browse files
authored
Merge pull request #42 from siemens/refactor-adapt-to-23-9-1
refactor: adapt to Sentry 23.9.1
2 parents 8a62b75 + b1bd34b commit 5371ff5

File tree

7 files changed

+330
-207
lines changed

7 files changed

+330
-207
lines changed

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
publish:
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v2
16-
- uses: actions/setup-python@v2
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-python@v4
1717
with:
1818
python-version: "3.8"
19-
- uses: abatilo/actions-poetry@v2.0.0
19+
- uses: abatilo/actions-poetry@v2
2020
- name: Publish package
2121
run: |
2222
poetry install -n --no-dev

.github/workflows/test.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
black:
1616
runs-on: ubuntu-latest
1717
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions/setup-python@v2
18+
- uses: actions/checkout@v4
19+
- uses: actions/setup-python@v4
2020
with:
2121
python-version: "3.8"
2222
- uses: psf/black@stable
@@ -25,15 +25,15 @@ jobs:
2525
commitlint:
2626
runs-on: ubuntu-latest
2727
steps:
28-
- uses: actions/checkout@v2
28+
- uses: actions/checkout@v4
2929
with:
3030
fetch-depth: 0
3131
- uses: wagoid/commitlint-github-action@v3
3232
test:
3333
runs-on: ubuntu-latest
3434
services:
3535
postgres:
36-
image: postgres:9.6
36+
image: postgres:14.5
3737
env:
3838
POSTGRES_HOST_AUTH_METHOD: trust
3939
# Set health checks to wait until postgres has started
@@ -45,26 +45,28 @@ jobs:
4545
ports:
4646
- 5432:5432
4747
memcached:
48-
image: memcached:1.5-alpine
48+
image: memcached:1.6.21-alpine
4949
ports:
5050
- 11211:11211
5151
redis:
52-
image: redis:5.0-alpine
52+
image: redis:6.2.12-alpine
5353
ports:
5454
- 6379:6379
5555
steps:
56-
- uses: actions/checkout@v2
57-
- uses: actions/setup-python@v2
56+
- uses: actions/checkout@v4
57+
- uses: actions/setup-python@v4
5858
with:
5959
python-version: "3.8"
60-
- uses: abatilo/actions-poetry@v2.0.0
60+
- uses: abatilo/actions-poetry@v2
6161
- uses: actions/setup-node@v3
6262
with:
6363
node-version: '16'
6464
- name: Setup required upstream yarn version
6565
run: yarn set version 1.22.5
6666
- run: |
6767
sudo apt-get update && sudo apt-get install -y libxmlsec1-dev libmaxminddb-dev
68-
pip3 install -U wheel
68+
python3 -m venv venv
69+
. venv/bin/activate
70+
venv/bin/pip3 install -U wheel
6971
make develop
7072
make test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@
66
venv
77
.venv
88
.coverage
9+
.vscode/

oidc/provider.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,6 @@ def get_authorize_params(self, state, redirect_uri):
3838

3939
class OIDCProvider(OAuth2Provider):
4040
name = ISSUER
41-
client_id = CLIENT_ID
42-
client_secret = CLIENT_SECRET
4341

4442
def __init__(self, domain=None, domains=None, version=None, **config):
4543
if domain:
@@ -59,16 +57,22 @@ def __init__(self, domain=None, domains=None, version=None, **config):
5957
self.version = version
6058
super().__init__(**config)
6159

60+
def get_client_id(self):
61+
return CLIENT_ID
62+
63+
def get_client_secret(self):
64+
return CLIENT_SECRET
65+
6266
def get_configure_view(self):
6367
return OIDCConfigureView.as_view()
6468

6569
def get_auth_pipeline(self):
6670
return [
67-
OIDCLogin(self.client_id, domains=self.domains),
71+
OIDCLogin(self.get_client_id(), domains=self.domains),
6872
OAuth2Callback(
6973
access_token_url=TOKEN_ENDPOINT,
70-
client_id=self.client_id,
71-
client_secret=self.client_secret,
74+
client_id=self.get_client_id(),
75+
client_secret=self.get_client_secret(),
7276
),
7377
FetchUser(
7478
domains=self.domains,

0 commit comments

Comments
 (0)