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 @@ -284,6 +284,34 @@ export class ExtensionClient {
284
284
return this . sendMessage ( "/signify/authorize/credential" , { payload } ) ;
285
285
} ;
286
286
287
+ /**
288
+ * Sends a /signify/get-session-info message to the extension.
289
+ * prereq:
290
+ * once webapp has received an authorized result, a session is created on the extension
291
+ *
292
+ * Upon successfull session, this method is used to receive previously
293
+ * selected signature conditioned to its session validity. If session is expired this would throw an error.
294
+ * Otherwise, it returns AuthorizeResult
295
+ *
296
+ * @param payload The arguments to pass to the extension.
297
+ * @returns {AuthorizeResult }
298
+ */
299
+ getSessionInfo = async ( payload ?: AuthorizeArgs ) : Promise < AuthorizeResult > => {
300
+ return this . sendMessage ( "/signify/get-session-info" , { payload } ) ;
301
+ } ;
302
+
303
+ /**
304
+ * Sends a /signify/clear-session message to the extension.
305
+ *
306
+ * This method is used to clear session with extension if exist.
307
+ *
308
+ * @param payload The arguments to pass to the extension.
309
+ * @returns {AuthorizeResult }
310
+ */
311
+ clearSession = async ( payload ?: AuthorizeArgs ) : Promise < AuthorizeResult > => {
312
+ return this . sendMessage ( "/signify/clear-session" , { payload } ) ;
313
+ } ;
314
+
287
315
/**
288
316
* Configures the extension with the specified vendor.
289
317
* @param payload The vendor configuration
You can’t perform that action at this time.
0 commit comments