Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from lalithkota/15.0-develop
Browse files Browse the repository at this point in the history
Github Test: Added pip pyjq build packages
  • Loading branch information
shibu-narayanan authored Apr 1, 2024
2 parents 48f8019 + 67a1d50 commit cfe79b1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ jobs:
ports:
- 5432:5432
steps:
# TODO: Think of caching dependency install.
- run: DEBIAN_FRONTEND=noninteractive apt-get install -qq --no-install-recommends build-essential autoconf autotools-dev automake libtool
- uses: actions/checkout@v3
with:
persist-credentials: false
Expand Down
4 changes: 2 additions & 2 deletions g2p_openid_vci/models/vci_issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ def get_all_contexts_json(self):
def get_auth_jwks(
self,
auth_issuer: str,
auth_allowed_issuers: list[str],
auth_allowed_jwks_urls: list[str],
auth_allowed_issuers: list,
auth_allowed_jwks_urls: list,
):
self.ensure_one()
jwk_url = None
Expand Down
8 changes: 2 additions & 6 deletions g2p_openid_vci/tests/test_openid_vc_issuer.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,14 +221,10 @@ def test_get_issuer_metadata(self):

# change issuer metadatas to dict
self.issuer.issuer_metadata_text = (
"{(.credential_type):"
+ self.issuer.issuer_metadata_text.strip().removeprefix("[").removesuffix("]")
+ "}"
"{(.credential_type):" + self.issuer.issuer_metadata_text.strip()[1:-1] + "}"
)
self.issuer_2.issuer_metadata_text = (
"{(.credential_type):"
+ self.issuer_2.issuer_metadata_text.strip().removeprefix("[").removesuffix("]")
+ "}"
"{(.credential_type):" + self.issuer_2.issuer_metadata_text.strip()[1:-1] + "}"
)

res = self.env["g2p.openid.vci.issuers"].get_issuer_metadata_by_name()
Expand Down
2 changes: 1 addition & 1 deletion g2p_openid_vci_rest_api/services/vci_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class OpenIdVCIRestService(Component):
output_param=PydanticModel(CredentialBaseResponse),
)
def post_credential(self, credential_request: CredentialRequest):
token = request.httprequest.headers.get("Authorization", "").removeprefix("Bearer")
token = request.httprequest.headers.get("Authorization", "").replace("Bearer", "", 1)
if not token:
raise Unauthorized("Invalid Bearer Token received.")
try:
Expand Down

0 comments on commit cfe79b1

Please sign in to comment.