小编Mar*_*rek的帖子

"验证消息的安全性时发生错误"对ADFS进行身份验证时出现异常

正如我在另一个问题中所描述的,我构建了一个Web服务,该服务将使用用户名/密码并基于这些凭据在ADFS2中对用户(移动应用程序)进行身份验证.我的Web服务在ADFS上配置为RP.ADFS发布SAML 2.0令牌.

这是web方法的代码:

public class MobileAuthService : IMobileAuthService
{
    private const string adfsBaseAddress = @"https://<my_adfs_hostname>/adfs/services/";
    private const string endpointSuffix = @"trust/13/issuedtokenmixedsymmetricbasic256";

    public string AuthenticateUser(string username, string password)
    {
        var binding = new WS2007HttpBinding(SecurityMode.Message);
        binding.Security.Message.EstablishSecurityContext = false;
        binding.Security.Transport.ClientCredentialType = HttpClientCredentialType.None;
        binding.Security.Message.ClientCredentialType = MessageCredentialType.UserName;
        binding.Security.Mode = SecurityMode.TransportWithMessageCredential;

        var trustChannelFactory = new WSTrustChannelFactory(binding, new EndpointAddress(adfsBaseAddress + endpointSuffix))
                                        {
                                            TrustVersion = TrustVersion.WSTrust13
                                        };
        trustChannelFactory.Credentials.UserName.UserName = username;
        trustChannelFactory.Credentials.UserName.Password = password;

        var tokenClient = (WSTrustChannel)trustChannelFactory.CreateChannel();

        var rst = new RequestSecurityToken(RequestTypes.Issue, KeyTypes.Symmetric);
        var token = …
Run Code Online (Sandbox Code Playgroud)

c# wif adfs2.0 saml-2.0

4
推荐指数
1
解决办法
7813
查看次数

Jekyll 不会从根文件夹为 Markdown 页面生成 html

我已经开始使用 Jekyll 将我的博客移至 GitHub Pages。我在 Windows 上使用本地 Jekyll 工具 ( jekyll 3.1.3)neo-hpstr-jekyll-theme作为起点。

入口点(index.html在 root 中)和帖子生成得很好。但是当我放置降价文件 ( about.md) 时:

---
layout: page
title:  "about me"
permalink: /about
---
here goes some content with markdown syntax...
Run Code Online (Sandbox Code Playgroud)

构建后,此文件直接放置在_site\about.md具有完全相同内容(未转换)的文件夹下。它应该被改造并放置在_site\about\index.html

到目前为止,我已经检查了布局(它存在并且看起来不错)、文件中的 BOM(没有添加)、永久链接配置_config.yml(使用默认值)但没有结果。

知道我做错了什么吗?


编辑:页面项目位于:https : //github.com/mmierzwa/mmierzwa.github.io(开发分支)

html markdown jekyll

2
推荐指数
1
解决办法
1606
查看次数

单个facet字段上的多个facet.prefix

我正在创建一个搜索应用程序,它集中使用Solr(5.2.1)分面功能.一个要求是限制指定字段的前缀返回的facet数.

标准的Solr查询语法适用于单个前缀值:

/select?q=*%3A*&rows=0&wt=json&indent=true&facet=true&facet.field=DocumentKind&f.DocumentKind.facet.prefix=faq
Run Code Online (Sandbox Code Playgroud)

输出:

"facet_counts": {
    "facet_queries": {},
    "facet_fields": {
      "DocumentKind": {
        "faq": 1523
      }
      ...
Run Code Online (Sandbox Code Playgroud)

不幸的是,当我必须使用多个前缀限制字段上的facet时,这不起作用:

/select?q=*%3A*&rows=0&wt=json&indent=true&facet=true&facet.field=DocumentKind&f.DocumentKind.facet.prefix=manual&f.DocumentKind.facet.prefix=faq
Run Code Online (Sandbox Code Playgroud)

我预计它会返回这样的东西:

"facet_counts": {
    "facet_queries": {},
    "facet_fields": {
      "DocumentKind": {
        "faq": 1523,
        "manual": 2366
      }
      ...
Run Code Online (Sandbox Code Playgroud)

但它提供与以前相同的输出.

在上面的例子中,我匹配整个facet值,但在实际使用情况下,我真的必须匹配前缀.为简洁起见,我展示了这个例子.

我可以在我的应用程序中对此进行过滤,但Solr返回的数据大小非常重要.

solr facet faceted-search

0
推荐指数
1
解决办法
4007
查看次数

标签 统计

adfs2.0 ×1

c# ×1

facet ×1

faceted-search ×1

html ×1

jekyll ×1

markdown ×1

saml-2.0 ×1

solr ×1

wif ×1