DebugLogFilePath

DebugLogFilePath As Character

If set to a file path, causes each Chilkat method or property call to automatically append it's LastErrorText to the specified log file. The information is appended such that if a hang or crash occurs, it is possible to see the context in which the problem occurred, as well as a history of all Chilkat calls up to the point of the problem. The VerboseLogging property can be set to provide more detailed information.

This property is typically used for debugging the rare cases where a Chilkat method call hangs or generates an exception that halts program execution (i.e. crashes).
A hang or crash should generally never happen. The typical causes of a hang are:

a timeout related property was set to 0 to explicitly indicate that an infinite timeout is desired,

the hang is actually a hang within an event callback (i.e. it is a hang within the application code), or

there is an internal problem (bug) in the Chilkat code that causes the hang.

LastErrorText

LastErrorText As Character (read-only)

Provides information in plain-text format about the last method/property called. If a method call returns a value indicating failure, or behaves unexpectedly, examine this property to get more information.

LastMethodSuccess

Indicate whether the last method call succeeded or failed. A value of .T. indicates success, a value of .F. indicates failure. This property is automatically set for method calls. It is not modified by property accesses. The property is automatically set to indicate success for the following types of method calls:

VerboseLogging

VerboseLogging As Boolean

If set to .T., then the contents of LastErrorText (or LastErrorXml, or LastErrorHtml) may contain more verbose information. The default value is .F.. Verbose logging should only be used for debugging. The potentially large quantity of logged information may adversely affect peformance.

Methods

CreateJwt

Creates a JWT. The header is the JOSE JSON header. It can be the full JOSE JSON, or it can be a shorthand string such as "HS256", "HS384", or "HS512", in which case the standard JOSE header for the given algorithm will be used.

The payload is the JSON payload that contains the claims. The password is the secret. Given that the secret is a shared passwod string, this method should only be called for creating JWT's where the JOSE header's "alg" is HS256, HS384, or HS512. For RS256, RS384, RS512, ES256, ES384, and ES512, call CreateJwtPk instead.

When successful, this method returns a JWT with the format xxxxx.yyyyy.zzzzz, where xxxxx is the base64url encoded JOSE header, yyyyy is the base64url encoded payload, and zzzzz is the base64url signature.

CreateJwtPk

Creates a JWT using an RSA or ECC private key. The header is the JOSE JSON header. It can be the full JOSE JSON, or it can be a shorthand string such as "RS256", "RS384", "RS512", "ES256", "ES384", or "ES512", in which case the standard JOSE header for the given algorithm will be used.

The payload is the JSON payload that contains the claims. The key is the private key. This method should only be called for creating JWT's where the JOSE header's "alg" is RS256, RS384, RS512, ES256, ES384, and ES512. If the secret is a shared password string, then call CreateJwt instead.

When successful, this method returns a JWT with the format xxxxx.yyyyy.zzzzz, where xxxxx is the base64url encoded JOSE header, yyyyy is the base64url encoded payload, and zzzzz is the base64url signature.

GenNumericDate

Generates a JSON numeric value representing the number of seconds from 1970-01-01T00:00:00Z UTC until the specified UTC date/time, ignoring leap seconds. The date/time generated is equal to the current system time plus the number of seconds specified by numSecOffset. The numSecOffset can be negative.

IsTimeValid

Verifies the "exp" and/or "nbf" claims and returns .T. if the current system date/time is within range. Returns .F. if the current system date/time is outside the allowed range of time. The leeway may be set to a non-zero number of seconds to allow for some small leeway (usually no more than a few minutes) to account for clock skew.

VerifyJwt

Verifies a JWT that requires a shared password string for verification. The token should be a JWT with the format xxxxx.yyyyy.zzzzz. This method should only be called for JWT's using the HS256, HS384, or HS512 algorithms. The VerifyJwtPk method should be called for verifying JWT's requiring an RSA or ECC key.

Returns .T. if the signature was verified. Returns .F. if the signature was not successfully verified.

VerifyJwtPk

Verifies a JWT that requires an RSA or ECC public key for verification. The token should be a JWT with the format xxxxx.yyyyy.zzzzz. This method should only be called for JWT's using the RS256, RS384, RS512, ES256, ES384, or ES512 algorithms.

Returns .T. if the signature was verified. Returns .F. if the signature was not successfully verified.