import DeviseAuthorizer from 'ember-simple-auth/authorizers/devise';

Authorizer that works with the Ruby gem devise; includes the user's token and identification from the session data in the Authorization HTTP header, e.g.:

Authorization: token="234rtgjneroigne4" email="[email protected]"
          

As token authentication is not actually part of devise anymore, the server needs to implement some customizations to work with this authenticator - see this gist.

Methods

source public

authorize(data, block(headerName,headerContent))

Overrides: authorize of BaseAuthorizer.

Includes the user's token (see tokenAttributeName) and identification (see identificationAttributeName) in the Authorization header.

Arguments

data: Object

The data that the session currently holds

block(headerName,headerContent): Function

The callback to call with the authorization data; will receive the header name and header content as arguments

Properties

source public

identificationAttributeName: String

Default: 'email'

The identification attribute name.

source public

tokenAttributeName: String

Default: 'token'

The token attribute name.