TokenHandler Class
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.
Defines properties shared across all security token handlers.
public abstract class TokenHandler
type TokenHandler = class
Public MustInherit Class TokenHandler
- Inheritance
-
TokenHandler
- Derived
Constructors
TokenHandler() |
Fields
DefaultTokenLifetimeInMinutes |
Default lifetime of tokens created. When creating tokens, if 'expires', 'notbefore' or 'issuedat' are null, then a default will be set to: issuedat = DateTime.UtcNow, notbefore = DateTime.UtcNow, expires = DateTime.UtcNow + TimeSpan.FromMinutes(TokenLifetimeInMinutes). |
Properties
MaximumTokenSizeInBytes |
Gets and sets the maximum token size in bytes that will be processed. |
SetDefaultTimesOnTokenCreation |
Gets or sets a bool that controls if token creation will set default 'exp', 'nbf' and 'iat' if not specified. |
TokenLifetimeInMinutes |
Gets or sets the token lifetime in minutes. |
Methods
ReadToken(String) |
Converts a string into an instance of SecurityToken. |
ValidateTokenAsync(SecurityToken, TokenValidationParameters) |
Validates a token. On a validation failure, no exception will be thrown; instead, the exception will be set in the returned TokenValidationResult.Exception property. Callers should always check the TokenValidationResult.IsValid property to verify the validity of the result. |
ValidateTokenAsync(String, TokenValidationParameters) |
Validates a token. On a validation failure, no exception will be thrown; instead, the exception will be set in the returned TokenValidationResult.Exception property. Callers should always check the TokenValidationResult.IsValid property to verify the validity of the result. |
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기