PHPackages                             jojijacobk/access-sso-protected-data - 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. jojijacobk/access-sso-protected-data

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

jojijacobk/access-sso-protected-data
====================================

Read/Write data on single-sign-on protected pages with a single line of script.

v1.0.2(6y ago)17MITPHP

Since May 23Pushed 6y agoCompare

[ Source](https://github.com/jojijacobk/Access-SSO-Protected-Data)[ Packagist](https://packagist.org/packages/jojijacobk/access-sso-protected-data)[ RSS](/packages/jojijacobk-access-sso-protected-data/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (1)Versions (3)Used By (0)

Access single-sign-on protected URLs using configured credentials, and perform read/write operations.
-----------------------------------------------------------------------------------------------------

[](#access-single-sign-on-protected-urls-using-configured-credentials-and-perform-readwrite-operations)

If you are ever on a rush for an automated script to perform read/write operation on data residing behind single-sign-on protected URL, this module is for you. Just configure a working SSO username &amp; password into config.ini file - you are done!

- class *SingleSignOn* - tries to access the single-sign-on protected URL, and follows HTTP redirects to the authentication server, and pass through authentication server by posting credentials configured in config.ini file. After successful authentication, a cookie jar stores necessary cookies to perform subsequent visits to any URLs within the protected host.
- class *Data Streamer* - is used to perform read/write operations on protected server resources, after successfully signing into protected hosts with the help of *SignleSignOn* class.

### How To Install

[](#how-to-install)

Visit [packagist](https://packagist.org/packages/jojijacobk/access-sso-protected-data) for details.

1. Install the package via composer `composer require jojijacobk/access-sso-protected-data`
2. Make *config.ini* file in the root directory (where *composer.json* file resides). You can make the *config.ini* file either by copying it from `vendor/jojijacobk/access-sso-protected-data/config.ini`, or by the copying the *config.ini* sample as described below.

    `config.ini`

    ```
    ; single sign-on credentials
    [single_sign_on]
    username = hello@company.com
    password = xxxxx

    ```
3. Make a PHP file in the root directory (where \_composer.json &amp; *config.ini* resides), let's call it `demo.php` and write the following script to read data from single-sign-on protected page:

    `demo.php`

    ```
