Loading services/TS29222_CAPIF_Security_API/capif_security/core/validate_user.py +2 −1 Original line number Original line Diff line number Diff line Loading @@ -3,7 +3,7 @@ import json from ..models.problem_details import ProblemDetails from ..models.problem_details import ProblemDetails from ..encoder import JSONEncoder from ..encoder import JSONEncoder from .resources import Resource from .resources import Resource from .responses import internal_server_error from .responses import internal_server_error,serialize_clean_camel_case class ControlAccess(Resource): class ControlAccess(Resource): Loading @@ -18,6 +18,7 @@ class ControlAccess(Resource): if cert_entry is not None: if cert_entry is not None: if cert_entry["cert_signature"] != cert_signature: if cert_entry["cert_signature"] != cert_signature: prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = serialize_clean_camel_case(prob) return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") except Exception as e: except Exception as e: Loading Loading
services/TS29222_CAPIF_Security_API/capif_security/core/validate_user.py +2 −1 Original line number Original line Diff line number Diff line Loading @@ -3,7 +3,7 @@ import json from ..models.problem_details import ProblemDetails from ..models.problem_details import ProblemDetails from ..encoder import JSONEncoder from ..encoder import JSONEncoder from .resources import Resource from .resources import Resource from .responses import internal_server_error from .responses import internal_server_error,serialize_clean_camel_case class ControlAccess(Resource): class ControlAccess(Resource): Loading @@ -18,6 +18,7 @@ class ControlAccess(Resource): if cert_entry is not None: if cert_entry is not None: if cert_entry["cert_signature"] != cert_signature: if cert_entry["cert_signature"] != cert_signature: prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = ProblemDetails(title="Unauthorized", detail="User not authorized", cause="You are not the owner of this resource") prob = serialize_clean_camel_case(prob) return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") return Response(json.dumps(prob, cls=JSONEncoder), status=401, mimetype="application/json") except Exception as e: except Exception as e: Loading