Skip to content

Commit 3800fe1

Browse files
Merge pull request #2834 from peter-scholtens/patch-2
Verified and updated links to ember-simple-auth.com/api/
2 parents 5bdcd8f + c5d8716 commit 3800fe1

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

README.md

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ Once the library is installed, __the session service can be injected wherever
132132
needed in the application__. In order to display login/logout buttons depending
133133
on the current session state, inject the service into the respective controller
134134
or component and __query its
135-
[`isAuthenticated` property](http://ember-simple-auth.com/api/classes/SessionService.html#property_isAuthenticated)
135+
[`isAuthenticated` property](http://ember-simple-auth.com/api/SessionService.html#property_isAuthenticated)
136136
in the template__:
137137

138138
```js
@@ -163,7 +163,7 @@ export default class ApplicationController extends Controller {
163163
```
164164

165165
In the `invalidateSession` action __call the
166-
[session service's `invalidate` method](http://ember-simple-auth.com/api/classes/SessionService.html#method_invalidate)
166+
[session service's `invalidate` method](http://ember-simple-auth.com/api/SessionService.html#method_invalidate)
167167
to invalidate the session__ and log the user out:
168168

169169
```js
@@ -185,7 +185,7 @@ export default class ApplicationController extends Controller {
185185
```
186186

187187
For authenticating the session, __the session service provides the
188-
[`authenticate` method](http://ember-simple-auth.com/api/classes/SessionService.html#method_authenticate)__
188+
[`authenticate` method](http://ember-simple-auth.com/api/SessionService.html#method_authenticate)__
189189
that takes the name of the authenticator to use as well as other arguments
190190
depending on specific authenticator used. __To define an authenticator, add a
191191
new file in `app/authenticators`__ and extend one of the authenticators the
@@ -215,7 +215,7 @@ With that authenticator and a login form like
215215
```
216216

217217
the __session can be authenticated with the
218-
[session service's `authenticate` method](http://ember-simple-auth.com/api/classes/SessionService.html#method_authenticate)__:
218+
[session service's `authenticate` method](http://ember-simple-auth.com/api/SessionService.html#method_authenticate)__:
219219

220220
```js
221221
// app/controllers/login.js
@@ -257,7 +257,7 @@ export default class LoginController extends Controller {
257257

258258
__To make a route in the application accessible only when the session is
259259
authenticated__, call the session service's
260-
[`requireAuthentication`](http://ember-simple-auth.com/api/classes/SessionService.html#method_requireAuthentication)
260+
[`requireAuthentication`](http://ember-simple-auth.com/api/SessionService.html#method_requireAuthentication)
261261
method in the respective route's `beforeModel` method:
262262

263263
```js
@@ -301,7 +301,7 @@ Router.map(function() {
301301
To prevent a route from being accessed when the session is authenticated (which
302302
makes sense for login and registration routes for example), call the session
303303
service's
304-
[`prohibitAuthentication`](http://ember-simple-auth.com/api/classes/SessionService.html#method_prohibitAuthentication)
304+
[`prohibitAuthentication`](http://ember-simple-auth.com/api/SessionService.html#method_prohibitAuthentication)
305305
method in the respective route's `beforeModel` method:
306306

307307
```js
@@ -319,9 +319,9 @@ export default class LoginRoute extends Route {
319319
```
320320

321321
__The session service also provides the
322-
[`handleAuthentication`](http://ember-simple-auth.com/api/classes/SessionService.html#method_handleAuthentication)
322+
[`handleAuthentication`](http://ember-simple-auth.com/api/SessionService.html#method_handleAuthentication)
323323
and
324-
[`handleInvalidation`](http://ember-simple-auth.com/api/classes/SessionService.html#method_handleInvalidation)
324+
[`handleInvalidation`](http://ember-simple-auth.com/api/SessionService.html#method_handleInvalidation)
325325
methods__ for handling authentication and invalidation of the session (which
326326
not only happens when the user submits the login form or clicks the logout
327327
button but also when the session is authenticated or invalidated in another tab
@@ -365,9 +365,9 @@ The session service is the main interface to the library. It defines the
365365
events as shown above.
366366

367367
It also provides the
368-
__[`isAuthenticated`](http://ember-simple-auth.com/api/classes/SessionService.html#property_isAuthenticated)
368+
__[`isAuthenticated`](http://ember-simple-auth.com/api/SessionService.html#property_isAuthenticated)
369369
as well as the
370-
[`data`]((http://ember-simple-auth.com/api/classes/SessionService.html#property_data))
370+
[`data`]((http://ember-simple-auth.com/api/SessionService.html#data))
371371
properties. The latter can be used to get and set the session data__. While the
372372
special `authenticated` section in the session data contains the data that was
373373
acquired by the authenticator when it authenticated the session and is
@@ -396,10 +396,10 @@ this.session.authenticate('authenticator:some');
396396

397397
Ember Simple Auth comes with 4 authenticators:
398398

399-
* [`OAuth2PasswordGrantAuthenticator`](http://ember-simple-auth.com/api/classes/OAuth2PasswordGrantAuthenticator.html): an OAuth 2.0 authenticator that implements the _"Resource Owner Password Credentials Grant Type"_
400-
* [`OAuth2ImplicitGrantAuthenticator`](http://ember-simple-auth.com/api/classes/OAuth2ImplicitGrantAuthenticator.html): an OAuth 2.0 authenticator that implements the _"Implicit Grant Type"_
401-
* [`DeviseAuthenticator`](http://ember-simple-auth.com/api/classes/DeviseAuthenticator.html): an authenticator compatible with the popular Ruby on Rails authentication plugin [devise](https://github.com/plataformatec/devise)
402-
* [`ToriiAuthenticator`](http://ember-simple-auth.com/api/classes/ToriiAuthenticator.html): an authenticator that wraps the [torii library](https://github.com/Vestorly/torii)
399+
* [`OAuth2PasswordGrantAuthenticator`](http://ember-simple-auth.com/api/OAuth2PasswordGrantAuthenticator.html): an OAuth 2.0 authenticator that implements the _"Resource Owner Password Credentials Grant Type"_
400+
* [`OAuth2ImplicitGrantAuthenticator`](https://ember-simple-auth.com/api/module-ember-simple-auth_authenticators_oauth2-implicit-grant-OAuth2ImplicitGrantAuthenticator.html): an OAuth 2.0 authenticator that implements the _"Implicit Grant Type"_
401+
* [`DeviseAuthenticator`](http://ember-simple-auth.com/api/DeviseAuthenticator.html): an authenticator compatible with the popular Ruby on Rails authentication plugin [devise](https://github.com/plataformatec/devise)
402+
* [`ToriiAuthenticator`](http://ember-simple-auth.com/api/ToriiAuthenticator.html): an authenticator that wraps the [torii library](https://github.com/Vestorly/torii)
403403

404404
To use any of these authenticators in an application, define a new
405405
authenticator in `app/authenticators`, extend if from the Ember Simple Auth
@@ -437,12 +437,12 @@ export default class OAuth2Authenticator extends OAuth2PasswordGrantAuthenticato
437437

438438
Besides extending one of the predefined authenticators, an application can also
439439
implement fully custom authenticators. In order to do that, extend the
440-
[abstract base authenticator](http://ember-simple-auth.com/api/classes/BaseAuthenticator.html)
440+
[abstract base authenticator](http://ember-simple-auth.com/api/BaseAuthenticator.html)
441441
that Ember Simple Auth comes with and override the
442-
[`authenticate`](http://ember-simple-auth.com/api/classes/BaseAuthenticator.html#method_authenticate),
443-
[`restore`](http://ember-simple-auth.com/api/classes/BaseAuthenticator.html#method_restore)
442+
[`authenticate`](http://ember-simple-auth.com/api/BaseAuthenticator.html#method_authenticate),
443+
[`restore`](http://ember-simple-auth.com/api/BaseAuthenticator.html#method_restore)
444444
and (optionally)
445-
[`invalidate`](http://ember-simple-auth.com/api/classes/BaseAuthenticator.html#method_invalidate)
445+
[`invalidate`](http://ember-simple-auth.com/api/BaseAuthenticator.html#method_invalidate)
446446
methods:
447447

448448
```js
@@ -489,35 +489,35 @@ Ember Simple Auth comes with 4 stores:
489489

490490
#### Adaptive Store
491491

492-
[The adaptive store](http://ember-simple-auth.com/api/classes/AdaptiveStore.html)
492+
[The adaptive store](http://ember-simple-auth.com/api/AdaptiveStore.html)
493493
stores its data in the browser's `localStorage` if that is available or in a
494494
cookie if it is not; __this is the default store__.
495495

496496
#### `localStorage` Store
497497

498-
[The `localStorage` store](http://ember-simple-auth.com/api/classes/LocalStorageStore.html)
498+
[The `localStorage` store](http://ember-simple-auth.com/api/LocalStorageStore.html)
499499
stores its data in the browser's `localStorage`. This is used by the adaptive
500500
store if `localStorage` is available.
501501

502502
#### Cookie Store
503503

504-
[The Cookie store](http://ember-simple-auth.com/api/classes/CookieStore.html)
504+
[The Cookie store](http://ember-simple-auth.com/api/CookieStore.html)
505505
stores its data in a cookie. This is used by the adaptive store if
506506
`localStorage` is not available. __This store must be used when the
507507
application uses
508508
[FastBoot](https://github.com/ember-fastboot/ember-cli-fastboot).__
509509

510510
#### `sessionStorage` Store
511511

512-
[The `sessionStorage` store](http://ember-simple-auth.com/api/classes/SessionStorageStore.html)
512+
[The `sessionStorage` store](http://ember-simple-auth.com/api/SessionStorageStore.html)
513513
stores its data in the browser's `sessionStorage`. See [the Web Storage docs](
514514
https://developer.mozilla.org/en-US/docs/Web/API/Web_Storage_API) for details on
515515
`sessionStorage` and `localStorage`. [caniuse](http://caniuse.com/#feat=namevalue-storage)
516516
has up-to-date information on browser support of `sessionStorage` and `localStorage`.
517517

518518
#### Ephemeral Store
519519

520-
[The ephemeral store](http://ember-simple-auth.com/api/classes/EphemeralStore.html)
520+
[The ephemeral store](http://ember-simple-auth.com/api/EphemeralStore.html)
521521
stores its data in memory and thus __is not actually persistent. This store is
522522
mainly useful for testing.__ Also the ephemeral store cannot keep multiple tabs
523523
or windows in sync as tabs/windows cannot share memory.
@@ -540,12 +540,12 @@ export default class ApplicationSessionStore extends AdaptiveStore {
540540

541541
Besides using one of the predefined session stores, an application can also
542542
implement fully custom stores. In order to do that, extend the
543-
[abstract base session store](http://ember-simple-auth.com/api/classes/BaseStore.html)
543+
[abstract base session store](http://ember-simple-auth.com/api/BaseStore.html)
544544
that Ember Simple Auth comes with and implement the
545-
[`persist`](http://ember-simple-auth.com/api/classes/BaseStore.html#method_persist),
546-
[`restore`](http://ember-simple-auth.com/api/classes/BaseStore.html#method_restore)
545+
[`persist`](http://ember-simple-auth.com/api/BaseStore.html#.persist),
546+
[`restore`](http://ember-simple-auth.com/api/BaseStore.html#.restore)
547547
and
548-
[`clear`](http://ember-simple-auth.com/api/classes/BaseStore.html#method_clear)
548+
[`clear`](http://ember-simple-auth.com/api/BaseStore.html#.clear)
549549
methods:
550550

551551
```js
@@ -577,9 +577,9 @@ export default class ApplicationSessionStore extends CookieStore {}
577577
```
578578

579579
If you are using the
580-
[`OAuth2PasswordGrantAuthenticator`](http://ember-simple-auth.com/api/classes/OAuth2PasswordGrantAuthenticator.html),
580+
[`OAuth2PasswordGrantAuthenticator`](http://ember-simple-auth.com/api/OAuth2PasswordGrantAuthenticator.html),
581581
or
582-
[`DeviseAuthenticator`](http://ember-simple-auth.com/api/classes/DeviseAuthenticator.html),
582+
[`DeviseAuthenticator`](http://ember-simple-auth.com/api/DeviseAuthenticator.html),
583583
you must add `node-fetch` to your list of FastBoot whitelisted dependencies
584584
in `package.json`:
585585

0 commit comments

Comments
 (0)