Download the PHP package asaritech/ukey1-php-sdk without Composer

On this page you can find all versions of the php package asaritech/ukey1-php-sdk. 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 ukey1-php-sdk

Ukey1 SDK for PHP

This repository contains the open source PHP SDK that allows you to access the Ukey1 API from your PHP app.

!!! Please note that versions older than 3.0.0 are deprecated and don't work since November 15, 2017 !!!

About Ukey1

Ukey1 is an Authentication and Data Protection Service with the mission to enhance security of websites. The service is designed to help you with EU GDPR compliance.

Ukey1 flow for this PHP SDK

  1. User clicks to "sign-in" button
  2. SDK sends a connection request to our API and gets a unique Gateway URL
  3. User is redirected to Ukey1 Gateway
  4. User signs in using their favourite solution and authorizes your app
  5. User is redirected back to predefined URL
  6. SDK checks the result and gets a unique access token
  7. That's it - user is authenticated (your app can make API calls to get user's data)

API specification

Requirements

Installation

The Ukey1 PHP SDK can be installed with Composer (recommended option). Run this command:

Usage

First, you need credentials (App ID and Secret Key). In our dashboard, we also recommend to activate as many protections as possible.

Sign-in / sign-up / log-in - all buttons in one

Your app may look like this (of course, it's optional):

Connection request

Your script login.php makes a request to our endpoint /auth/v2/connect.

Requests for access token and user details

Once the user authorizes your app, Ukey1 redirects the user back to your app to the URL you specified earlier. The same is done if user cancels the request.

URL will look like this: http://example.org/login.php?action=check&user=XXX&_ukey1[request_id]={REQUEST_ID}&_ukey1[connect_id]={CONNECT_ID}&_ukey1[code]={CODE}&_ukey1[result]={RESULT}&_ukey1[signature]={SIGNATURE}#fragment where REQUEST_ID is a previously used $requestId, CONNECT_ID is a previously used $connectId, CODE is a one-time code for getting the access token RESULT may be authorized or canceled and SIGNATURE is a security signature.

Premium features

Private users

This feature also known as Extranet users (must be enabled in Ukey1 dashboard) is useful when you want to implement Ukey1 into your private app where only predefined users can access (typically employees within company extranet).

The flow is similar. First, in your private app you need to have a simple user management. No password needed, only roles (if applicable), our User ID (that you will get at the end of the flow as usually) and Extranet Reference ID. This Reference ID serves for user deletion in the further future.

In your own user management, when you create a new user, you also have to make a POST request to our endpoint /auth/v2/extranet/users.

For install purposes (it means when no user is in your user management database), the owner of the app in Ukey1 dashboard is automatically authorized to log in to your app. Just log in like in case of a public app.

Please note that each environment is separate for this feature, so when you add new user on test environment, you have to add them again for production environment (and vice versa) if you need so.

Example

Would you like a working example? You can download and try ukey1-php-sdk-example.

License

This code is released under the MIT license. Please see LICENSE file for details.

Contributing

If you want to become a contributor of this PHP SDK, please first contact us (see our email below). Please note we follow [PSR-2]. If you would like to work on another SDK (in your favorite language), we will glad to know about you too!

Contact

Reporting of any issues are appreciated. If you want to contribute or you have found a critical bug, please write us directly to [email protected].


All versions of ukey1-php-sdk with dependencies

PHP Build Version
Package Version
Requires php Version ^5.5|^7.0
guzzlehttp/guzzle Version ~6.0
lcobucci/jwt Version ^3.2
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 asaritech/ukey1-php-sdk contains the following files

Loading the files please wait ....