serve: Match endpoints with Cdm class methods
This commit is contained in:
parent
01416f6513
commit
2445297ae8
|
@ -178,7 +178,7 @@ class RemoteCdm(Cdm):
|
|||
raise InvalidLicenseType(f"License Type {type_!r} is invalid")
|
||||
|
||||
r = self.__session.post(
|
||||
url=f"{self.host}/{self.device_name}/challenge/{type_}",
|
||||
url=f"{self.host}/{self.device_name}/get_license_challenge/{type_}",
|
||||
json={
|
||||
"session_id": session_id.hex(),
|
||||
"init_data": pssh.dumps()
|
||||
|
@ -231,7 +231,7 @@ class RemoteCdm(Cdm):
|
|||
licence.ParseFromString(license_message.msg)
|
||||
|
||||
r = self.__session.post(
|
||||
url=f"{self.host}/{self.device_name}/keys/ALL",
|
||||
url=f"{self.host}/{self.device_name}/parse_license/ALL",
|
||||
json={
|
||||
"session_id": session_id.hex(),
|
||||
"license_message": base64.b64encode(license_message.SerializeToString()).decode()
|
||||
|
|
|
@ -170,8 +170,8 @@ async def set_service_certificate(request: web.Request) -> web.Response:
|
|||
})
|
||||
|
||||
|
||||
@routes.post("/{device}/challenge/{license_type}")
|
||||
async def challenge(request: web.Request) -> web.Response:
|
||||
@routes.post("/{device}/get_license_challenge/{license_type}")
|
||||
async def get_license_challenge(request: web.Request) -> web.Response:
|
||||
secret_key = request.headers["X-Secret-Key"]
|
||||
device_name = request.match_info["device"]
|
||||
|
||||
|
@ -232,8 +232,8 @@ async def challenge(request: web.Request) -> web.Response:
|
|||
}, status=200)
|
||||
|
||||
|
||||
@routes.post("/{device}/keys/{key_type}")
|
||||
async def keys(request: web.Request) -> web.Response:
|
||||
@routes.post("/{device}/parse_license/{key_type}")
|
||||
async def parse_license(request: web.Request) -> web.Response:
|
||||
secret_key = request.headers["X-Secret-Key"]
|
||||
device_name = request.match_info["device"]
|
||||
|
||||
|
|
Loading…
Reference in New Issue