PHPackages                             researchpanelasia/sopx-auth-v1\_1 - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. researchpanelasia/sopx-auth-v1\_1

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

researchpanelasia/sopx-auth-v1\_1
=================================

SOP v1.1 authentication

1.0.0(10y ago)13.5k↓100%MITPHPPHP &gt;=5.5.0

Since Oct 16Pushed 10y ago25 watchersCompare

[ Source](https://github.com/researchpanelasia/php-sopx-auth-v1_1)[ Packagist](https://packagist.org/packages/researchpanelasia/sopx-auth-v1_1)[ Docs](https://github.com/researchpanelasia/php-sopx-auth-v1_1)[ RSS](/packages/researchpanelasia-sopx-auth-v1-1/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (11)Used By (0)

[![Build Status](https://camo.githubusercontent.com/cff938a8261704a58d232a64de800085bff840f1b66f50a91210b27a8acfa79a/68747470733a2f2f7472617669732d63692e6f72672f726573656172636870616e656c617369612f7068702d736f70782d617574682d76315f312e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/researchpanelasia/php-sopx-auth-v1_1)

NAME
====

[](#name)

SOPx\_Auth\_V1\_1 - SOP v1.1 authentication module

SYNOPSIS
========

[](#synopsis)

```
$auth = new \SOPx\Auth\V1_1\Client('', '');

$request = $auth->createRequest(
  'GET', 'https:///path/to/endpoint',
  array('app_id' => '', 'app_mid' => '', ... )
);
//=> isa GuzzleHttp\Psr7\Request object
```

OR

```
$sig = \SOPx\Auth\V1_1\Util::createSignature(
  array(
    'app_id' => '',
    'app_mid' => '',
    'time' => $time,
    ...
  ), ''
);
//=> HMAC SHA256 hash signature
```

DESCRIPTION
===========

[](#description)

This module enables you to generate SOP v1.1 signature, make HTTP request to SOP v1.1 API.

HOW TO USE
==========

[](#how-to-use)

Making a valid request to SOP API endpoint
------------------------------------------

[](#making-a-valid-request-to-sop-api-endpoint)

```
  $auth = new \SOPx\Auth\V1_1\Client('', '');

  $request = $auth->createRequest(
    'GET',
    'https:///path/to/endpoint',
    array(
      'param1' => 'foo',
      'param2' => 'bar',
      ...
    )
  );

  // Then use Guzzle HTTP client to send request
```

Creating a valid URL (e.g., for JSONP request)
----------------------------------------------

[](#creating-a-valid-url-eg-for-jsonp-request)

```
  $auth = new \SOPx\Auth\V1_1\Client('', '');

  $request = $auth->createRequest(
    'GET',
    'https:///path/to/jsonp/endpoint',
    array(
      'param1' => 'foo',
      'param2' => 'bar',
      ...
    )
  );

  // Then maybe in your HTML template:
