add expiration inside JWANT & refactor getHeaders to move toward supporting did:peer
This commit is contained in:
@@ -245,15 +245,6 @@ export default class NewEditProjectView extends Vue {
|
||||
return identity;
|
||||
}
|
||||
|
||||
public async getHeaders(identity: IIdentifier) {
|
||||
const token = await accessToken(identity);
|
||||
const headers = {
|
||||
"Content-Type": "application/json",
|
||||
Authorization: "Bearer " + token,
|
||||
};
|
||||
return headers;
|
||||
}
|
||||
|
||||
async mounted() {
|
||||
await accountsDB.open();
|
||||
this.numAccounts = await accountsDB.accounts.count();
|
||||
@@ -460,11 +451,14 @@ export default class NewEditProjectView extends Vue {
|
||||
const signer = await SimpleSigner(privateKeyHex);
|
||||
const alg = undefined;
|
||||
// create a JWT for the request
|
||||
const vcJwt: string = await didJwt.createJWT(vcPayload, {
|
||||
alg: alg,
|
||||
issuer: identity.did,
|
||||
signer: signer,
|
||||
});
|
||||
const vcJwt: string = await didJwt.createJWT(
|
||||
vcPayload as Partial<didJwt.JWTPayload>,
|
||||
{
|
||||
alg: alg,
|
||||
issuer: identity.did,
|
||||
signer: signer,
|
||||
},
|
||||
);
|
||||
|
||||
// Make the xhr request payload
|
||||
|
||||
|
||||
Reference in New Issue
Block a user