Download the PHP package onramplab/laravel-security-model without Composer

On this page you can find all versions of the php package onramplab/laravel-security-model. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-security-model

laravel-security-model

CircleCI Total Downloads

A Laravel package providing security for Eloquent model

Requirements

Features

Installation

Install the package via composer

Publish migration files and run command to build tables needed in package

Also, you can choose to publish the configuration file

Usage

Encryption

  1. Set up credentials for key provider you want to use for encryption
  2. Run command to generate a encryption key and a hash key

  3. Use the Securable trait in a model
  4. Implement the Securable interface in a model
  5. Set up $encryptable attribute in a model to define encryptable fields. You can check out the section below for more info about field parameters

Encryptable Field Parameters

Searchable Encrypted Field

To achieve searching on encrypted fields, we use a strategy called blind indexing. Its idea is to store a hash value of the plaintext in a separate column and would it will be used for searching.

That means if you define a encryptable field to be searchable, you should postfix the original column name with _bidx to create a new column. For example, if you define a email column to be searchable, then you need to create a email_bidx column in your table.

Conditional Encryption

Sometimes you may need to determinate whether a model should be encrypted under certain conditions. To accomplish this, you may define a shouldBeEncryptable method on your model:

Redaction

  1. Use the Securable trait in a model
  2. Implement the Securable interface in a model
  3. Set up $redactable attribute in a model to define redactable fields with redactor classes you want to apply for each fields

There are some built-in redactors available for different kinds of model field:

Custom Redactor

Besides those built-in redactors mentioned above, you may wish to specify ones with custom logic. Thus, you are free to create your own redactor class. Just simply implement the class with Redactor interface, then use it in your securable model.

Running Tests

Changelog

To keep track, please refer to CHANGELOG.md.

Contributing

  1. Fork it.
  2. Create your feature branch (git checkout -b my-new-feature).
  3. Make your changes.
  4. Run the tests, adding new ones for your own code if necessary (phpunit).
  5. Commit your changes (git commit -am 'Added some feature').
  6. Push to the branch (git push origin my-new-feature).
  7. Create new pull request.

Also please refer to CONTRIBUTION.md.

License

Please refer to LICENSE.


All versions of laravel-security-model with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
aws/aws-sdk-php Version ^3.258
illuminate/database Version ^8.0|^9.0
paragonie/ciphersweet Version ^3.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package onramplab/laravel-security-model contains the following files

Loading the files please wait ....