Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ( isset( $_POST['submit'] ) && $_SESSION['csrfToken'] == $_POST['csrfToken'] ) {
- $http_request = new http_req($Core->protocol . '://' . $Core->www_address . '/native/validate');
- $request = $http_request->make_post_request($_POST, false);
- $result = $http_request->POSTResponse()['return'] ? true : false;
- if($result == false)
- echo Error::HandleJsonError($http_request->POSTResponse());
- else {
- $_SESSION['username'] = $_POST['username'];
- $_SESSION['password'] = $_POST['password'];
- $Core->login($_SESSION);
- echo 'OAuthValidated'; // <- OAuthValidated is just a identifier, not really a keyword or state.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement