From 504669f46a26017b634c693a3efc8c3052fbf913 Mon Sep 17 00:00:00 2001 From: Slations <79043482+Slations@users.noreply.github.com> Date: Tue, 22 Feb 2022 15:32:03 +0000 Subject: [PATCH] #11 Changes to docs to include auth_prefix --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 1087be5..be7918c 100644 --- a/README.md +++ b/README.md @@ -44,15 +44,18 @@ Personally I perfer to set the namespace when creating a new instance as I think There are currently four config options a user can set, these need to be set in the order below. Options with a start by the title are required the rest are optional. ``` -$directus = new Slations\DirectusSdk\Directus(option1*, option2, option3, option4); +$directus = new Slations\DirectusSdk\Directus(option1*, option2*, option3, option4, option5); ``` ### Option 1* | Set API URL You set the root URL to your directus installation, this field is required for the SDK to work. +### Option 2* | Set Auth Prefix -### Option 2 | Set Auth Storage +You set the auth prefix for your directus instance, this is so the SDK can differentiate between two instances running in parallel + +### Option 3 | Set Auth Storage The default is currently `_SESSION` but can be changed the the following options to fit the end users needs. @@ -61,12 +64,12 @@ The default is currently `_SESSION` but can be changed the the following options `_COOKIE` - This stores the three Auth variables in Cookies on the client-side but will still store and use PHP Session on the server-side due to limitations in PHP Cookie support. This can be useful if you need to retreve the access token from JS using cookies. -### Option 3 | Set Auth Domain +### Option 4 | Set Auth Domain This one is only used if option 2 has been set to `_COOKIE`. This sets the root auth domain of the cookie. By default it is `/` so it applies to the whole site but can be set to a folder if you only want the user to be authenticated in the subdirectory. -### Option 4 | Set Strip Headers +### Option 5 | Set Strip Headers This option is mainly for development which is why it has been put at the end but the request passed back to the user can contain the headers as well as the content in the array. The default value is `true` but can be set to `false` if you need access to the headers of the request.