WSFederationAuthenticationModule.GetSecurityToken 方法
定义
从指定的请求读取安全令牌。Reads a security token from the specified request.
重载
| GetSecurityToken(SignInResponseMessage) |
从指定 WS Federation 登录响应消息读取安全标记。Reads a security token from the specified WS Federation sign-in response message. |
| GetSecurityToken(HttpRequestBase) |
从指定的 HTTP 请求读取安全令牌。Reads a security token from the specified HTTP request. |
GetSecurityToken(SignInResponseMessage)
从指定 WS Federation 登录响应消息读取安全标记。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
参数
- message
- SignInResponseMessage
从登录响应消息中读取标识。The sign-in response message from which to read the token.
返回
从该消息读取的安全令牌。The security token that was read from the message.
例外
message 为 null。message is null.
注解
默认实现调用 WSFederationAuthenticationModule.GetXmlTokenFromMessage(SignInResponseMessage, WSFederationSerializer) 方法以获取令牌,并使用配置的安全令牌处理程序中的相应处理程序来读取该令牌。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.
适用于
GetSecurityToken(HttpRequestBase)
从指定的 HTTP 请求读取安全令牌。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
参数
- request
- HttpRequestBase
从中读取标记的 HTTP。The HTTP request from which to read the token.
返回
读取的安全令牌。The security token that was read.
例外
request 为 null。request is null.
注解
从请求处理管道中调用,以将 WS-Federation 登录请求消息作为对象来获取 SecurityToken 。Called from the request processing pipeline to get the WS-Federation sign-in request message as a SecurityToken object.
默认实现将调用 GetSignInResponseMessage 方法以获取 SignInResponseMessage 对象,然后调用 WSFederationAuthenticationModule.GetSecurityToken(SignInResponseMessage) 重载。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.