惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

大猫的无限游戏
大猫的无限游戏
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
D
Docker
酷 壳 – CoolShell
酷 壳 – CoolShell
宝玉的分享
宝玉的分享
Martin Fowler
Martin Fowler
美团技术团队
量子位
M
MIT News - Artificial intelligence
Apple Machine Learning Research
Apple Machine Learning Research
阮一峰的网络日志
阮一峰的网络日志
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
腾讯CDC
Hugging Face - Blog
Hugging Face - Blog
博客园 - 【当耐特】
小众软件
小众软件
博客园 - 司徒正美
罗磊的独立博客
云风的 BLOG
云风的 BLOG
B
Blog RSS Feed
博客园 - 聂微东

Feed of "schmarty/gem-diamond"

issue when using indieauth[dot]com? gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond proxy for profile images gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond gem-diamond
gem-diamond
schmarty · 2025-05-29 · via Feed of "schmarty/gem-diamond"
@ -45,13 +45,15 @@ class Client extends IndieAuthClient {
$authorizationEndpoint = static::discoverAuthorizationEndpoint($url);
if((!$authorizationEndpoint) && (!$fallbackAuthorizationEndpoint)) {
// didn't find an auth endpoint and no fallback passed in. we're stuck.
return self::_errorResponse('missing_authorization_endpoint', 'Could not find your authorization endpoint');
if(!$authorizationEndpoint) {
if(!$fallbackAuthorizationEndpoint) {
// didn't find an auth endpoint and no fallback passed in. we're stuck.
return self::_errorResponse('missing_authorization_endpoint', 'Could not find your authorization endpoint');
} else {
$authorizationEndpoint = $fallbackAuthorizationEndpoint;
}
}
$authorizationEndpoint = $fallbackAuthorizationEndpoint;
$scopes = self::parseNonProfileScopes($scope);
if(count($scopes)) {
$tokenEndpoint = static::discoverTokenEndpoint($url);
@ -85,4 +87,29 @@ class Client extends IndieAuthClient {
return [$authorizationURL, false];
}
/**
* Wrapper to create an ErrorResponse and return the array
* (Duplicated from parent class b/c it's flagged there as private.)
* @return array
*/
private static function _errorResponse($error_code, $description, $debug = null)
{
self::_clearSessionData();
$error = new \IndieAuth\ErrorResponse($error_code, $description, $debug);
return $error->getArray();
}
/**
* Duplicated from parent class b/c it's flagged there as private.
*/
private static function _clearSessionData()
{
unset($_SESSION['indieauth_entered_url']);
unset($_SESSION['indieauth_state']);
unset($_SESSION['indieauth_code_verifier']);
unset($_SESSION['indieauth_authorization_endpoint']);
unset($_SESSION['indieauth_token_endpoint']);
unset($_SESSION['indieauth_issuer']);
}
}