我正在尝试使用“隐式流”中生成的令牌获取 .Net Core 中 Azure AD 用户所属的组列表。没有组信息。
我正在使用以下链接中提到的“隐式流”: .NET Core 和 Azure Active Directory 集成
下面显示了如何在 .NET Framework 中执行此操作,但 .NET Core 没有“ActiveDirectoryClient”类。
任何帮助深表感谢!
德里克
我需要在我的项目中做以下几行(来自 https://github.com/devyumao/angular2-busy)
ngOnInit() {
this.busy = this.http.get('...').subscribe();
}
Run Code Online (Sandbox Code Playgroud)
在我的项目中,我根据路由更改发出请求,如下所示:
ngOnInit(): void {
this.activatedRoute
.params
.map(params => params['queryString'])
.flatMap(id => this.http.(''))
.subscribe(result => this.data = result);
}
Run Code Online (Sandbox Code Playgroud)
每次路线发生变化时,我似乎都需要创建一个新订阅。我不知道该怎么做。
我只在寻找 rxjs 解决方案(不使用 Promise)。
谢谢!
德里克
这是复制问题的程序。
将以下行添加到 RegisterRoutes() 方法中的“默认”路由之前
routes.MapRoute(
name: "Test",
url: "Test/{action}",
defaults: new { controller = "Test", action = "Index" }
);
Run Code Online (Sandbox Code Playgroud)将以下内容添加到 Index.cshtml 和 About.cshtml
@Html.RouteLink("link to TestController", "Test")
Run Code Online (Sandbox Code Playgroud)如您所见,生成的 html 代码对于 2 个页面是不同的。我希望 URL 是“/Test”,它为 Index.cshtml 正确呈现,但它成为 About.cshtml 的“/Test/About”。
我的问题是是否有任何记录的方法来生成相同的正确 URL。上面的例子只是为了演示目的而创建的。我想使用路由表信息来生成菜单。
这是在Windows 7下的最新QT IDE上运行的(boost.1.48)
class Employee {
public:
int Id;
...
bool operator==(const Employee& other) {
qDebug() << this->Id << ":" << "compare with " << other.Id;
return this->Id==other.Id;
}
}
Run Code Online (Sandbox Code Playgroud)
测试代码:
Employee jack1;
jack1 == jack1; // the operator== gets invoked.
shared_ptr<Employee> jack(new Employee);
jack == jack; // the operator== doesn't get invoked.
Run Code Online (Sandbox Code Playgroud)
boost头文件中的相关代码是:
template<class T, class U> inline bool operator==(shared_ptr<T> const & a, shared_ptr<U> const & b)
{
return a.get() == b.get();
}
Run Code Online (Sandbox Code Playgroud)
它似乎正在做指针比较,而不是做我期望的.
我做错了什么?
.net-core ×1
angular ×1
asp.net-mvc ×1
boost ×1
c++ ×1
javascript ×1
qt ×1
routelink ×1
rxjs ×1
shared-ptr ×1