PHP Classes

File: src/Chronicle/Middleware/CheckAdminSignature.php

Recommend this page to a friend!
  Classes of Scott Arciszewski   Chronicle   src/Chronicle/Middleware/CheckAdminSignature.php   Download  
File: src/Chronicle/Middleware/CheckAdminSignature.php
Role: Class source
Content type: text/plain
Description: Class source
Class: Chronicle
Append arbitrary data to a storage container
Author: By
Last change: Boyscouting. Update easydb to 2.7 to eliminate boolean workaround.
Docblock consistency, fix composer internal server
Type safety
Date: 1 year ago
Size: 765 bytes
 

Contents

Class file image Download
<?php
declare(strict_types=1);
namespace
ParagonIE\Chronicle\Middleware;

use
ParagonIE\Chronicle\Chronicle;
use
ParagonIE\Chronicle\Exception\ClientNotFound;
use
ParagonIE\Sapient\CryptographyKeys\SigningPublicKey;

/**
 * Class CheckAdminSignature
 * @package ParagonIE\Chronicle\Middleware
 */
class CheckAdminSignature extends CheckClientSignature
{
    const
PROPERTIES_TO_SET = ['authenticated', 'administrator'];

   
/**
     * Only selects a valid result if the client has isAdmin set to TRUE.
     *
     * @param string $clientId
     * @return SigningPublicKey
     *
     * @throws ClientNotFound
     */
   
public function getPublicKey(string $clientId): SigningPublicKey
   
{
        return
Chronicle::getClientsPublicKey($clientId, true);
    }
}