mirror of
https://github.com/friendica/friendica
synced 2024-11-10 09:02:53 +00:00
port hubzillas OpenWebAuth - rename Verify class to OpenWebAuthToken
This commit is contained in:
parent
d5afbd3357
commit
149142b4bc
4 changed files with 9 additions and 9 deletions
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Model/Verify.php
|
||||
* @file src/Model/OpenWebAuthToken.php
|
||||
*/
|
||||
namespace Friendica\Model;
|
||||
|
||||
|
@ -12,7 +12,7 @@ use dba;
|
|||
/**
|
||||
* Methods to deal with entries of the 'openwebauth_token' table.
|
||||
*/
|
||||
class Verify
|
||||
class OpenWebAuthToken
|
||||
{
|
||||
/**
|
||||
* Create an entry in the 'openwebauth_token' table.
|
|
@ -17,7 +17,7 @@ use Friendica\Core\System;
|
|||
use Friendica\Core\Worker;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Verify;
|
||||
use Friendica\Model\OpenWebAuthToken;
|
||||
use Friendica\Protocol\Diaspora;
|
||||
use Friendica\Util\DateTimeFormat;
|
||||
use Friendica\Util\Network;
|
||||
|
@ -1056,12 +1056,12 @@ class Profile
|
|||
{
|
||||
$a = get_app();
|
||||
|
||||
// Clean old verify entries.
|
||||
Verify::purge('owt', '3 MINUTE');
|
||||
// Clean old OpenWebAuthToken entries.
|
||||
OpenWebAuthToken::purge('owt', '3 MINUTE');
|
||||
|
||||
// Check if the token we got is the same one
|
||||
// we have stored in the database.
|
||||
$visitor_handle = Verify::getMeta('owt', 0, $token);
|
||||
$visitor_handle = OpenWebAuthToken::getMeta('owt', 0, $token);
|
||||
|
||||
if($visitor_handle === false) {
|
||||
return;
|
||||
|
|
|
@ -8,7 +8,7 @@ use Friendica\BaseModule;
|
|||
use Friendica\Core\System;
|
||||
use Friendica\Database\DBM;
|
||||
use Friendica\Model\Contact;
|
||||
use Friendica\Model\Verify;
|
||||
use Friendica\Model\OpenWebAuthToken;
|
||||
use Friendica\Util\HTTPSignature;
|
||||
|
||||
use dba;
|
||||
|
@ -66,7 +66,7 @@ class Owa extends BaseModule
|
|||
$token = random_string(32);
|
||||
|
||||
// Store the generated token in the databe.
|
||||
Verify::create('owt', 0, $token, $contact['addr']);
|
||||
OpenWebAuthToken::create('owt', 0, $token, $contact['addr']);
|
||||
|
||||
$result = '';
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* @file src/Util/HTTPSig.php
|
||||
* @file src/Util/HTTPSignature.php
|
||||
*/
|
||||
namespace Friendica\Util;
|
||||
|
||||
|
|
Loading…
Reference in a new issue