Is there an authentication method using the LightOpenID library using the POST method? To be precise, after authentication, Google (for example) returns to the specified URL, but all the data is sent to me using the GET method, which ends with an ugly and long URL.
My code is:
define('BASE_URL', 'http://someurl.com');
try {
$openid = new LightOpenID();
if (!isset($_GET['openid_mode'])) {
$openid->identity = 'https://www.google.com/accounts/o8/id';
$openid->realm = BASE_URL;
$openid->required = array('contact/email');
header('Location: '.$openid->authUrl());
} else if ($_GET['openid_mode'] == 'cancel') {
header('Location: '.BASE_URL);
} else {
if ($openid->validate()) {
$openid->getAttributes();
}
}
} catch (ErrorException $e) {
}
So, after authentication, the OP returns to a URL that looks something like this:
http://someurl.com/index.php?openid.ns=http://specs.openid.net/auth/2.0&openid.mode=id_res&openid.op_endpoint=https://www.googl...
And I want the OP back to:
http:
and send all the data using POST, not GET.
source
share