SecurityTokenService.GetTokenLifetime(Lifetime) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Parameters
Returns
A Lifetime that represents the granted lifetime.
Remarks
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 | DateTime.UtcNow + SecurityTokenServiceConfiguration.DefaultTokenLifetime |
C | null |
C | C + SecurityTokenServiceConfiguration.DefaultTokenLifetime |
null |
E | DateTime.UtcNow | E |
C | E | C | E |
This method is called from the default token issuance pipeline implemented in the Issue method.
Applies to
See also
Samarbeta med oss på GitHub
Källan för det här innehållet finns på GitHub, där du även kan skapa och granska ärenden och pull-begäranden. Se vår deltagarguide för mer information.