port hubzillas OpenWebAuth - add some notes to the doxygen to refer to hubzilla's source code
This commit is contained in:
parent
af9116635b
commit
9195ea26b1
6 changed files with 36 additions and 0 deletions
|
@ -987,6 +987,8 @@ class Profile
|
||||||
* redirects the visitor to his/her instance to start the magic auth (Authentication)
|
* redirects the visitor to his/her instance to start the magic auth (Authentication)
|
||||||
* process.
|
* process.
|
||||||
*
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/channel.php
|
||||||
|
*
|
||||||
* @param App $a Application instance.
|
* @param App $a Application instance.
|
||||||
*/
|
*/
|
||||||
public static function zrlInit(App $a)
|
public static function zrlInit(App $a)
|
||||||
|
@ -1055,6 +1057,8 @@ class Profile
|
||||||
/**
|
/**
|
||||||
* OpenWebAuth authentication.
|
* OpenWebAuth authentication.
|
||||||
*
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/zid.php
|
||||||
|
*
|
||||||
* @param string $token
|
* @param string $token
|
||||||
*/
|
*/
|
||||||
public static function owtInit($token)
|
public static function owtInit($token)
|
||||||
|
|
|
@ -12,6 +12,11 @@ use Friendica\Util\Network;
|
||||||
|
|
||||||
use dba;
|
use dba;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Magic Auth (remote authentication) module.
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/Zotlabs/Module/Magic.php
|
||||||
|
*/
|
||||||
class Magic extends BaseModule
|
class Magic extends BaseModule
|
||||||
{
|
{
|
||||||
public static function init()
|
public static function init()
|
||||||
|
|
|
@ -23,6 +23,8 @@ use dba;
|
||||||
* If the signature verifies a token is returned.
|
* If the signature verifies a token is returned.
|
||||||
*
|
*
|
||||||
* This token may be exchanged for an authenticated cookie.
|
* This token may be exchanged for an authenticated cookie.
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/Zotlabs/Module/Owa.php
|
||||||
*/
|
*/
|
||||||
class Owa extends BaseModule
|
class Owa extends BaseModule
|
||||||
{
|
{
|
||||||
|
|
|
@ -251,6 +251,8 @@ class Crypto
|
||||||
/**
|
/**
|
||||||
* Encrypt a string with 'aes-256-cbc' cipher method.
|
* Encrypt a string with 'aes-256-cbc' cipher method.
|
||||||
*
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $key The key used for encryption.
|
* @param string $key The key used for encryption.
|
||||||
* @param string $iv A non-NULL Initialization Vector.
|
* @param string $iv A non-NULL Initialization Vector.
|
||||||
|
@ -265,6 +267,8 @@ class Crypto
|
||||||
/**
|
/**
|
||||||
* Decrypt a string with 'aes-256-cbc' cipher method.
|
* Decrypt a string with 'aes-256-cbc' cipher method.
|
||||||
*
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $key The key used for decryption.
|
* @param string $key The key used for decryption.
|
||||||
* @param string $iv A non-NULL Initialization Vector.
|
* @param string $iv A non-NULL Initialization Vector.
|
||||||
|
@ -279,6 +283,8 @@ class Crypto
|
||||||
/**
|
/**
|
||||||
* Encrypt a string with 'aes-256-ctr' cipher method.
|
* Encrypt a string with 'aes-256-ctr' cipher method.
|
||||||
*
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $key The key used for encryption.
|
* @param string $key The key used for encryption.
|
||||||
* @param string $iv A non-NULL Initialization Vector.
|
* @param string $iv A non-NULL Initialization Vector.
|
||||||
|
@ -295,6 +301,8 @@ class Crypto
|
||||||
/**
|
/**
|
||||||
* Decrypt a string with 'aes-256-cbc' cipher method.
|
* Decrypt a string with 'aes-256-cbc' cipher method.
|
||||||
*
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $key The key used for decryption.
|
* @param string $key The key used for decryption.
|
||||||
* @param string $iv A non-NULL Initialization Vector.
|
* @param string $iv A non-NULL Initialization Vector.
|
||||||
|
@ -309,6 +317,8 @@ class Crypto
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $pubkey The public key.
|
* @param string $pubkey The public key.
|
||||||
|
@ -325,6 +335,8 @@ class Crypto
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
*
|
*
|
||||||
* @param type $data
|
* @param type $data
|
||||||
* @param type $pubkey The public key.
|
* @param type $pubkey The public key.
|
||||||
|
@ -374,6 +386,8 @@ class Crypto
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $pubkey
|
* @param string $pubkey
|
||||||
|
@ -406,6 +420,8 @@ class Crypto
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $prvkey The private key used for decryption.
|
* @param string $prvkey The private key used for decryption.
|
||||||
|
@ -426,6 +442,8 @@ class Crypto
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
*
|
*
|
||||||
* @param string $data
|
* @param string $data
|
||||||
* @param string $prvkey The private key used for decryption.
|
* @param string $prvkey The private key used for decryption.
|
||||||
|
@ -451,6 +469,8 @@ class Crypto
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/include/crypto.php
|
||||||
*
|
*
|
||||||
* @param array $data
|
* @param array $data
|
||||||
* @param string $prvkey The private key used for decryption.
|
* @param string $prvkey The private key used for decryption.
|
||||||
|
|
|
@ -4,6 +4,9 @@
|
||||||
*/
|
*/
|
||||||
namespace Friendica\Util;
|
namespace Friendica\Util;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/Zotlabs/Web/HTTPHeaders.php
|
||||||
|
*/
|
||||||
class HTTPHeaders
|
class HTTPHeaders
|
||||||
{
|
{
|
||||||
private $in_progress = [];
|
private $in_progress = [];
|
||||||
|
|
|
@ -14,6 +14,8 @@ use dba;
|
||||||
/**
|
/**
|
||||||
* @brief Implements HTTP Signatures per draft-cavage-http-signatures-07.
|
* @brief Implements HTTP Signatures per draft-cavage-http-signatures-07.
|
||||||
*
|
*
|
||||||
|
* Ported from Hubzilla: https://framagit.org/hubzilla/core/blob/master/Zotlabs/Web/HTTPSig.php
|
||||||
|
*
|
||||||
* @see https://tools.ietf.org/html/draft-cavage-http-signatures-07
|
* @see https://tools.ietf.org/html/draft-cavage-http-signatures-07
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue