Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
47 lines (31 sloc) 1.29 KB

Single sign-on

These methods will help you perform all necessary actions for implemeneting SSO within your application.

Configuration

To get started with SSO you'll first need to create a configuration file and store it safely on your server. Be sure to have your :doc:`public/private key pair </single_sign_on/enabling>` handy.

.. literalinclude:: /include/sdk_php_config.php
   :language: php
   :linenos:

Note that you can configure multiple environments such as dev, stage, prod to simplify your development process.

Creating a client

Once your configuration file is in place and stored safely on your server, you are ready to create a client instance. There are several invocations available to suit your development process.

.. literalinclude:: /include/sdk_php_create_client.php
   :language: php
   :linenos:

Refresh token

This method will create the HTTP response needed for a :doc:`refresh token endpoint </single_sign_on/refresh_token>`.

.. literalinclude:: /include/sdk_php_refresh_token.php
   :language: php
   :linenos:

Login URL

This method will generate a one-time use single sign-on login URL.

.. literalinclude:: /include/sdk_php_login_url.php
   :language: php
   :linenos: