@kravc/dos 1.10.0 → 1.10.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kravc/dos",
3
- "version": "1.10.0",
3
+ "version": "1.10.1",
4
4
  "description": "Convention-based, easy-to-use library for building API-driven serverless services.",
5
5
  "keywords": [
6
6
  "Service",
package/src/index.d.ts CHANGED
@@ -1,6 +1,4 @@
1
1
 
2
- export declare function getOrFail(object: Record<string, any>, path: string): any;
3
-
4
2
  export declare type SortOrder = 'asc' | 'desc';
5
3
  export declare type Context = Record<string, any>;
6
4
  export declare type QueryMap = Record<string, any>;
@@ -124,3 +122,15 @@ export declare class Document<T> {
124
122
  hasAttributeChanged(attributePath: string): boolean;
125
123
  toJSON(): Record<string, any>;
126
124
  }
125
+
126
+ export declare function getOrFail(
127
+ object: Record<string, any>,
128
+ path: string
129
+ ): any;
130
+
131
+ export declare function verifyToken(
132
+ context: Context,
133
+ token: string,
134
+ publicKey: string,
135
+ algorithm: string,
136
+ ): Promise<[ boolean, string | undefined ]>;
package/src/index.js CHANGED
@@ -15,6 +15,7 @@ module.exports = {
15
15
  handler: require('./helpers/handler'),
16
16
  security: require('./security'),
17
17
  getOrFail: require('./helpers/getOrFail'),
18
+ verifyToken: require('./security/verifyToken'),
18
19
  JwtAuthorization: require('./security/JwtAuthorization'),
19
20
  SystemAuthorization: require('./security/SystemAuthorization')
20
21
  }