2017 © Pedro Peláez
 

library clef-php

Clef PHP Library

image

clef/clef-php

Clef PHP Library

  • Wednesday, April 27, 2016
  • by jessepollak
  • Repository
  • 5 Watchers
  • 7 Stars
  • 1,117 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Clef PHP bindings

Latest Stable Version License, (*1)

A PHP wrapper for the Clef API. Authenticate a user and access their information in two lines of code., (*2)

You can sign up for a Clef account at https://getclef.com., (*3)

Requirements

PHP 5.3.3 and later., (*4)

Composer

You can install the bindings via Composer. Add this to your composer.json:, (*5)

{
  "require": {
    "clef/clef-php": "1.*"
  }
}

Then install via:, (*6)

composer install

To use the bindings, use Composer's autoload:, (*7)

require_once('vendor/autoload.php');

Manual Installation

If you do not wish to use Composer, you can download the latest release. Then, to use the bindings, include the init.php file., (*8)

require_once('/path/to/clef-php/init.php');

Usage

Logging in a user

When a user logs in with Clef, the browser will redirect to your data-redirect-url. To retrieve user information, call get_login_information in that endpoint:, (*9)

\Clef\Clef::initialize(APP_ID, APP_SECRET);
$response = \Clef\Clef::get_login_information($_GET["code"]);

For what to do after getting user information, check out our documentation on Associating users., (*10)

Logging out a user

When you configure your Clef integration, you can also set up a logout hook URL. Clef sends a POST to this URL whenever a user logs out with Clef, so you can log them out on your website too., (*11)

\Clef\Clef::initialize(APP_ID, APP_SECRET);
$clef_id = \Clef\Clef::get_logout_information($_POST["logout_token"]);

For what to do after getting a user who's logging out's clef_id, see our documentation on Database logout., (*12)

Sample App

If you'd like to see an example of this library in action, check out the Clef PHP sample application here., (*13)

Resources

Check out the API docs.
Access your developer dashboard., (*14)

The Versions

27/04 2016

dev-distributed-validation

dev-distributed-validation https://getclef.com.com/

Clef PHP Library

  Sources   Download

MIT

The Requires

 

The Development Requires

api clef two factor

01/04 2016

dev-custom-actions

dev-custom-actions https://getclef.com.com/

Clef PHP Library

  Sources   Download

MIT

The Requires

 

The Development Requires

api clef two factor

11/03 2016

dev-feature/add-reactivation-for-distributed-authentication

dev-feature/add-reactivation-for-distributed-authentication https://getclef.com.com/

Clef PHP Library

  Sources   Download

MIT

The Requires

 

The Development Requires

api clef two factor

09/03 2016

dev-feature/add-editorconfig

dev-feature/add-editorconfig https://getclef.com.com/

Clef PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api clef two factor

15/07 2015

dev-master

9999999-dev https://getclef.com.com/

Clef PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api clef two factor

15/07 2015

v1.0.1

1.0.1.0 https://getclef.com.com/

Clef PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api clef two factor

15/07 2015

v1.0.0

1.0.0.0 https://getclef.com.com/

Clef PHP Library

  Sources   Download

MIT

The Requires

  • php >=5.3.3

 

The Development Requires

api clef two factor