【发布时间】:2014-07-18 14:38:53
【问题描述】:
我能够使用我自己的 customAuthenticator 成功进行身份验证。
我需要使用 customAuthenticator,因为身份验证后端服务器需要 请求标头具有 client_id 和 client_secret。
类似的东西。
headers: {
"Authorization": "Basic " + btoa(credentials.client_id + ":" +
credentials.client_secret) ,
"API-KEY": window.ENV.api_key
},
但是我看到 simple-auth-oauth2.js 文件中有几个实用程序函数 验证方法使用哪个。
方法如下: absolutizeExpirationTime(response.expires_in); scheduleAccessTokenRefresh(response.expires_in, expiresAt, response.refresh_token);
我的问题是如何从我的 customAuthenticator 调用 simple-auth-oauth2 中的这些方法。
我不想将这些方法复制到我的 customAuthenticator 文件中.....
【问题讨论】:
标签: ember.js ember-simple-auth