Custom authentication using POST

Options
How does the POST request work in PUN? I'm trying with something like this:
string temp = "ticket=" + ticket; 
PhotonNetwork.AuthValues.SetAuthPostData(temp);
But on the server side it says $_POST is empty. Can I change headers for request, and is there even a list of them available somewhere? Doing it by GET works fine (while changing $_POST to $_GET ofc)

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @fake,

    You need to set the custom authentication type to custom:
    PhotonNetwork.AuthValues.AuthType = CustomAuthenticationType.Custom;
    Also in PHP, I think you need to get raw POST payload in a special way:
    $post_payload = file_get_contents('php://input');