File tree Expand file tree Collapse file tree 3 files changed +9
-10
lines changed
Expand file tree Collapse file tree 3 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -75,13 +75,12 @@ in either case.
7575Alternatively, instead of the component you can also use the request instance to log out::
7676
7777 $return = $request->getAttribute('authentication')->clearIdentity($request, $response);
78- debug($return);
7978
80- The debug will show you an array like this::
79+ The result returned will contain an array like this::
8180
8281 [
8382 'response' => object(Cake\Http\Response) { ... },
84- 'request' => object(Cake\Http\ServerRequest) { ... }
83+ 'request' => object(Cake\Http\ServerRequest) { ... },
8584 ]
8685
8786.. note ::
Original file line number Diff line number Diff line change @@ -212,11 +212,11 @@ From the included authenticators only the FormAuthenticator will cause
212212the event to be fired. After that the session authenticator will provide
213213the identity.
214214
215- Url Checkers
215+ URL Checkers
216216============
217217
218218Some authenticators like ``Form `` or ``Cookie `` should be executed only
219- on certain pages like ``/login `` page. This can be achieved using Url
219+ on certain pages like ``/login `` page. This can be achieved using URL
220220Checkers.
221221
222222By default a ``DefaultUrlChecker `` is used, which uses string URLs for
@@ -229,7 +229,7 @@ Configuration options:
229229- **checkFullUrl **: Whether or not to check full URL. Useful when a
230230 login form is on a different subdomain. Default is ``false ``.
231231
232- A custom url checker can be implemented for example if a support for
232+ A custom URL checker can be implemented for example if a support for
233233framework specific URLs is needed. In this case the
234234``Authentication\UrlChecker\UrlCheckerInterface `` should
235235be implemented.
Original file line number Diff line number Diff line change @@ -206,11 +206,11 @@ accessible on the ``authentication`` attribute::
206206
207207 $result = $request->getAttribute('authentication')->getResult();
208208 // Boolean if the result is valid
209- debug($ result->isValid() );
209+ $isValid = $ result->isValid();
210210 // A status code
211- debug($ result->getStatus() );
211+ $statusCode = $ result->getStatus();
212212 // An array of error messages or data if the identifier provided any
213- debug($ result->getErrors() );
213+ $errors = $ result->getErrors();
214214
215215Any place you were calling ``AuthComponent::setUser() ``, you should now
216216use ``setIdentity() ``::
@@ -251,7 +251,7 @@ using the ``queryParam`` option::
251251
252252 $service = new AuthenticationService();
253253
254- // Configure unauthenticated redirect
254+ // Configure unauthenticated redirect
255255 $service->setConfig([
256256 'unauthenticatedRedirect' => '/users/login',
257257 'queryParam' => 'redirect',
You can’t perform that action at this time.
0 commit comments