Skip to content

Commit

Permalink
refactor: adapt to Sentry 23.9.1
Browse files Browse the repository at this point in the history
  • Loading branch information
max-wittig committed Sep 21, 2023
1 parent 8a62b75 commit b1bd34b
Show file tree
Hide file tree
Showing 7 changed files with 330 additions and 207 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- uses: abatilo/actions-poetry@v2.0.0
- uses: abatilo/actions-poetry@v2
- name: Publish package
run: |
poetry install -n --no-dev
Expand Down
22 changes: 12 additions & 10 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ jobs:
black:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- uses: psf/black@stable
Expand All @@ -25,15 +25,15 @@ jobs:
commitlint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: wagoid/commitlint-github-action@v3
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6
image: postgres:14.5
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
Expand All @@ -45,26 +45,28 @@ jobs:
ports:
- 5432:5432
memcached:
image: memcached:1.5-alpine
image: memcached:1.6.21-alpine
ports:
- 11211:11211
redis:
image: redis:5.0-alpine
image: redis:6.2.12-alpine
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: "3.8"
- uses: abatilo/actions-poetry@v2.0.0
- uses: abatilo/actions-poetry@v2
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Setup required upstream yarn version
run: yarn set version 1.22.5
- run: |
sudo apt-get update && sudo apt-get install -y libxmlsec1-dev libmaxminddb-dev
pip3 install -U wheel
python3 -m venv venv
. venv/bin/activate
venv/bin/pip3 install -U wheel
make develop
make test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
venv
.venv
.coverage
.vscode/
14 changes: 9 additions & 5 deletions oidc/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ def get_authorize_params(self, state, redirect_uri):

class OIDCProvider(OAuth2Provider):
name = ISSUER
client_id = CLIENT_ID
client_secret = CLIENT_SECRET

def __init__(self, domain=None, domains=None, version=None, **config):
if domain:
Expand All @@ -59,16 +57,22 @@ def __init__(self, domain=None, domains=None, version=None, **config):
self.version = version
super().__init__(**config)

def get_client_id(self):
return CLIENT_ID

def get_client_secret(self):
return CLIENT_SECRET

def get_configure_view(self):
return OIDCConfigureView.as_view()

def get_auth_pipeline(self):
return [
OIDCLogin(self.client_id, domains=self.domains),
OIDCLogin(self.get_client_id(), domains=self.domains),
OAuth2Callback(
access_token_url=TOKEN_ENDPOINT,
client_id=self.client_id,
client_secret=self.client_secret,
client_id=self.get_client_id(),
client_secret=self.get_client_secret(),
),
FetchUser(
domains=self.domains,
Expand Down
Loading

0 comments on commit b1bd34b

Please sign in to comment.