<commit_before>[![Build Status](https://travis-ci.org/simplabs/ember-simple-auth.png)](https://travis-ci.org/simplabs/ember-simple-auth)

#  Ember.SimpleAuth

Ember.SimpleAuth is a lightweight and unobtrusive library for implementing
token based authentication with [Ember.js](http://emberjs.com) applications. It
has minimal requirements with respect to the application structure, routes etc.
as well as the server interface.

## Token Based Authentication

The general idea behind token based authentication for Ember.js applications is
that the server provides an endpoint that the client uses to authenticate users
with their credentials and that - given the credentials are valid - responds
with a secret token that the client then uses to identify the user in
subsequent requests.

The secret token is usually sent as a header. Ember.SimpleAuth uses the
`Authorization` header and automatically injects this header into all AJAX
requests.

## Usage

Ember.SimpleAuth only requires 2 routes and one template/controller. To enable
it it's best to use a custom initializer:

```js
Ember.Application.initializer({
  name: 'authentication',
  initialize: function(container, application) {<commit_msg>README improvements<commit_after>[![Build Status](https://travis-ci.org/simplabs/ember-simple-auth.png)](https://travis-ci.org/simplabs/ember-simple-auth)

#  Ember.SimpleAuth

Ember.SimpleAuth is a lightweight and unobtrusive library for implementing
token based authentication with [Ember.js](http://emberjs.com) applications. It
has minimal requirements with respect to the application structure, routes etc.
as well as the server interface.

## Token Based Authentication

The general idea behind token based authentication for Ember.js applications is
that the server provides an endpoint that the client uses to authenticate users
with their credentials and that - given the credentials are valid - responds
with a secret token that the client then uses to identify the user in
subsequent requests.

The secret token is usually sent in a header. Ember.SimpleAuth uses the
`Authorization` header and automatically injects that into all AJAX
requests. The server will see the something like this:

```
Authorization: Token token="<PASSWORD> token"
```

## Usage

Ember.SimpleAuth only requires 2 routes and one template/controller. To enable
it it's best to use a custom initializer:

```js
Ember.Application.initializer({
  name: 'authentication',
  initialize: function(container, application) {
{'fraction_non_alphanumeric': 0.06991610067918498, 'fraction_numerical': 0.0007990411506192569, 'mean_word_length': 5.167487684729064, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4056227', 'n_tokens_mistral': 648, 'n_tokens_neox': 626, 'n_words': 290}