1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-23 08:14:10 +00:00
pixelfed/app/Util/Webfinger/WebfingerUrl.php

19 lines
394 B
PHP
Raw Normal View History

2018-04-20 01:17:15 +00:00
<?php
namespace App\Util\Webfinger;
use App\Util\Lexer\Nickname;
2018-08-28 03:07:36 +00:00
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}";
2018-04-20 01:17:15 +00:00
2018-08-28 03:07:36 +00:00
return $path;
}
}