Επεξεργασία

Κοινή χρήση μέσω


SecurityTokenService.GetResponse Method

Definition

Creates the response (RSTR) that contains the issued token by using the specified request (RST) and security token descriptor.

protected:
 virtual System::IdentityModel::Protocols::WSTrust::RequestSecurityTokenResponse ^ GetResponse(System::IdentityModel::Protocols::WSTrust::RequestSecurityToken ^ request, System::IdentityModel::Tokens::SecurityTokenDescriptor ^ tokenDescriptor);
protected virtual System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse GetResponse (System.IdentityModel.Protocols.WSTrust.RequestSecurityToken request, System.IdentityModel.Tokens.SecurityTokenDescriptor tokenDescriptor);
abstract member GetResponse : System.IdentityModel.Protocols.WSTrust.RequestSecurityToken * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse
override this.GetResponse : System.IdentityModel.Protocols.WSTrust.RequestSecurityToken * System.IdentityModel.Tokens.SecurityTokenDescriptor -> System.IdentityModel.Protocols.WSTrust.RequestSecurityTokenResponse
Protected Overridable Function GetResponse (request As RequestSecurityToken, tokenDescriptor As SecurityTokenDescriptor) As RequestSecurityTokenResponse

Parameters

request
RequestSecurityToken

The RST that contains the token request.

tokenDescriptor
SecurityTokenDescriptor

The token descriptor that contains the information to use for the issued token.

Returns

The response (RSTR) or null if a response cannot be created from the specified request and token descriptor. The default implementation returns null if the tokenDescriptor parameter is null.

Remarks

The GetResponse method is called as the last step from the token issuance pipeline, which is implemented by the Issue method. It creates and returns the response (RSTR) by using the original incoming request (RST) and the token descriptor that was built up during previous steps in the token issuance pipeline.

The default implementation creates the RSTR by passing the RST specified in the request parameter to the RequestSecurityTokenResponse.RequestSecurityTokenResponse(WSTrustMessage) constructor, invoking the SecurityTokenDescriptor.ApplyTo method on the token descriptor passed into GetResponse to apply its properties to the newly created RSTR, setting the AppliesTo property on the RSTR by using the AppliesToAddress property on the token descriptor, and finally setting the ReplyTo property on the RSTR according to the following table:

RST.ReplyTo property SecurityTokenDescriptor.AppliesToAddress property. RSTR.ReplyTo property
Set Not Set Not Set
Set Set SecurityTokenDescriptor.AppliesToAddress
Not Set Set Not Set
Not Set Not Set Not Set

Applies to

See also