Commit 5e093829 authored by Hidde-Jan Jongsma's avatar Hidde-Jan Jongsma

Rename type to name

parent e599cada
...@@ -7,7 +7,7 @@ import { CredentialVerifyRequest } from 'src/requests/credential-verify-request. ...@@ -7,7 +7,7 @@ import { CredentialVerifyRequest } from 'src/requests/credential-verify-request.
* e.g. connectors for Jolocom, IRMA, ... * e.g. connectors for Jolocom, IRMA, ...
*/ */
export interface ConnectorService { export interface ConnectorService {
type: string; name: string;
/** /**
* Method for registering an organisation to use a certain SSI implementation * Method for registering an organisation to use a certain SSI implementation
* E.g. for Jolocom a self-sovereign identity must be created and anchored on Ethereum (see: https://jolocom-lib.readthedocs.io/en/latest/gettingStarted.html#how-to-create-a-self-sovereign-identity) * E.g. for Jolocom a self-sovereign identity must be created and anchored on Ethereum (see: https://jolocom-lib.readthedocs.io/en/latest/gettingStarted.html#how-to-create-a-self-sovereign-identity)
......
...@@ -18,8 +18,8 @@ export class ConnectorsService { ...@@ -18,8 +18,8 @@ export class ConnectorsService {
this.connectors.push(this.irmaService); this.connectors.push(this.irmaService);
} }
getConnector(type: string) { getConnector(name: string) {
return this.connectors.find(connector => connector.type === type); return this.connectors.find(connector => connector.name === name);
} }
async registerOrganization(organization: Organization) { async registerOrganization(organization: Organization) {
......
...@@ -108,7 +108,7 @@ interface IrmaCredential { ...@@ -108,7 +108,7 @@ interface IrmaCredential {
@Injectable() @Injectable()
export class IrmaService implements ConnectorService { export class IrmaService implements ConnectorService {
type = 'irma'; name = 'irma';
// eslint-disable-next-line @typescript-eslint/no-unused-vars // eslint-disable-next-line @typescript-eslint/no-unused-vars
async registerOrganization(organization: Organization) { async registerOrganization(organization: Organization) {
......
...@@ -26,7 +26,7 @@ const DEFAULT_EXPIRY_MS = 60 * 60 * 1000; ...@@ -26,7 +26,7 @@ const DEFAULT_EXPIRY_MS = 60 * 60 * 1000;
@Injectable() @Injectable()
export class JolocomService implements ConnectorService { export class JolocomService implements ConnectorService {
type = 'jolocom'; name = 'jolocom';
private registry: JolocomRegistry; private registry: JolocomRegistry;
private logger: Logger; private logger: Logger;
......
...@@ -22,7 +22,7 @@ export class IssueController { ...@@ -22,7 +22,7 @@ export class IssueController {
issueRequest, issueRequest,
availableConnectors: await this.connectorsService availableConnectors: await this.connectorsService
.availableIssueConnectors(issueRequest) .availableIssueConnectors(issueRequest)
.then(cs => cs.map(c => c.type)), .then(cs => cs.map(c => c.name)),
}; };
} }
......
...@@ -36,7 +36,7 @@ export class VerifyController { ...@@ -36,7 +36,7 @@ export class VerifyController {
verifyRequest, verifyRequest,
availableConnectors: await this.connectorsService availableConnectors: await this.connectorsService
.availableVerifyConnectors(verifyRequest) .availableVerifyConnectors(verifyRequest)
.then(cs => cs.map(c => c.type)), .then(cs => cs.map(c => c.name)),
}; };
} }
......
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