File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -312,6 +312,34 @@ export class ExtensionClient {
312
312
return this . sendMessage ( "/signify/authorize/credential" , { payload } ) ;
313
313
} ;
314
314
315
+ /**
316
+ * Sends a /signify/get-session-info message to the extension.
317
+ * prereq:
318
+ * once webapp has received an authorized result, a session is created on the extension
319
+ *
320
+ * Upon successfull session, this method is used to receive previously
321
+ * selected signature conditioned to its session validity. If session is expired this would throw an error.
322
+ * Otherwise, it returns AuthorizeResult
323
+ *
324
+ * @param payload The arguments to pass to the extension.
325
+ * @returns {AuthorizeResult }
326
+ */
327
+ getSessionInfo = async ( payload ?: AuthorizeArgs ) : Promise < AuthorizeResult > => {
328
+ return this . sendMessage ( "/signify/get-session-info" , { payload } ) ;
329
+ } ;
330
+
331
+ /**
332
+ * Sends a /signify/clear-session message to the extension.
333
+ *
334
+ * This method is used to clear session with extension if exist.
335
+ *
336
+ * @param payload The arguments to pass to the extension.
337
+ * @returns {AuthorizeResult }
338
+ */
339
+ clearSession = async ( payload ?: AuthorizeArgs ) : Promise < AuthorizeResult > => {
340
+ return this . sendMessage ( "/signify/clear-session" , { payload } ) ;
341
+ } ;
342
+
315
343
/**
316
344
* Sends a /signify/credential/create/data-attestation message to the extension.
317
345
*
You can’t perform that action at this time.
0 commit comments