Download the PHP package microsec/passbyme2fa-client-php without Composer

On this page you can find all versions of the php package microsec/passbyme2fa-client-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 passbyme2fa-client-php

PassBy[ME] Mobile ID client

This library provides you with functionality to handle PassBy[ME] REST API methods.

For further information on PassBy[ME] please visit: www.passbyme.com and sign up for a free account.

Requirements

Installation

PassBy[ME]2FA client is available via Composer/Packagist.

In your composer.json:

From the Command Line:

Alternatively, copy the contents of the "PassByME" folder into somewhere that's in your PHP include_path settings or just click the 'zip' button at the top of the page in GitHub to download the archive.

Require passbyme2fa-client in your code

If you use composer just load the composer autoloader:

Without composer use the built in autoloader:

Get Started

You'll need a PassBy[ME] account, and a certificate to allow access to the PassBy[ME] API.

1. Login to Your Account

If you have not registered before register a new organisation or log in to your administration interface. Note that the registration process requires an Android, Windows Phone or iOS device with a PassBy[ME] application installed.

2. Download Certificates

Log in to your PassBy[ME] administration interface to download the required certificate files.

Download application certificate:

Create a new application by hitting the "New application" button under "Applications" menu. The created applications (along with its Application Id) will appear in a table view. Click on the "lock" icon to download your application certificate file in PEM format. This certificate is required to access API messaging functions.

Download organisation certificate:

Hit the "Key Details" button under "Account Settings" menu and download the organisation certificate in PEM format. This certificate is required to access API management functions.

The PEM file is protected with a passphrase, which is printed on the administration website. Note that you will need the passphrase when you set the certificate file.

In the configuration library section you can read how to setup the PEM file properly to communicate with the PassBy[ME] system. We suggest you to read the available Management API User Guides before you continue with the integration.

3. Configure the client

To start to communicate with the PassBy[ME] API first you have to configure the client. There is a Config.php class for that purpose. You can use directly that class to store your configuration or set your configuration settings in your own code like below.

The most important configuration settings you have to set properly are the following:

Other optional configuration parameters:

Logging as you like

By default, logging is disabled. You can enable logging by creating your own logger class, which implements the ILogger interface. The interface offers you the following log levels:

Example

Then you can simply add your logging class to the PassBy[ME] client like this:

Catching Errors

On failure the application throws a PBMErrorException.

Functions

The following section contains all the available functions description in details.

Messaging

PassBy[ME] can send three different type of message to registered users devices. These message types are the following:

authorizationMessage

generalMessage

eSignMessage

All three functions has the following parameters:

Parameter Mandatory Type Description
userIdentifier Required Array The PassBy[ME] identifiers of the users to send message to.
subject Required String The message title to sent to a PassBy[ME] ready device.
body Required String The message content to sent to a PassBy[ME] ready device.
availability Required Integer The length of the second factor authentication session in seconds. Default value is 300 seconds.

On success, a JSON object is returned, which contains various information about the ongoing process.

Example JSON object

All messaging responses contains a specific identifier called messageId.

Example messageId:

trackMessage

The function requires a messageId parameter. The messageId can be obtained by calling one of the three messaging methods mentioned above.

cancelMessage

This function cancels an existing authentication session, identified by the given messageId.

Management

PassBy[ME] administration methods are available through the Management class.

createUser

Creates a new PassBy[ME] user.

Parameter Mandatory Type Description
userId Required String The PassBy[ME] ID of a user.
email Required String Email address of the user.
fullName Optional String Full name of the user.
phoneNumber Optional String The phone number of the user.

getListOfUsers

Returns the list of PassBy[ME] users.

getUsersNumber

Get the number of users in the account.

getUser

Find the user with the given OID.

Parameter Mandatory Type Description
oid Required String The OID of the user.

deleteUser

Deletes the user with the given OID.

Parameter Mandatory Type Description
oid Required String The OID of the user to be deleted.

modifyUser

Modify the user with the given OID.

Parameter Mandatory Type Description
oid Required String The OID of the selected user.
modifiedUserObj Required Object A "UserData" object obtained from getUser function.

createEnrollment

Create a new enrollment for the given user.

Parameter Mandatory Type Description
oid Required String The OID of the user.

getListOfEnrollments

Returns the active enrollments of the given user.

Parameter Mandatory Type Description
oid Required String The OID of the user.

downloadEnrollmentPdf

Downloads the enrollment in pdf format.

Parameter Mandatory Type Description
oid Required String The OID of the user.
enrollmentId Required String The ID of the enrollment.

sendEnrollmentInEmail

Send the specified enrollment pdf document to the user via e-mail.

Parameter Mandatory Type Description
oid Required String The OID of the user.
enrollmentId Required String The ID of the enrollment.

deleteEnrollment

Deletes the enrollment specified by the enrollmentId of the user specified by the OID.

Parameter Mandatory Type Description
oid Required String The OID of the owner of the enrollment.
enrollmentId Required String The enrollmentId of the enrollment to be deleted.

createAlias

Adds a new userId (alias) for the specified PassBy[ME] user.

Parameter Mandatory Type Description
oid Required String The OID of the chosen user, who receives the alias.
alias Required String The PassBy[ME] ID of a user.

getListOfAliases

Returns the list of userIds (aliases) of the specified PassBy[ME] user.

Parameter Mandatory Type Description
oid Required String The OID of the user.

getUserByAlias

Find the user with the given userId.

Parameter Mandatory Type Description
userId Required String One of the aliases of the user.

deleteAlias

Deletes the specified userId (alias) of the specified PassBy[ME] user.

Parameter Mandatory Type Description
oid Required String The userId to be deleted.
userId Required String The oid of the PassBy[ME] user who owns the userId to be deleted.

getListOfAdministrators

Returns the list of administrators.

createInvitation

Create a new invitation. Finishing the invitation process a new administrator will be created.

getListOfInvitations

Returns the list of active invitations.

createAdminEnrollment

Create a new enrollment for the given administrator.

Parameter Mandatory Type Description
userId Required String The userId of the administrator.

getAdminEnrollments

Returns the active enrollments of the given administrator.

Parameter Mandatory Type Description
userId Required String The userId of the administrator.

downloadAdminEnrollmentPdf

Downloads the enrollment in pdf format.

Parameter Mandatory Type Description
userId Required String The userId of the administrator.
enrollmentId Required String The id of the enrollment.

sendAdminEnrollmentInEmail

Send the specified enrollment pdf document to the owner administrator via e-mail.

Parameter Mandatory Type Description
userId Required String The userId of the administrator.
enrollmentId Required String The id of the enrollment.

deleteAdminEnrollment

Deletes the enrollment specified by the enrollmentId of the administrator specified by the userId.

Parameter Mandatory Type Description
userId Required String The userId of the owner of the enrollment.
enrollmentId Required String The enrollmentId of the enrollment to be deleted.

createApplication

Creates a new Application registration.

Parameter Mandatory Type Description
name Required String Name of the application.

getListOfApplication

Returns the list of applications registered in the PassBy[ME] system.

getApplication

Find the application with the given application identifier.

Parameter Mandatory Type Description
appId Required String The id of the application in the PassBy[ME] system.

deleteApplication

Deletes the application from the PassBy[ME] system with the given application identifier.

Parameter Mandatory Type Description
appId Required String The application identifier of the application to be deleted.

modifyApplication

Modify the application with the given application identifier.

Parameter Mandatory Type Description
appId Required String The application identifier of the application to be modified.
name Required String The new name of the application.

getListOfUsersDevices

Returns all devices.

getUserDevices

Returns the devices of the given user.

Parameter Mandatory Type Description
oid Required String The OID of the user.

getListOfAdminDevices

Returns the devices of the given administrator.

Parameter Mandatory Type Description
adminId Required String The id of the administrator.

sendDeactivationPassword

Re-sends deactivation password via email.

Parameter Mandatory Type Description
vendorId Required String The vendorId of the device, which belongs to the deactivation password to resend.

deleteDevice

Delete user device.

Parameter Mandatory Type Description
deactivationPassword Required String The suspension password of the owner of the device.

getOrganization

Returns organization details.

updateOrganization

Updates organization details.

Parameter Mandatory Type Description
modifiedOrgObj Required String Mocked object from getOrganization function request.

getAccountLimitations

Get the current account limitations (pricing) of the organization.

activityLog

Returns list of second factor authentication log entries.

Parameter Mandatory Type Description
search Required String The value to be used for filtering records.
start Required Integer The number of records to skip from the result.
length Required Integer The maximum number of records to be returned.

License

The MIT License

Copyright (c) 2015 Microsec Ltd. [email protected]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


All versions of passbyme2fa-client-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.12
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 microsec/passbyme2fa-client-php contains the following files

Loading the files please wait ....