美文网首页
EF Support Relying Parties

EF Support Relying Parties

作者: 灭蒙鸟 | 来源:发表于2017-02-25 18:51 被阅读94次

layout: docs-default

Entity Framework Support for Relying Parties

IdentityServer WS-Federation 插件的EF支持请看IdentityServer3.WsFederation.EntityFramework repository.

依赖第三方的配置

RelyingPartyService 实现了基于EF的 IRelyingPartyService 接口.

注册

要注册依赖第三方到IdentityServer,可以使用 WsFederationServiceFactory 上的RegisterRelyingPartyService 扩展方法。这个扩展方法接受EntityFrameworkServiceOptions参数:

  • ConnectionString: 连接字符串的名字,配置在.config 文件中.
  • Schema: 可选的数据库schema,如果没有提供,那么使用数据库默认schema(一般是dbo.)

配置例子如下:

var efConfig = new EntityFrameworkServiceOptions {
   ConnectionString = "SomeConnectionName",
   //Schema = "someSchemaIfDesired"
};

var factory = new WsFederationServiceFactory(options.Factory);
factory.RegisterRelyingPartyService(efConfig);

相关文章

网友评论

      本文标题:EF Support Relying Parties

      本文链接:https://www.haomeiwen.com/subject/pslvyttx.html