Skip to content

Commit

Permalink
introduce publicKeyValue method
Browse files Browse the repository at this point in the history
  • Loading branch information
robertd committed Feb 4, 2021
1 parent 8098e49 commit a500b5d
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions packages/@aws-cdk/aws-cloudfront/lib/public-key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export class PublicKey extends Resource implements IPublicKey {
publicKeyConfig: {
name: props.publicKeyName ?? this.generateName(),
callerReference: this.node.addr,
encodedKey: encodedKey.value,
encodedKey: this.publicKeyValue(encodedKey),
comment: props.comment,
},
});
Expand All @@ -80,6 +80,10 @@ export class PublicKey extends Resource implements IPublicKey {
}
return name;
}

private publicKeyValue(key: KeyConfig): string {
return key.value;
}
}

/**
Expand Down Expand Up @@ -115,7 +119,7 @@ export abstract class Key {
}

/**
* Result of binding `Key` into a `PublicKey`.
* Result of binding `Key` into `PublicKey`.
*/
export interface KeyConfig {
/**
Expand Down

0 comments on commit a500b5d

Please sign in to comment.