Commit 0d1180ad authored by Hidde-Jan Jongsma's avatar Hidde-Jan Jongsma

Cleanup and comments

parent 51a23220
......@@ -110,11 +110,13 @@ interface IrmaCredential {
export class IrmaService implements ConnectorService {
type = 'irma';
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async registerOrganization(organization: Organization) {
// We don't need to do anything for IRMA.
return;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
canIssueCredentialRequest(request: CredentialIssueRequest) {
// We cannot issue IRMA credentials right now.
return false;
......@@ -128,6 +130,7 @@ export class IrmaService implements ConnectorService {
return !!request.type.irmaType;
}
// eslint-disable-next-line @typescript-eslint/no-unused-vars
async handleIssueCredentialRequest(issueRequest: CredentialIssueRequest) {
throw new NotImplementedException('Cannot issue IRMA credentials');
}
......@@ -142,8 +145,6 @@ export class IrmaService implements ConnectorService {
validateIrmaDisclosure(verifyRequest: CredentialVerifyRequest, jwt: string) {
const publicKey = IRMASERVER_PUBLIC_KEY;
console.log(verifyRequest, jwt, publicKey);
const decoded = verify(jwt, publicKey, {
issuer: 'irmaserver',
subject: 'disclosing_result',
......
......@@ -5,12 +5,10 @@ import {
Column,
OneToOne,
JoinColumn,
OneToMany,
} from 'typeorm';
import { randomBytes } from 'crypto';
import { Organization } from '../../organizations/organization.entity';
import { JolocomCredentialType } from './jolocom-credential-type.entity';
const JOLOCOM_WALLET_SEED_BYTES = 32;
const JOLOCOM_WALLET_PASSWORD_BYTES = 16;
......
......@@ -53,10 +53,12 @@ export class JolocomService implements ConnectorService {
}
async handleIssueCredentialRequest(request: CredentialIssueRequest) {
// TODO: implement
return null;
}
async handleVerifyCredentialRequest(request: CredentialVerifyRequest) {
// TODO: implement
return null;
}
......
import { Controller, Get, Query, Param, Post } from '@nestjs/common';
import { Controller, Get, Query, Param } from '@nestjs/common';
import {
DecodeIssueRequestPipe,
......
......@@ -34,6 +34,7 @@ export class CredentialType {
)
jolocomType: JolocomCredentialType;
// TODO: Maybe use simplejson and make it an IrmaDisjunction?
@Column({ nullable: true })
irmaType: string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment