SecurityTokenService::GetTokenLifetime Method (Lifetime^)
Gets the lifetime for the issued token.
Assembly: System.IdentityModel (in System.IdentityModel.dll)
Parameters
- requestLifetime
-
Type:
System.IdentityModel.Protocols.WSTrust::Lifetime^
A Lifetime that represents the requested lifetime.
Return Value
Type: System.IdentityModel.Protocols.WSTrust::Lifetime^A Lifetime that represents the granted lifetime.
This method is normally called with the lifetime that arrived in the RST. In the default implementation, the token lifetime is calculated according to the following table.
Created (in) | Expires (in) | Created (in) | Expires (out) |
|---|---|---|---|
null | null | DateTime::UtcNow + SecurityTokenServiceConfiguration::DefaultTokenLifetime | |
C | null | C | |
null | E | E | |
C | E | C | E |
This method is called from the default token issuance pipeline implemented in the Issue method.
Available since 4.5