1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-27 10:16:47 +00:00
pixelfed/app/Util/Webfinger/WebfingerUrl.php
2021-12-26 04:58:19 -07:00

18 lines
399 B
PHP

<?php
namespace App\Util\Webfinger;
use App\Util\Lexer\Nickname;
class WebfingerUrl
{
public static function generateWebfingerUrl($url)
{
$url = Nickname::normalizeProfileUrl($url);
$domain = $url['domain'];
$username = $url['username'];
$path = "https://{$domain}/.well-known/webfinger?resource=acct:{$username}@{$domain}";
return $path;
}
}