mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 00:35:59 +00:00
18 lines
394 B
PHP
18 lines
394 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={$username}@{$domain}";
|
|
|
|
return $path;
|
|
}
|
|
}
|