DeviseAuthorizer
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="user@domain.tld"
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
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.