Skip to content

Commit

Permalink
Update accreditation auth
Browse files Browse the repository at this point in the history
  • Loading branch information
DaevMithran committed Oct 4, 2024
1 parent 60ce93f commit 7d274f5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/controllers/api/accreditation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export class AccreditationController {
/**
* @openapi
*
* /accreditation/issue:
* /trust-registry/accreditation/issue:
* post:
* tags: [ Trust Registry ]
* summary: Publish a verifiable accreditation for a DID.
Expand Down Expand Up @@ -290,7 +290,7 @@ export class AccreditationController {
/**
* @openapi
*
* /accreditation/verify:
* /trust-registry/accreditation/verify:
* post:
* tags: [ Trust Registry ]
* summary: Verify a verifiable accreditation for a DID.
Expand Down
26 changes: 18 additions & 8 deletions src/middleware/auth/routes/api/accreditation-auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,23 @@ import { AuthRuleProvider } from '../auth-rule-provider.js';
export class AccreditationAuthRuleProvider extends AuthRuleProvider {
constructor() {
super();
this.registerRule('/trust-registry/accreditation/issue', 'POST', 'issue:accreditation:testnet');
this.registerRule('/trust-registry/accreditation/verify', 'POST', 'verify:accreditation:testnet', {
skipNamespace: true,
});
this.registerRule('/trust-registry/accreditation/issue', 'POST', 'issue:accreditation:mainnet');
this.registerRule('/trust-registry/accreditation/verify', 'POST', 'verify:accreditation:mainnet', {
skipNamespace: true,
});
this.registerRule('/trust-registry/accreditation/issue', 'POST', 'issue-accreditation:trust-registry:testnet');
this.registerRule(
'/trust-registry/accreditation/verify',
'POST',
'verify-accreditation:trust-registry:testnet',
{
skipNamespace: true,
}
);
this.registerRule('/trust-registry/accreditation/issue', 'POST', 'issue-accreditation:trust-registry:mainnet');
this.registerRule(
'/trust-registry/accreditation/verify',
'POST',
'verify-accreditation:trust-registry:mainnet',
{
skipNamespace: true,
}
);
}
}

0 comments on commit 7d274f5

Please sign in to comment.