fix(core): update
This commit is contained in:
		| @@ -3,6 +3,6 @@ | ||||
|  */ | ||||
| export const commitinfo = { | ||||
|   name: '@push.rocks/smartjwt', | ||||
|   version: '2.0.3', | ||||
|   version: '2.0.4', | ||||
|   description: 'a package for handling jwt' | ||||
| } | ||||
|   | ||||
| @@ -1,10 +1,5 @@ | ||||
| import * as plugins from './smartjwt.plugins.js'; | ||||
|  | ||||
| export interface ISmartJWTJSONKeypair { | ||||
|   privatePem: string; | ||||
|   publicPem: string; | ||||
| } | ||||
|  | ||||
| /** | ||||
|  * A class to create and validate JWTs and their keys | ||||
|  */ | ||||
| @@ -51,7 +46,7 @@ export class SmartJwt<T extends object = any> { | ||||
|   /** | ||||
|    * gets the currently set kaypair as json | ||||
|    */ | ||||
|   public getKeyPairAsJson(): ISmartJWTJSONKeypair { | ||||
|   public getKeyPairAsJson(): plugins.tsclass.network.IJwtKeypair { | ||||
|     return { | ||||
|       privatePem: this.privateKey.toPemString(), | ||||
|       publicPem: this.publicKey.toPemString(), | ||||
| @@ -61,7 +56,7 @@ export class SmartJwt<T extends object = any> { | ||||
|   /** | ||||
|    * sets the currently set keypair as json | ||||
|    */ | ||||
|   public setKeyPairAsJson(jsonKeyPair: ISmartJWTJSONKeypair) { | ||||
|   public setKeyPairAsJson(jsonKeyPair: plugins.tsclass.network.IJwtKeypair) { | ||||
|     this.privateKey = plugins.smartcrypto.PrivateKey.fromPemString(jsonKeyPair.privatePem); | ||||
|     this.publicKey = plugins.smartcrypto.PublicKey.fromPemString(jsonKeyPair.publicPem); | ||||
|   } | ||||
|   | ||||
| @@ -6,3 +6,10 @@ export { smartcrypto }; | ||||
| // thirdparty scope | ||||
| import jsonwebtoken from 'jsonwebtoken'; | ||||
| export { jsonwebtoken }; | ||||
|  | ||||
| // @tsclass scope | ||||
| import * as tsclass from '@tsclass/tsclass'; | ||||
|  | ||||
| export { | ||||
|   tsclass | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user