Skip to content

Commit

Permalink
chore: test
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrOertlin committed Jan 28, 2025
1 parent d6c2eeb commit 2ae86a3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cg/server/endpoints/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

from cg.server.ext import db
from cg.store.models import User
from cg.server.ext import keycloak_openid_client


LOG = logging.getLogger(__name__)

Expand All @@ -24,6 +26,11 @@ def public_endpoint(*args, **kwargs):
return public_endpoint


def test_keycloak_auth():
token = keycloak_openid_client.token("christian.oertlin@scilifelab.se", "password")
print(f"keycloak token {token}")


def before_request():
"""Authorize API routes with JSON Web Tokens."""
if not request.is_secure:
Expand All @@ -45,6 +52,7 @@ def before_request():
)

jwt_token = auth_header.split("Bearer ")[-1]
test_keycloak_auth()
# # replace
# try:
# user_data = verify_google_token(jwt_token)
Expand Down

0 comments on commit 2ae86a3

Please sign in to comment.