src/integ_test_resources/android/sdk/integration/cdk/custom_resources/iot_custom_authorizer_function/iot_custom_authorizer.py [9:35]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    response = make_auth_response(effect)
    response_string = json.dumps(response)
    print(f"### returning response: {response_string}")
    return response_string


def make_auth_response(effect):
    resource_arn = os.environ.get("RESOURCE_ARN", "*")
    response = {
        "isAuthenticated": True,
        "principalId": "somePrincipalId",
        "disconnectAfterInSeconds": 3600,
        "refreshAfterInSeconds": 600,
        "policyDocuments": [
            {
                "Version": "2012-10-17",
                "Statement": [
                    {
                        "Action": ["iot:Connect", "iot:Subscribe", "iot:Publish", "iot:Receive"],
                        "Effect": effect,
                        "Resource": resource_arn,
                    }
                ],
            }
        ],
    }
    return response
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



src/integ_test_resources/ios/sdk/integration/cdk/custom_resources/iot_custom_authorizer_user_pass_function/iot_custom_authorizer_user_pass.py [24:50]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    response = make_auth_response(effect)
    response_string = json.dumps(response)
    print(f"### returning response: {response_string}")
    return response_string


def make_auth_response(effect):
    resource_arn = os.environ.get("RESOURCE_ARN", "*")
    response = {
        "isAuthenticated": True,
        "principalId": "somePrincipalId",
        "disconnectAfterInSeconds": 3600,
        "refreshAfterInSeconds": 600,
        "policyDocuments": [
            {
                "Version": "2012-10-17",
                "Statement": [
                    {
                        "Action": ["iot:Connect", "iot:Subscribe", "iot:Publish", "iot:Receive"],
                        "Effect": effect,
                        "Resource": resource_arn,
                    }
                ],
            }
        ],
    }
    return response
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



