SecurityTokenService.GetTokenLifetime(Lifetime) Método
Definição
Obtém o tempo de vida do token emitido.Gets the lifetime for the issued token.
protected:
virtual System::IdentityModel::Protocols::WSTrust::Lifetime ^ GetTokenLifetime(System::IdentityModel::Protocols::WSTrust::Lifetime ^ requestLifetime);
protected virtual System.IdentityModel.Protocols.WSTrust.Lifetime GetTokenLifetime (System.IdentityModel.Protocols.WSTrust.Lifetime requestLifetime);
abstract member GetTokenLifetime : System.IdentityModel.Protocols.WSTrust.Lifetime -> System.IdentityModel.Protocols.WSTrust.Lifetime
override this.GetTokenLifetime : System.IdentityModel.Protocols.WSTrust.Lifetime -> System.IdentityModel.Protocols.WSTrust.Lifetime
Protected Overridable Function GetTokenLifetime (requestLifetime As Lifetime) As Lifetime
Parâmetros
- requestLifetime
- Lifetime
Um Lifetime que representa o tempo de vida solicitado.A Lifetime that represents the requested lifetime.
Retornos
Um Lifetime que representa o tempo de vida concedido.A Lifetime that represents the granted lifetime.
Comentários
Esse método é normalmente chamado com o tempo de vida que chegou no RST.This method is normally called with the lifetime that arrived in the RST. Na implementação padrão, o tempo de vida do token é calculado de acordo com a tabela a seguir.In the default implementation, the token lifetime is calculated according to the following table.
| Criado (em)Created (in) | Expira (em)Expires (in) | Criado (em)Created (in) | Expira (out)Expires (out) |
|---|---|---|---|
null |
null |
DateTime.UtcNow | DateTime.UtcNow + SecurityTokenServiceConfiguration.DefaultTokenLifetime |
| CC | null |
CC | C + SecurityTokenServiceConfiguration.DefaultTokenLifetimeC + SecurityTokenServiceConfiguration.DefaultTokenLifetime |
null |
EE | DateTime.UtcNow | EE |
| CC | EE | CC | EE |
Esse método é chamado a partir do pipeline de emissão de token padrão implementado no Issue método.This method is called from the default token issuance pipeline implemented in the Issue method.