@breautek/storm 9.3.1 → 9.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/docs/assets/hierarchy.js +1 -1
- package/docs/assets/search.js +1 -1
- package/docs/classes/Application.html +17 -17
- package/docs/classes/Command.html +90 -90
- package/docs/classes/ConfigLoader.html +3 -3
- package/docs/classes/Database.html +2 -2
- package/docs/classes/DatabaseCastObject.html +2 -2
- package/docs/classes/DatabaseConnection.html +21 -21
- package/docs/classes/DatabaseQueryError.html +6 -6
- package/docs/classes/DeadLockError.html +6 -6
- package/docs/classes/DiskSpaceError.html +5 -5
- package/docs/classes/DropTemporaryTableQuery.html +7 -7
- package/docs/classes/DuplicateEntryError.html +5 -5
- package/docs/classes/EntityNotFoundError.html +5 -5
- package/docs/classes/ExpiredTokenError.html +5 -5
- package/docs/classes/ForbiddenError.html +5 -5
- package/docs/classes/GetMySQLVersion.html +7 -7
- package/docs/classes/Handler.html +4 -2
- package/docs/classes/IllegalStateError.html +5 -5
- package/docs/classes/InternalError.html +5 -5
- package/docs/classes/InvalidCredentialsError.html +5 -5
- package/docs/classes/InvalidValueError.html +5 -5
- package/docs/classes/LineString.html +2 -2
- package/docs/classes/LockWaitTimeoutError.html +6 -6
- package/docs/classes/ManagedDatabaseConnection.html +5 -5
- package/docs/classes/MetricStore.html +2 -2
- package/docs/classes/Middleware.html +2 -2
- package/docs/classes/MissingConfigError.html +5 -5
- package/docs/classes/MissingParameterError.html +5 -5
- package/docs/classes/MySQLConnection.html +25 -25
- package/docs/classes/MySQLDatabase.html +2 -2
- package/docs/classes/NotImplementedError.html +5 -5
- package/docs/classes/Point.html +2 -2
- package/docs/classes/Polygon.html +2 -2
- package/docs/classes/Query.html +7 -7
- package/docs/classes/RawError.html +5 -5
- package/docs/classes/RawQuery.html +7 -7
- package/docs/classes/Request.html +3 -3
- package/docs/classes/Response.html +2 -2
- package/docs/classes/ResponseData.html +3 -3
- package/docs/classes/ServiceProvider.html +2 -2
- package/docs/classes/ServiceResponse.html +2 -2
- package/docs/classes/SetSessionVariableQuery.html +7 -7
- package/docs/classes/StormError.html +5 -5
- package/docs/classes/TemporaryTableQuery.html +7 -7
- package/docs/classes/TimeoutError.html +5 -5
- package/docs/classes/Token.html +2 -2
- package/docs/classes/TokenManager.html +5 -2
- package/docs/classes/Transaction.html +2 -2
- package/docs/classes/UnauthorizedAccessError.html +5 -5
- package/docs/enums/ErrorCode.html +2 -2
- package/docs/enums/ExitCode.html +2 -2
- package/docs/enums/HTTPMethod.html +2 -2
- package/docs/enums/IsolationLevel.html +2 -2
- package/docs/enums/JWTError.html +2 -2
- package/docs/enums/StatusCode.html +2 -2
- package/docs/enums/TransactionAccessLevel.html +2 -2
- package/docs/functions/getInstance.html +1 -1
- package/docs/hierarchy.html +1 -1
- package/docs/interfaces/IAdditionalErrorDetails.html +1 -1
- package/docs/interfaces/ICloudwatchConfig.html +2 -2
- package/docs/interfaces/ICloudwatchCredentials.html +2 -2
- package/docs/interfaces/ICloudwatchStreamConfig.html +2 -2
- package/docs/interfaces/IConfig.html +3 -3
- package/docs/interfaces/IDatabaseConfig.html +2 -2
- package/docs/interfaces/IDatabaseConnection.html +5 -5
- package/docs/interfaces/IDatabasePosition.html +2 -2
- package/docs/interfaces/IErrorResponse.html +2 -2
- package/docs/interfaces/IFormData.html +2 -2
- package/docs/interfaces/IGetMySQLVersionResult.html +2 -2
- package/docs/interfaces/IGetMySQLVersionRow.html +2 -2
- package/docs/interfaces/IInsertQueryResult.html +2 -2
- package/docs/interfaces/IJWTVerifyOptions.html +2 -2
- package/docs/interfaces/IOKPacket.html +2 -2
- package/docs/interfaces/IParameterMap.html +1 -1
- package/docs/interfaces/IQueryable.html +2 -2
- package/docs/interfaces/IRequestResponse.html +2 -2
- package/docs/interfaces/ISetSessionVariableQueryInput.html +2 -2
- package/docs/interfaces/IStormCLIArgs.html +2 -2
- package/docs/interfaces/ITemporaryTableQueryInput.html +2 -2
- package/docs/interfaces/IUpdateQueryResult.html +2 -2
- package/docs/interfaces/formidable.FileJSON.html +1 -1
- package/docs/interfaces/formidable.Part.html +1 -1
- package/docs/types/IDeleteQueryResult.html +1 -1
- package/docs/types/IStoredProcedureResult.html +1 -1
- package/docs/types/TCoordinate.html +1 -1
- package/docs/types/TExpiresIn.html +1 -1
- package/docs/types/TSerializableResponse.html +1 -1
- package/docs/types/TSupportedResponsePrimitives.html +1 -1
- package/docs/types/TSupportedResponseTypes.html +1 -1
- package/lib/Handler.d.ts +2 -0
- package/lib/Handler.js +18 -4
- package/lib/Handler.js.map +1 -1
- package/lib/Request.d.ts +6 -3
- package/lib/Request.js.map +1 -1
- package/lib/TokenManager.d.ts +13 -0
- package/lib/TokenManager.js +15 -0
- package/lib/TokenManager.js.map +1 -1
- package/package.json +5 -5
- package/src/Handler.ts +24 -4
- package/src/Request.ts +7 -3
- package/src/TokenManager.ts +16 -0
package/src/TokenManager.ts
CHANGED
|
@@ -78,6 +78,22 @@ export class TokenManager<TAuthToken extends IAuthTokenData = IAuthTokenData> {
|
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
+
/**
|
|
82
|
+
* Decodes the token. Use this method only on verified tokens as this does not verify against tampering
|
|
83
|
+
*
|
|
84
|
+
* @param token
|
|
85
|
+
* @returns
|
|
86
|
+
*/
|
|
87
|
+
public decodeSync(token: Token): TAuthToken {
|
|
88
|
+
return jwt.decode(token.getSignature()) as TAuthToken;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* Decodes the token. Use this method only on verified tokens as this does not verify against tampering
|
|
93
|
+
*
|
|
94
|
+
* @param token
|
|
95
|
+
* @returns
|
|
96
|
+
*/
|
|
81
97
|
public decode(token: Token): Promise<TAuthToken> {
|
|
82
98
|
return new Promise<any>((resolve, reject) => {
|
|
83
99
|
try {
|