移除过时API

master
落雨楓 2 years ago
parent cb158d7398
commit 333819804d

@ -72,7 +72,10 @@ class IsekaiOIDCAuth extends AbstractPrimaryAuthenticationProvider {
global $wgIsekaiOIDC;
$config = $wgIsekaiOIDC;
$oidc =self::getOpenIDConnectClient();
$oidc = self::getOpenIDConnectClient();
$requestCtx = RequestContext::getMain();
if ($oidc->authenticate()) {
$accessToken = $oidc->getAccessToken();
$refreshToken = $oidc->getRefreshToken();
@ -88,7 +91,7 @@ class IsekaiOIDCAuth extends AbstractPrimaryAuthenticationProvider {
}
$authManager = MediaWikiServices::getInstance()->getAuthManager();
$request = RequestContext::getMain()->getRequest();
$request = $requestCtx->getRequest();
$session = $request->getSession();
$session->clear('AuthManager::AutoCreateBlacklist'); // 防止缓存检测
@ -251,7 +254,7 @@ class IsekaiOIDCAuth extends AbstractPrimaryAuthenticationProvider {
$oidc->setRedirectURL( $redirectURL );
wfDebugLog( self::LOG_TAG, 'Redirect URL: ' . $redirectURL );
if ( isset( $_REQUEST['forcelogin'] ) ) {
if ( isset( $_REQUEST['force'] ) || isset( $_REQUEST['forcelogin'] ) ) {
$oidc->addAuthParam( [ 'prompt' => 'login' ] );
}
if ( isset( $config['authparam'] ) &&

Loading…
Cancel
Save