File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change 1
1
import * as bitauth from 'bitauth' ;
2
+ import * as express from 'express' ;
2
3
3
4
const keys = bitauth . generateSin ( ) ;
4
5
@@ -21,3 +22,6 @@ const password = 's4705hiru13z!';
21
22
22
23
const enc = bitauth . encrypt ( password , secret ) ;
23
24
bitauth . decrypt ( password , enc ) ;
25
+
26
+ const app = express ( ) ;
27
+ app . use ( bitauth . middleware ) ;
Original file line number Diff line number Diff line change @@ -30,6 +30,6 @@ export function verifySignature(
30
30
export function validateSin ( sin : string , callback ?: callback ) : boolean | void ;
31
31
export function encrypt ( password : BinaryLike , str : string ) : string ;
32
32
export function decrypt ( password : BinaryLike , str : string ) : string ;
33
- export function middleware ( ) : RequestHandler ;
33
+ export const middleware : RequestHandler ;
34
34
35
35
export { } ;
You can’t perform that action at this time.
0 commit comments