@genation/sdk 0.2.10 → 0.2.11
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/README.md +11 -0
- package/dist/genation.cjs.js +1 -1
- package/dist/genation.cjs.js.map +1 -1
- package/dist/genation.es.js +511 -520
- package/dist/genation.es.js.map +1 -1
- package/dist/genation.umd.js +1 -1
- package/dist/genation.umd.js.map +1 -1
- package/dist/index.d.ts +12 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { JWTVerifyResult } from 'jose';
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Authentication-related errors
|
|
3
5
|
*/
|
|
@@ -133,7 +135,7 @@ export declare function createStorage(type?: StorageType): TokenStorage;
|
|
|
133
135
|
export declare class GenationClient {
|
|
134
136
|
private oauth;
|
|
135
137
|
private tokenManager;
|
|
136
|
-
private
|
|
138
|
+
private jwksUrl;
|
|
137
139
|
private http;
|
|
138
140
|
private httpServer;
|
|
139
141
|
private listeners;
|
|
@@ -820,4 +822,13 @@ export declare interface User {
|
|
|
820
822
|
[key: string]: unknown;
|
|
821
823
|
}
|
|
822
824
|
|
|
825
|
+
/**
|
|
826
|
+
* Verify a JWT against a public JWKS endpoint
|
|
827
|
+
*
|
|
828
|
+
* @param token - The JWT to verify
|
|
829
|
+
* @param jwksUrl - The URL of the JWKS endpoint. Defaults to Genation Auth URL.
|
|
830
|
+
* @returns The verification result including the payload
|
|
831
|
+
*/
|
|
832
|
+
export declare function verifyToken(token: string, jwksUrl?: string): Promise<JWTVerifyResult>;
|
|
833
|
+
|
|
823
834
|
export { }
|