Edit

Share via


WSFederationAuthenticationModule.GetSecurityToken Method

Definition

Reads a security token from the specified request.

Overloads

GetSecurityToken(SignInResponseMessage)

Reads a security token from the specified WS Federation sign-in response message.

GetSecurityToken(HttpRequestBase)

Reads a security token from the specified HTTP request.

GetSecurityToken(SignInResponseMessage)

Reads a security token from the specified WS Federation sign-in response message.

public:
 virtual System::IdentityModel::Tokens::SecurityToken ^ GetSecurityToken(System::IdentityModel::Services::SignInResponseMessage ^ message);
public virtual System.IdentityModel.Tokens.SecurityToken GetSecurityToken (System.IdentityModel.Services.SignInResponseMessage message);
abstract member GetSecurityToken : System.IdentityModel.Services.SignInResponseMessage -> System.IdentityModel.Tokens.SecurityToken
override this.GetSecurityToken : System.IdentityModel.Services.SignInResponseMessage -> System.IdentityModel.Tokens.SecurityToken
Public Overridable Function GetSecurityToken (message As SignInResponseMessage) As SecurityToken

Parameters

message
SignInResponseMessage

The sign-in response message from which to read the token.

Returns

The security token that was read from the message.

Exceptions

message is null.

Remarks

The default implementation invokes the WSFederationAuthenticationModule.GetXmlTokenFromMessage(SignInResponseMessage, WSFederationSerializer) method to get the token and reads it by using the appropriate handler from the configured security token handlers.

Applies to

GetSecurityToken(HttpRequestBase)

Reads a security token from the specified HTTP request.

public:
 virtual System::IdentityModel::Tokens::SecurityToken ^ GetSecurityToken(System::Web::HttpRequestBase ^ request);
public virtual System.IdentityModel.Tokens.SecurityToken GetSecurityToken (System.Web.HttpRequestBase request);
abstract member GetSecurityToken : System.Web.HttpRequestBase -> System.IdentityModel.Tokens.SecurityToken
override this.GetSecurityToken : System.Web.HttpRequestBase -> System.IdentityModel.Tokens.SecurityToken
Public Overridable Function GetSecurityToken (request As HttpRequestBase) As SecurityToken

Parameters

request
HttpRequestBase

The HTTP request from which to read the token.

Returns

The security token that was read.

Exceptions

request is null.

Remarks

Called from the request processing pipeline to get the WS-Federation sign-in request message as a SecurityToken object.

The default implementation invokes the GetSignInResponseMessage method to get a SignInResponseMessage object and then invokes the WSFederationAuthenticationModule.GetSecurityToken(SignInResponseMessage) overload.

Use a derived class to interpret a specific type of request.

Applies to