WSFederationAuthenticationModule.GetSessionTokenContext 方法
定义
protected:
virtual System::String ^ GetSessionTokenContext();
protected virtual string GetSessionTokenContext ();
abstract member GetSessionTokenContext : unit -> string
override this.GetSessionTokenContext : unit -> string
Protected Overridable Function GetSessionTokenContext () As String
返回
保持的字符串在会话 Cookie 中。The string to persist in the session cookie.
例外
注解
GetSessionTokenContext当处理 WS-Federation 登录响应消息时,将从请求处理管道中调用方法,以获取要在 SessionSecurityToken.Context 会话 cookie 内的属性中存储的值。The GetSessionTokenContext method is called from the request processing pipeline when processing a WS-Federation sign-in response message to get the value to store in the SessionSecurityToken.Context property inside the session cookie.
您可以重写此方法以提供应用程序特定的值,以将其存储在 cookie 中。You can override this method to provide an application-specific value to be stored in the cookie. WSFAM 不公开任何方法来从 cookie 检索值。WSFAM does not expose any methods to retrieve the value from the cookie. 如果需要,你必须在应用程序中提供逻辑,以便从 cookie 中读取值。You must provide the logic in your application to read the value back from the cookie if it is needed.