Imbo\Auth\AccessControl\Adapter\Mongo::addKeyPair PHP Method

addKeyPair() public method

public addKeyPair ( $publicKey, $privateKey )
    public function addKeyPair($publicKey, $privateKey)
    {
        try {
            $result = $this->getAclCollection()->insertOne(['publicKey' => $publicKey, 'privateKey' => $privateKey, 'acl' => []]);
            return (bool) $result->getInsertedCount();
        } catch (MongoException $e) {
            throw new DatabaseException('Could not insert key into database', 500, $e);
        }
    }