forked from GNUsocial/gnu-social
use a real keypair from discovery
This commit is contained in:
parent
0afb09ad64
commit
855692141d
@ -50,7 +50,16 @@ class MagicEnvelope
|
|||||||
|
|
||||||
public function getKeyPair($signer_uri)
|
public function getKeyPair($signer_uri)
|
||||||
{
|
{
|
||||||
return 'RSA.79_L2gq-TD72Nsb5yGS0r9stLLpJZF5AHXyxzWmQmlqKl276LEJEs8CppcerLcR90MbYQUwt-SX9slx40Yq3vA==.AQAB.AR-jo5KMfSISmDAT2iMs2_vNFgWRjl5rbJVvA0SpGIEWyPdCGxlPtCbTexp8-0ZEIe8a4SyjatBECH5hxgMTpw==';
|
$disco = new Discovery();
|
||||||
|
|
||||||
|
$links = $disco->lookup($signer_uri);
|
||||||
|
if ($link = Discovery::getService($links, 'magic-public-key')) {
|
||||||
|
list($type, $keypair) = explode(';', $link['href']);
|
||||||
|
return $keypair;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw new Exception('Unable to locate signer public key');
|
||||||
|
//return 'RSA.79_L2gq-TD72Nsb5yGS0r9stLLpJZF5AHXyxzWmQmlqKl276LEJEs8CppcerLcR90MbYQUwt-SX9slx40Yq3vA==.AQAB.AR-jo5KMfSISmDAT2iMs2_vNFgWRjl5rbJVvA0SpGIEWyPdCGxlPtCbTexp8-0ZEIe8a4SyjatBECH5hxgMTpw==';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user