mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-27 00:33:17 +00:00
19 lines
382 B
PHP
19 lines
382 B
PHP
|
<?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;
|
||
|
}
|
||
|
|
||
|
}
|