Download the PHP package jeichorn/g-authify-php without Composer

On this page you can find all versions of the php package jeichorn/g-authify-php. 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 g-authify-php

GAuthify-PHP

Direct link to library.

This is the PHP API Client for GAuthify. The GAuthify REST api helps websites quickly add multi-factor authentication through Google Authenticator, SMS, and Email. This package is a simple wrapper around that api.

It has been forked by Joshua Eichorn @Pagely(https://pagely.com) to be namespaced and installable with composer

Installation

Install using composer

composer require jeichorn/g-authify-php

Include vendor/autoload.php, and use the class

include 'vendor/autoload.php';
use GAuthify\GAuthify;

To run a quick test to make sure everything works fine run:

include 'vendor/autoload.php';
use GAuthify\GAuthify;
$gauthify = new GAuthify(<api_key>);
$gauthify->quick_test(<test_email>(optional), <test_number>(optional));

Usage

Initiate:

First get an API key by signing up for an account here.

First instantiate a GAuthify object:

include 'vendor/autoload.php';
use GAuthify\GAuthify;
$auth_instance = new GAuthify(<api_key>);

Create User:

auth_instance->create_user(<unique_id>, <display_name>, <email> *optional, <sms_number> *optional, <voice_number> *optional)

The user hash returned will have parameters outlined on the GAuthify.com dashboard page. You can show the user the QR code to scan in their google authenticator applicatoin or you can link/iframe the instructions url.

Update User:

auth_instance->update_user(<unique_id>, <email> *optional, <sms_number> *optional, <voice_number> *optional, <reset_key> *optional)

Delete User:

auth_instance->delete_user(<unique_id>)

Get All Users:

auth_instance->get_all_users()

Get User:

auth_instance->get_user(<unique_id>)

Get User By Token:

auth_instance->get_user_by_token(<token>)

Check Auth Code:

auth_instance->check_auth(<unique_id>, <auth_code>, safe_mode = False)

Send Email:

auth_instance->send_email(<unique_id>, <email> *optional)

Send SMS:

auth_instance->send_sms(<unique_id>, <sms_number> *optional)

Send Voice:

auth_instance->send_voice(<unique_id>, <voice_number> *optional)

Errors

Up to-date json formatted errors can be grabbed from the server using:

auth_instance->api_errors()

They should rarely change and will be backward compatible.

The primary error class is GAuthifyError, it can be used as follows:

use GAuthify\GAuthifyError;

try{
    <code here>
}
catch (GAuthifyError $e){
    print(e->msg) # The error message
    print(e->http_status) # The http status code
    print(e->error_code) # A error code listed in the GAuthfiy application
    print(e->response_body) # The raw http response
}

The following errors extend GAuthifyError:


All versions of g-authify-php with dependencies

PHP Build Version
Package Version
No informations.
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 jeichorn/g-authify-php contains the following files

Loading the files please wait ....