-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from LacunaSoftware/feature/issue-software-cert…
…ificate Consuming new certificate API
- Loading branch information
Showing
5 changed files
with
232 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
'use strict'; | ||
|
||
class IssueSoftwareCertificateRequest{ | ||
|
||
constructor({ orderId, password, keySize } = {}) { | ||
this._orderId = orderId || null; | ||
this._password = password || null; | ||
this._keySize = keySize || null; | ||
} | ||
|
||
//region "orderId" Accessors | ||
|
||
|
||
get orderId() { | ||
return this._orderId; | ||
} | ||
|
||
|
||
set orderId(value) { | ||
this._orderId = value; | ||
} | ||
|
||
//endregion | ||
|
||
//region "password" Accessors | ||
|
||
|
||
get password() { | ||
return this._password; | ||
} | ||
|
||
|
||
set password(value) { | ||
this._password = value; | ||
} | ||
|
||
//endregion | ||
|
||
//region "keySize" Accessors | ||
|
||
|
||
get keySize() { | ||
return this._keySize; | ||
} | ||
|
||
|
||
set keySize(value) { | ||
this._keySize = value; | ||
} | ||
|
||
//endregion | ||
|
||
toModel() { | ||
return { | ||
orderId: this._orderId || '00000000-0000-0000-0000-000000000000', | ||
password: this._password, | ||
keySize: this._keySize || 2048 | ||
}; | ||
} | ||
} | ||
exports.IssueSoftwareCertificateRequest = IssueSoftwareCertificateRequest; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
'use strict'; | ||
|
||
class IssueSoftwareCertificateResponse { | ||
|
||
constructor({ model, | ||
certificateDer, | ||
certificatePem, | ||
publicKeyDer, | ||
publicKeyPem, | ||
privateKeyPkcs8Der, | ||
privateKeyPkcs8Pem } = {}) { | ||
this._model = model || null; | ||
this._certificateDer = certificateDer || null; | ||
this._certificatePem = certificatePem || null; | ||
this._publicKeyDer = publicKeyDer || null; | ||
this._publicKeyPem = publicKeyPem || null; | ||
this._privateKeyPkcs8Der = privateKeyPkcs8Der || null; | ||
this._privateKeyPkcs8Pem = privateKeyPkcs8Pem || null; | ||
} | ||
|
||
//endregion | ||
|
||
//region "model" Accessors | ||
|
||
|
||
get model() { | ||
return this._model; | ||
} | ||
|
||
|
||
set model(value) { | ||
this._model = value; | ||
} | ||
|
||
//endregion | ||
|
||
//endregion | ||
|
||
//region "certificateDer" Accessors | ||
|
||
|
||
get certificateDer() { | ||
return this._certificateDer; | ||
} | ||
|
||
|
||
set certificateDer(value) { | ||
this._certificateDer = value; | ||
} | ||
|
||
//endregion | ||
|
||
//region "certificatePem" Accessors | ||
|
||
|
||
|
||
get certificatePem() { | ||
return this._certificatePem; | ||
} | ||
|
||
|
||
set certificatePem(value) { | ||
this._certificatePem = value; | ||
} | ||
|
||
//endregion | ||
|
||
//region "publicKeyDer" Accessors | ||
|
||
|
||
get publicKeyDer() { | ||
return this._publicKeyDer; | ||
} | ||
|
||
|
||
set publicKeyDer(value) { | ||
this._publicKeyDer = value; | ||
} | ||
|
||
//endregion | ||
|
||
//region "publicKeyPem" Accessors | ||
|
||
|
||
get publicKeyPem() { | ||
return this._publicKeyPem; | ||
} | ||
|
||
|
||
set publicKeyPem(value) { | ||
this._publicKeyPem = value; | ||
} | ||
|
||
//endregion | ||
|
||
//region "privateKeyPkcs8Der" Accessors | ||
|
||
get privateKeyPkcs8Der() { | ||
return this._privateKeyPkcs8Der; | ||
} | ||
|
||
|
||
set privateKeyPkcs8Der(value) { | ||
this._privateKeyPkcs8Der = value; | ||
} | ||
|
||
//endregion | ||
|
||
//region "privateKeyPkcs8Pem" Accessors | ||
|
||
|
||
|
||
get privateKeyPkcs8Pem() { | ||
return this._privateKeyPkcs8Pem; | ||
} | ||
|
||
|
||
|
||
set privateKeyPkcs8Pem(value) { | ||
this._privateKeyPkcs8Pem = value; | ||
} | ||
|
||
toModel() { | ||
return { | ||
model: this._model, | ||
certificateDer: this._certificateDer, | ||
certificatePem: this._certificatePem, | ||
publicKeyDer: this._publicKeyDer, | ||
publicKeyPem: this._publicKeyPem, | ||
privateKeyPkcs8Der: this._privateKeyPkcs8Der, | ||
privateKeyPkcs8Pem: this._privateKeyPkcs8Pem, | ||
}; | ||
} | ||
} | ||
|
||
exports.IssueSoftwareCertificateResponse = IssueSoftwareCertificateResponse; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters