Skip to content

Commit cbcaae9

Browse files
committed
removed commented code and refactored
Signed-off-by: Rinkal Bhojani <[email protected]>
1 parent 2eaaeee commit cbcaae9

File tree

8 files changed

+13
-1100
lines changed

8 files changed

+13
-1100
lines changed

apps/api-gateway/src/oid4vc-issuance/dtos/oid4vc-issuer-template.dto.ts

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -29,33 +29,6 @@ class CredentialAttributeDisplayDto {
2929
locale?: string;
3030
}
3131

32-
// export class CredentialAttributeDto {
33-
// @ApiProperty({ required: false, description: 'Whether the attribute is mandatory' })
34-
// @IsOptional()
35-
// @IsBoolean()
36-
// mandatory?: boolean;
37-
38-
// // TODO: Check how do we handle claims with only path rpoperty like email, etc.
39-
// @ApiProperty({ description: 'Type of the attribute value (string, number, date, etc.)' })
40-
// @IsString()
41-
// value_type: string;
42-
43-
// @ApiProperty({
44-
// type: [String],
45-
// description:
46-
// 'Claims path pointer as per the draft 15 - https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0-ID2.html#name-claims-path-pointer'
47-
// })
48-
// @IsArray()
49-
// @IsString({ each: true })
50-
// path: string[];
51-
52-
// @ApiProperty({ type: [CredentialAttributeDisplayDto], required: false, description: 'Localized display values' })
53-
// @IsOptional()
54-
// @ValidateNested({ each: true })
55-
// @Type(() => CredentialAttributeDisplayDto)
56-
// display?: CredentialAttributeDisplayDto[];
57-
// }
58-
5932
export enum AttributeType {
6033
STRING = 'string',
6134
NUMBER = 'number',

apps/api-gateway/src/oid4vc-issuance/dtos/oid4vc-issuer.dto.ts

Lines changed: 0 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -43,102 +43,6 @@ export class IssuerDisplayDto {
4343
logo?: LogoDto;
4444
}
4545

46-
// TODO: Check where it is used, coz no reference found
47-
// @ApiExtraModels(ClaimDto)
48-
// export class CredentialConfigurationDto {
49-
// @ApiProperty({
50-
// description: 'The format of the credential',
51-
// example: 'jwt_vc_json'
52-
// })
53-
// @IsString()
54-
// @IsDefined({ message: 'format field is required' })
55-
// @IsNotEmpty({ message: 'format property is required' })
56-
// format: string;
57-
58-
// @ApiProperty({ required: false })
59-
// @IsOptional()
60-
// @IsString()
61-
// vct?: string;
62-
63-
// @ApiProperty({ required: false })
64-
// @IsOptional()
65-
// @IsString()
66-
// doctype?: string;
67-
68-
// @ApiProperty()
69-
// @IsString()
70-
// scope: string;
71-
72-
// @ApiProperty({
73-
// description: 'List of claims supported in this credential',
74-
// type: [ClaimDto]
75-
// })
76-
// @IsArray()
77-
// @ValidateNested({ each: true })
78-
// @Type(() => ClaimDto)
79-
// claims: ClaimDto[];
80-
// // @ApiProperty({
81-
// // description: 'Claims supported by this credential',
82-
// // type: 'object',
83-
// // additionalProperties: { $ref: getSchemaPath(ClaimDto) }
84-
// // })
85-
// // @IsObject()
86-
// // @ValidateNested({ each: true })
87-
// // @Transform(({ value }) =>
88-
// // Object.fromEntries(Object.entries(value || {}).map(([k, v]) => [k, plainToInstance(ClaimDto, v)]))
89-
// // )
90-
// // claims: Record<string, ClaimDto>;
91-
92-
// @ApiProperty({ type: [String] })
93-
// @IsArray()
94-
// credential_signing_alg_values_supported: string[];
95-
96-
// @ApiProperty({ type: [String] })
97-
// @IsArray()
98-
// cryptographic_binding_methods_supported: string[];
99-
100-
// @ApiProperty({
101-
// description: 'Localized display information for the credential',
102-
// type: [DisplayDto]
103-
// })
104-
// @IsArray()
105-
// @ValidateNested({ each: true })
106-
// @Type(() => DisplayDto)
107-
// display: DisplayDto[];
108-
// }
109-
110-
// export class AuthorizationServerConfigDto {
111-
// @ApiProperty({
112-
// description: 'Authorization server issuer URL',
113-
// example: 'https://auth.credebl.com',
114-
// })
115-
// @IsUrl()
116-
// issuer: string
117-
118-
// @ApiPropertyOptional({
119-
// description: 'Token endpoint of the authorization server',
120-
// example: 'https://auth.credebl.com/oauth/token',
121-
// })
122-
// @IsOptional()
123-
// @IsUrl()
124-
// token_endpoint: string
125-
126-
// @ApiProperty({
127-
// description: 'Authorization endpoint of the server',
128-
// example: 'https://auth.credebl.com/oauth/authorize',
129-
// })
130-
// @IsUrl()
131-
// authorization_endpoint: string
132-
133-
// @ApiProperty({
134-
// description: 'Supported scopes',
135-
// example: ['openid', 'profile', 'email'],
136-
// })
137-
// @IsArray()
138-
// @IsString({ each: true })
139-
// scopes_supported: string[]
140-
// }
141-
14246
export class ClientAuthenticationDto {
14347
@ApiProperty({
14448
description: 'OAuth2 client ID for the authorization server',

apps/oid4vc-issuance/interfaces/oid4vc-issuer-sessions.interfaces.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,8 @@ export interface CredentialPayload {
3434
}
3535

3636
export interface CredentialRequest {
37-
// credentialSupportedId?: string;
3837
templateId: string;
39-
// format: CredentialFormat; // "vc+sd-jwt" | "mso_mdoc"
40-
payload: CredentialPayload; // user-supplied payload (without vct)
41-
// disclosureFrame?: DisclosureFrame; // only relevant for vc+sd-jwt
38+
payload: CredentialPayload;
4239
validityInfo?: {
4340
validFrom: Date;
4441
validUntil: Date;
@@ -47,7 +44,6 @@ export interface CredentialRequest {
4744

4845
export interface CreateOidcCredentialOffer {
4946
// e.g. "abc-gov"
50-
// signerMethod: SignerMethodOption; // only option selector
5147
authenticationType: AuthenticationType; // only option selector
5248
credentials: CredentialRequest[]; // one or more credentials
5349
}

apps/oid4vc-issuance/interfaces/oid4vc-template.interfaces.ts

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,5 @@
11
import { Prisma, SignerOption } from '@prisma/client';
22
import { CredentialFormat } from '@credebl/enum/enum';
3-
4-
// export interface CredentialAttribute {
5-
// mandatory?: boolean;
6-
// value_type: string;
7-
// display?: Display[];
8-
// }
9-
103
export interface SdJwtTemplate {
114
vct: string;
125
attributes: CredentialAttribute[];
@@ -23,15 +16,11 @@ export interface MdocTemplate {
2316
export interface CreateCredentialTemplate {
2417
name: string;
2518
description?: string;
26-
signerOption?: SignerOption; //SignerOption;
19+
signerOption?: SignerOption;
2720
format: CredentialFormat;
2821
canBeRevoked: boolean;
29-
// attributes: Prisma.JsonValue;
3022
appearance?: Prisma.JsonValue;
3123
issuerId: string;
32-
// vct?: string;
33-
// doctype?: string;
34-
3524
template: SdJwtTemplate | MdocTemplate;
3625
}
3726

0 commit comments

Comments
 (0)