No commit activity in last 3 years
No release in over 3 years
Ember-auth token strategy adapter source code wrapper for ruby libs.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

token strategy adapter for ember-auth

Build Status Gem Version NPM version

Token authentication for ember-auth.

Config

App.Auth = Em.Auth.reopen
  strategy: 'token'

  # [string] key for auth token, used in both server requests and
  #   response payloads
  tokenKey: null

  # [string|null] (opt) key for user id, used in both server requests and
  #   response payloads;
  #   null to indicate no user id;
  #   default: null
  tokenIdKey: null

  # [string] (opt) 'param', 'authHeader', or 'customHeader';
  #   default: 'param'
  #   - 'param': send the auth token via a key-value pair in params / data
  #       `(tokenKey)=(auth token)`
  #   - 'authHeader': send the auth token via an Authorization header
  #       `Authorization: (tokenHeaderKey) (auth token)`
  #   - 'customHeader': send the auth token via a custom header
  #       `(tokenHeaderKey): (auth token)`
  tokenLocation: 'param'

  # [string|null] (opt) used in complement when `tokenLocation` is
  #   'authHeader' or 'customHeader' - see doc for `tokenLocation`;
  #   default: null
  tokenHeaderKey: null

Usage

@auth.get 'authToken' # access the auth token

License

MIT