class EphemeralPubkeyIsValidServlet(Resource): isLeaf = True def __init__(self, syd): self.joinTokenStore = JoinTokenStore(syd) @jsonwrap def render_GET(self, request): args = get_args(request, ("public_key",)) publicKey = args["public_key"] return { 'valid': self.joinTokenStore.validateEphemeralPublicKey(publicKey), }
class EphemeralPubkeyIsValidServlet(Resource): isLeaf = True def __init__(self, syd): self.joinTokenStore = JoinTokenStore(syd) def render_GET(self, request): err, args = get_args(request, ("public_key",)) if err: return json.dumps(err) publicKey = args["public_key"] return json.dumps({ 'valid': self.joinTokenStore.validateEphemeralPublicKey(publicKey), })
class EphemeralPubkeyIsValidServlet(Resource): isLeaf = True def __init__(self, syd): self.joinTokenStore = JoinTokenStore(syd) def render_GET(self, request): err = require_args(request, ("public_key", )) if err: return json.dumps(err) publicKey = request.args["public_key"][0] return json.dumps({ 'valid': self.joinTokenStore.validateEphemeralPublicKey(publicKey), })