Skip to content

Commit 6682a01

Browse files
authored
Add Client Credentials Flow as Authentication Method (#330)
1 parent 1c9cad4 commit 6682a01

File tree

7 files changed

+979
-5
lines changed

7 files changed

+979
-5
lines changed

README.md

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,22 @@ Route::get('/callback', function()
115115

116116
With the Username Password flow, you can directly authenticate with the `Forrest::authenticate()` method.
117117

118-
> To use this authentication you must add your username, and password to the config file. Security token might need to be ammended to your password unless your IP address is whitelisted.
118+
> To use this authentication you must add your username, and password to the config file. Security token might need to be amended to your password unless your IP address is whitelisted.
119+
120+
```php
121+
Route::get('/authenticate', function()
122+
{
123+
Forrest::authenticate();
124+
return Redirect::to('/');
125+
});
126+
```
127+
128+
129+
#### Client Credentials authentication flow
130+
131+
With the Client Credentials flow, you can directly authenticate with the `Forrest::authenticate()` method.
132+
133+
> Using this authentication method only requires your consumer secret and key. Your Salesforce Connected app must also have the "Client Credentials Flow" Enabled in its settings.
119134
120135
```php
121136
Route::get('/authenticate', function()
@@ -135,7 +150,7 @@ Route::get('/authenticate', function()
135150
4. Update your config file with values for `loginURL`, `username`, and `password`.
136151
With the Username Password SOAP flow, you can directly authenticate with the `Forrest::authenticate()` method.
137152

138-
> To use this authentication you can add your username, and password to the config file. Security token might need to be ammended to your password unless your IP address is whitelisted.
153+
> To use this authentication you can add your username, and password to the config file. Security token might need to be amended to your password unless your IP address is whitelisted.
139154
140155
```php
141156
Route::get('/authenticate', function()
@@ -147,7 +162,7 @@ Route::get('/authenticate', function()
147162

148163
If your application requires logging in to salesforce as different users, you can alternatively pass in the login url, username, and password to the `Forrest::authenticateUser()` method.
149164

150-
> Security token might need to be ammended to your password unless your IP address is whitelisted.
165+
> Security token might need to be amended to your password unless your IP address is whitelisted.
151166
152167
```php
153168
Route::Post('/authenticate', function(Request $request)

0 commit comments

Comments
 (0)