2017 © Pedro Peláez
 

library simple-authentication

A simple authentication using key and secret

image

ebidtech/simple-authentication

A simple authentication using key and secret

  • Friday, February 26, 2016
  • by ebidtech
  • Repository
  • 14 Watchers
  • 1 Stars
  • 97 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 11 Versions
  • 1 % Grown

The README.md

Simple Authentication

A simple authentication library using a key and secret., (*1)

Latest Stable Version Build Status Coverage Status Scrutinizer Quality Score Dependency Status, (*2)

Requirements

  • PHP >= 5.4

Installation

The recommended way to install is through composer., (*3)

Just create a composer.json file for your project:, (*4)

``` json { "require": { "ebidtech/simple-authentication": "@stable" } }, (*5)


**Tip:** browse [`ebidtech/simple-authentication`](https://packagist.org/packages/ebidtech/simple-authentication) page to choose a stable version to use, avoid the `@stable` meta constraint. And run these two commands to install it: ```bash $ curl -sS https://getcomposer.org/installer | php $ composer install

Now you can add the autoloader, and you will have access to the library:, (*6)

<?php

require 'vendor/autoload.php';

Usage

$credentials = new CredentialsConfig(
    array(
        new KeySecretConfig(new KeySecret('key1', 'secret1')),
        new KeySecretConfig(
            new KeySecret('key2', 'secret2'),
            true, // active
            false, // expired
            true // locked
        )
    )
);

// returns true because the credentials match and is active
$credentials->auth(new KeySecret('key1', 'secret1'));
// returns false, the secret doesn't match
$credentials->auth(new KeySecret('key1', 'wrong-secret'));
// returns false, because is locked
$credentials->auth(new KeySecret('key2', 'secret2'));
// will not throw exception
$credentials->authOrException(new KeySecret('key1', 'secret1'));

Contributing

See CONTRIBUTING file., (*7)

Credits

License

Compress library is released under the MIT License. See the bundled LICENSE file for details., (*8)

The Versions

26/02 2016

dev-master

9999999-dev http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

26/02 2016

v1.0.0

1.0.0.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

01/02 2014

v0.3

0.3.0.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

07/12 2013

v0.2.5

0.2.5.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

04/12 2013

v0.2.3

0.2.3.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

04/12 2013

v0.2.4

0.2.4.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

04/12 2013

v0.2.1

0.2.1.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

04/12 2013

v0.2.2

0.2.2.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

04/12 2013

v0.2

0.2.0.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

02/12 2013

v0.1.1

0.1.1.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret

02/12 2013

v0.1

0.1.0.0 http://github.com/ebidtech/simple-authentication

A simple authentication using key and secret

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar ebidtech

authentication php key secret