2016-04-06 16 views
1

私はEmberには新しく、ember simple-auth-libraryとember simple-auth-tokenを使用したいと思います。私の問題は、認証者変数に何を入れるべきか理解できないことです。以下のコードは、githubのsimple-auth-token readmeから抜粋したものです。Emberシンプル認証トークン認証ツール

// app/controllers/login.js 
import Ember from 'ember'; 

export default Ember.Controller.extend({ 
    session: Ember.inject.service(), 

    actions: { 
     authenticate: function() { 
     var credentials = this.getProperties('identification', 'password'), 
     authenticator = 'authenticator:token'; 

     this.get('session').authenticate(authenticator, credentials); 
     } 
    } 
}); 

私のサーバーはかなりこのようになりますトークンで応答: { "auth_token": "f4f49eed1ddc43254c8a"}。

'authenticator:token'を 'authenticator:auth_token'に変更する必要がありますか?トークンの値はどのくらい正確にオーセンティケータに渡されますか?

ご協力いただきありがとうございます。

答えて