port hubzillas OpenWebAuth - rename Verify class to OpenWebAuthToken

2022.09-rc
rabuzarus 2018-06-20 19:24:02 +02:00
rodzic d5afbd3357
commit 149142b4bc
4 zmienionych plików z 9 dodań i 9 usunięć

Wyświetl plik

@ -1,7 +1,7 @@
<?php <?php
/** /**
* @file src/Model/Verify.php * @file src/Model/OpenWebAuthToken.php
*/ */
namespace Friendica\Model; namespace Friendica\Model;
@ -12,7 +12,7 @@ use dba;
/** /**
* Methods to deal with entries of the 'openwebauth_token' table. * Methods to deal with entries of the 'openwebauth_token' table.
*/ */
class Verify class OpenWebAuthToken
{ {
/** /**
* Create an entry in the 'openwebauth_token' table. * Create an entry in the 'openwebauth_token' table.

Wyświetl plik

@ -17,7 +17,7 @@ use Friendica\Core\System;
use Friendica\Core\Worker; use Friendica\Core\Worker;
use Friendica\Database\DBM; use Friendica\Database\DBM;
use Friendica\Model\Contact; use Friendica\Model\Contact;
use Friendica\Model\Verify; use Friendica\Model\OpenWebAuthToken;
use Friendica\Protocol\Diaspora; use Friendica\Protocol\Diaspora;
use Friendica\Util\DateTimeFormat; use Friendica\Util\DateTimeFormat;
use Friendica\Util\Network; use Friendica\Util\Network;
@ -1056,12 +1056,12 @@ class Profile
{ {
$a = get_app(); $a = get_app();
// Clean old verify entries. // Clean old OpenWebAuthToken entries.
Verify::purge('owt', '3 MINUTE'); OpenWebAuthToken::purge('owt', '3 MINUTE');
// Check if the token we got is the same one // Check if the token we got is the same one
// we have stored in the database. // we have stored in the database.
$visitor_handle = Verify::getMeta('owt', 0, $token); $visitor_handle = OpenWebAuthToken::getMeta('owt', 0, $token);
if($visitor_handle === false) { if($visitor_handle === false) {
return; return;

Wyświetl plik

@ -8,7 +8,7 @@ use Friendica\BaseModule;
use Friendica\Core\System; use Friendica\Core\System;
use Friendica\Database\DBM; use Friendica\Database\DBM;
use Friendica\Model\Contact; use Friendica\Model\Contact;
use Friendica\Model\Verify; use Friendica\Model\OpenWebAuthToken;
use Friendica\Util\HTTPSignature; use Friendica\Util\HTTPSignature;
use dba; use dba;
@ -66,7 +66,7 @@ class Owa extends BaseModule
$token = random_string(32); $token = random_string(32);
// Store the generated token in the databe. // Store the generated token in the databe.
Verify::create('owt', 0, $token, $contact['addr']); OpenWebAuthToken::create('owt', 0, $token, $contact['addr']);
$result = ''; $result = '';

Wyświetl plik

@ -1,7 +1,7 @@
<?php <?php
/** /**
* @file src/Util/HTTPSig.php * @file src/Util/HTTPSignature.php
*/ */
namespace Friendica\Util; namespace Friendica\Util;