Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ember.SimpleAuth

 Ember.SimpleAuth

Introduction to Ember.SimpleAuth, the lightweight library for implementing authentication/authorization in Ember.js applications.

Marco Otte-Witte

March 20, 2014
Tweet

More Decks by Marco Otte-Witte

Other Decks in Technology

Transcript

  1. Ember.SimpleAuth

    View full-size slide

  2. Marco Otte-Witte
    !
    http://simplabs.com

    View full-size slide

  3. Ember.SimpleAuth
    !
    http://ember-simple-auth.simplabs.com

    View full-size slide

  4. Authentication/Authorization
    library for Ember.js
    !
    https://github.com/simplabs/ember-simple-auth

    View full-size slide

  5. Authentication
    !
    verifies who the user is

    View full-size slide

  6. Authorization
    !
    verifies what the user is allowed
    to do

    View full-size slide

  7. what does Ember.SimpleAuth do?

    View full-size slide

  8. provides a (client-side) session

    View full-size slide

  9. authenticates and invalidates

    the session
    !
    via pluggable strategies

    View full-size slide

  10. enforces the session to be
    authenticated for defined routes

    View full-size slide

  11. synchronizes the session across
    tabs/windows, persists it

    View full-size slide

  12. injects authorization info

    into server requests
    !
    via pluggable strategies

    View full-size slide

  13. Demo
    !
    https://github.com/simplabs/ember-simple-
    auth/blob/master/examples/1-simple.html

    View full-size slide

  14. many authentication mechanisms
    per app, one authorization
    mechanism

    View full-size slide

  15. Default authenticator implements
    RFC 6749 (OAuth 2.0)

    View full-size slide

  16. „Resource Owner Password
    Credentials Grant Type“

    View full-size slide

  17. Default authorizer implements
    RFC 6750 (Bearer Tokens)

    View full-size slide

  18. Authorization: Bearer

    View full-size slide

  19. easy to implement custom
    authenticators/authorizers

    View full-size slide

  20. Demo
    !
    https://github.com/simplabs/ember-simple-
    auth/blob/master/examples/7-facebook-
    auth.html

    View full-size slide

  21. extraction of default
    authenticator/authorizer in own
    packages
    !
    https://github.com/simplabs/ember-simple-
    auth/tree/sub-packages

    View full-size slide

  22. Devise-compatible authenticator
    from @timothycommoner
    !
    https://github.com/simplabs/ember-simple-
    auth/pull/107

    View full-size slide

  23. provide your authenticators and
    authorizers!

    View full-size slide

  24. https://github.com/simplabs/ember-simple-
    auth#readme
    http://ember-simple-auth.simplabs.com/
    api.html

    View full-size slide

  25. all the examples are in the repo
    with instructions on how to run
    them

    View full-size slide