1
0
Fork 0
pixelfed/app/Util/Webfinger/WebfingerUrl.php

19 lines
382 B
PHP
Raw Normal View History

2018-04-20 01:17:15 +00:00
<?php
namespace App\Util\Webfinger;
use App\User;
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={$username}@{$domain}";
return $path;
}
}