AccessToken Class

Beta  

Token issued by DelegationSecureTokenService for API access

Methods

Name Description
constructor(tokenString?: string, startsAt?: Date, expiresAt?: Date, userInfo?: UserInfo): AccessToken Create a new AccessToken given a JWT (JSON Web Token)  
initFromTokenString(tokenStr: string): void Initialize the jwt field of the current instance of the AccessToken  
isExpired(buffer: number): boolean returns true if this token has expired  
setPrefix(prefix: string): void Protected    
toJSON(): AccessTokenProps    
toTokenString(includePrefix: IncludePrefix = IncludePrefix.Yes): string Convert this AccessToken to a string that can be passed across the wire  
fromJson(jsonObj: AccessTokenProps): AccessToken Static Creates a strongly typed AccessToken object from an untyped JSON with the same properties as AccessToken  
fromTokenString(tokenStr: string): AccessToken Static Create an AccessToken from a string that's typically passed across the wire  

Properties

Name Type Description
_prefix Protected string    
_tokenString Protected string    

Defined in

Last Updated: 11 June, 2024