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);
网友评论