SamlSecurityTokenHandler.CreateAssertion 方法

定义

使用指定颁发者、条件、建议和语句,创建 SamlAssertion 对象。 您可以重写此方法以自定义用于创建断言的参数。

protected:
 virtual System::IdentityModel::Tokens::SamlAssertion ^ CreateAssertion(System::String ^ issuer, System::IdentityModel::Tokens::SamlConditions ^ conditions, System::IdentityModel::Tokens::SamlAdvice ^ advice, System::Collections::Generic::IEnumerable<System::IdentityModel::Tokens::SamlStatement ^> ^ statements);
protected virtual System.IdentityModel.Tokens.SamlAssertion CreateAssertion (string issuer, System.IdentityModel.Tokens.SamlConditions conditions, System.IdentityModel.Tokens.SamlAdvice advice, System.Collections.Generic.IEnumerable<System.IdentityModel.Tokens.SamlStatement> statements);
abstract member CreateAssertion : string * System.IdentityModel.Tokens.SamlConditions * System.IdentityModel.Tokens.SamlAdvice * seq<System.IdentityModel.Tokens.SamlStatement> -> System.IdentityModel.Tokens.SamlAssertion
override this.CreateAssertion : string * System.IdentityModel.Tokens.SamlConditions * System.IdentityModel.Tokens.SamlAdvice * seq<System.IdentityModel.Tokens.SamlStatement> -> System.IdentityModel.Tokens.SamlAssertion
Protected Overridable Function CreateAssertion (issuer As String, conditions As SamlConditions, advice As SamlAdvice, statements As IEnumerable(Of SamlStatement)) As SamlAssertion

参数

issuer
String

断言的颁发者。

conditions
SamlConditions

要添加到断言中的 SamlConditions

advice
SamlAdvice

要添加到断言中的 SamlAdvice

statements
IEnumerable<SamlStatement>

要添加到断言中的 SamlStatement 的集合。

返回

创建的 SAML 断言。

注解

为断言创建唯一的随机 ID, AssertionId 并将 属性设置为此值。 IssueInstant 设置为 UtcNow

适用于