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
Met ons samenwerken op GitHub
De bron voor deze inhoud vindt u op GitHub, waar u ook problemen en pull-aanvragen kunt maken en controleren. Bekijk onze gids voor inzenders voor meer informatie.