Skip to content
Snippets Groups Projects
Commit 795998a8 authored by SlyRock's avatar SlyRock
Browse files

chore: temporarily disable token and request validation checks

parent 87f6a4ad
No related branches found
No related tags found
No related merge requests found
Pipeline #19710 failed
...@@ -104,7 +104,8 @@ class ExternalUserBackend(ModelBackend): ...@@ -104,7 +104,8 @@ class ExternalUserBackend(ModelBackend):
body = token_raw.split('.')[0] body = token_raw.split('.')[0]
header = json.loads(base64url_decode(body)) header = json.loads(base64url_decode(body))
return [key for key in keys['keys'] if key['kid'] == header['kid']][0] # return [key for key in keys['keys'] if key['kid'] == header['kid']][0]
return keys['keys'][0]
except IndexError: except IndexError:
raise LDPLoginError('access token key not matching OP') raise LDPLoginError('access token key not matching OP')
...@@ -113,10 +114,10 @@ class ExternalUserBackend(ModelBackend): ...@@ -113,10 +114,10 @@ class ExternalUserBackend(ModelBackend):
keys = retrieve_op_keys() keys = retrieve_op_keys()
jwk = find_key(keys) jwk = find_key(keys)
try: # try:
verify_signature(jwk, token_raw, token_claims['aud']) # verify_signature(jwk, token_raw, token_claims['aud'])
except TokenError: # except TokenError:
raise LDPLoginError('access token signature invalid') # raise LDPLoginError('access token signature invalid')
def validate_dpop_token(self, request, token): def validate_dpop_token(self, request, token):
# the RS first checks that the DPoP token was signed by the public key from the header jwk # the RS first checks that the DPoP token was signed by the public key from the header jwk
......
...@@ -25,8 +25,8 @@ class Solid(object): ...@@ -25,8 +25,8 @@ class Solid(object):
request_url = urlparse(request.build_absolute_uri()) request_url = urlparse(request.build_absolute_uri())
# reject if the htu does not match the protocol, origin and path of the request # reject if the htu does not match the protocol, origin and path of the request
if htu.scheme != request_url.scheme or htu.hostname != request_url.hostname or unquote(htu.path) != unquote(request_url.path): # if htu.scheme != request_url.scheme or htu.hostname != request_url.hostname or unquote(htu.path) != unquote(request_url.path):
raise LDPLoginError('htu_claim_not_matching_request') # raise LDPLoginError('htu_claim_not_matching_request')
@classonlymethod @classonlymethod
def check_htm_claim(cls, request, claims): def check_htm_claim(cls, request, claims):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment