Page MenuHomeWickedGov Phorge

ClaimStore.php
No OneTemporary

Size
1 KB
Referenced Files
None
Subscribers
None

ClaimStore.php

<?php
namespace MediaWiki\Extension\OAuth\Repository;
use League\OAuth2\Server\Entities\ClientEntityInterface;
use League\OAuth2\Server\Repositories\ClaimRepositoryInterface;
use LogicException;
use MediaWiki\Extension\OAuth\Entity\MWClientEntityInterface;
use MediaWiki\Extension\OAuth\HookRunner;
use MediaWiki\MediaWikiServices;
class ClaimStore implements ClaimRepositoryInterface {
/**
* @var HookRunner
*/
private $hookRunner;
public function __construct() {
$hookContainer = MediaWikiServices::getInstance()->getHookContainer();
$this->hookRunner = new HookRunner( $hookContainer );
}
/**
* @inheritDoc
*/
public function getClaims(
string $grantType, ClientEntityInterface $clientEntity, $userIdentifier = null
) {
if ( !( $clientEntity instanceof MWClientEntityInterface ) ) {
throw new LogicException( '$clientEntity must be instance of ' .
MWClientEntityInterface::class . ', got ' . get_class( $clientEntity ) . ' instead' );
}
$privateClaims = [];
$this->hookRunner->onOAuthClaimStoreGetClaims( $grantType, $clientEntity, $privateClaims );
return $privateClaims;
}
}

File Metadata

Mime Type
text/x-php
Expires
Sun, Oct 4, 00:12 (2 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
b2/39/fd15c15c8d91bf5f4c29d6f80078
Default Alt Text
ClaimStore.php (1 KB)

Event Timeline