简体   繁体   English

灰烬简单身份验证基本URL

[英]Ember Simple Auth Base URL

I have an Ember app which is set up using Ember CLI - then a Rails app that provides the RESTful API for the Ember app (the Rails app is completely separate and runs on a different url). 我有一个使用Ember CLI设置的Ember应用程序-然后是一个为Ember应用程序提供RESTful API的Rails应用程序(Rails应用程序是完全独立的,并在不同的URL上运行)。 I'm trying to use Ember Simple Auth but I can't find a way to configure a different base url than the on used on the Ember app. 我正在尝试使用Ember Simple Auth,但找不到与Ember应用程序上使用的配置不同的基本url的方法。 Anyone know if this is possible? 有人知道这是否可能吗?

What are you trying to configure that base URL for? 您正在尝试为该基本URL配置什么? To make Ember.SimpleAuth authorize requests to a different origin you need to whitelist these origins (see http://ember-simple-auth.simplabs.com/ember-simple-auth-api-docs.html#Ember-SimpleAuth-setup ). 要使Ember.SimpleAuth将请求授权到其他来源,您需要将这些来源列入白名单(请参阅http://ember-simple-auth.simplabs.com/ember-simple-auth-api-docs.html#Ember-SimpleAuth-setup )。

To eg configure the Auth 2.0 authenticator or the devise authenticator to use a different endpoint then the default ones you'd reopen the classes (before running Ember.SimpleAuth.setup ): 例如,要将Auth 2.0身份验证器或设备身份验证器配置为使用其他端点,然后使用默认端点(在运行Ember.SimpleAuth.setup之前)重新打开这些类:

Ember.SimpleAuth.Authenticators.OAuth2.reopen({
  serverTokenEndpoint: 'http://some.other.server/token'
});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM