SessionSecurityTokenHandler.ValidateSession(SessionSecurityToken) 方法
定义
确定与指定标记相关联的会话是否有效。Determines whether the session associated with the specified token is still valid. 通过检查指定标记的 ValidFrom 和 ValidTo 确定有效性。Validity is determined by checking the ValidFrom and ValidTo properties of the specified token. 如果该会话不再有效,则引发异常。An exception is thrown if the session is no longer valid.
protected:
virtual void ValidateSession(System::IdentityModel::Tokens::SessionSecurityToken ^ securityToken);
protected virtual void ValidateSession (System.IdentityModel.Tokens.SessionSecurityToken securityToken);
abstract member ValidateSession : System.IdentityModel.Tokens.SessionSecurityToken -> unit
override this.ValidateSession : System.IdentityModel.Tokens.SessionSecurityToken -> unit
Protected Overridable Sub ValidateSession (securityToken As SessionSecurityToken)
参数
- securityToken
- SessionSecurityToken
要检查的标记。The token to be checked.
例外
securityToken 为 null。securityToken is null.
Configuration 属性为 null。The Configuration property is null.
注解
如果标记的 ValidFrom 属性设置为晚于的值 UtcNow ,或者其 ValidTo 属性设置为早于的值,则该标记无效 UtcNow 。The token is not valid if its ValidFrom property is set to a value that occurs later than UtcNow, or if its ValidTo property is set to a value that occurs earlier than UtcNow.
从方法调用 ValidateToken 以验证会话。Called from the ValidateToken methods to validate the session.