Download the PHP package serato/sso-auth-request without Composer
On this page you can find all versions of the php package serato/sso-auth-request. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download serato/sso-auth-request
More information about serato/sso-auth-request
Files in serato/sso-auth-request
Package sso-auth-request
Short Description Library for handling SSO authorisation requests
License
Homepage https://github.com/serato/sso-auth-request
Informations about the package sso-auth-request
SSO Auth Requests
A PHP library for handling web application authorisation requests to the Serato SSO service.
SSO authorisation request lifecycle
The SSO authorisation request lifecycle for a web application is as follows:
- The web application creates a new authorisation request using the
\Serato\SsoRequest\AuthRequest
class:- The web application provides a return URL that the SSO service will redirect to after the sign on process.
- A storage mechanism is provided to persist the authorisation request details during redirection to the SSO website.
- The new authorisation request returns an ID.
- The browser is redirected to the SSO website providing the authorisation request ID in the
state
URI parameter. - The browser is returned to the web application from the SSO service, with the SSO service providing back the
state
parameter as well as acode
parameter. - The web application creates an
\Serato\SsoRequest\AuthRequest
instance by providing the authorisation id passed via thestate
URI parameter. - The web application receives access and refresh tokens from the SSO service by using the
\Serato\SsoRequest\AuthRequest
instance and the value provided in thecode
URI parameter.
Storing authorisation requests during SSO redirection
A Serato\SsoRequest\AuthRequestStorageInterface
storage interface is defined for storing authorisation requests during SSO redirection.
A AuthRequestStorageInterface
implementation stores the application ID, request ID and redirect URL values used during the authorisation lifecyle, as well as timestamps and a means of indication that the authorisation process is complete.
The Serato\SsoRequest\AuthRequestDynamoDbStorage
class provides an implementation of Serato\SsoRequest\AuthRequestStorageInterface
using a DynamoDB table as the storage mechanism.
Using the \Serato\SsoRequest\AuthRequest
class in the request lifecycle
Note: All examples use Serato\SsoRequest\AuthRequestDynamoDbStorage
as the storage mechanism.
Create a new authorisation request (Step 1. above)
Create a AuthRequest
instance after returning to the web applicaton after sign on (Step 5. above), and use it to fetch refresh and access tokens from the SSO service (Step 6. above)
All versions of sso-auth-request with dependencies
aws/aws-sdk-php Version ^3.0
ramsey/uuid Version ^3.0.0
serato/sws-php-sdk Version ^4.0.0