Skip to content

feat: Add support for client certificates#43

Merged
ianpartridge merged 4 commits intomasterfrom
selfsigned-cert
Dec 19, 2018
Merged

feat: Add support for client certificates#43
ianpartridge merged 4 commits intomasterfrom
selfsigned-cert

Conversation

@ianpartridge
Copy link
Copy Markdown
Contributor

Currently, KituraKit does not support client certificates, or self-signed client certificates. This functionality is available in SwiftyRequest though, so enabling it is a matter of some plumbing.

We add a public struct ClientCertificate to avoid exposing the SwiftyRequest type in the KituraKit public API.

Also update the repo to Swift 4.2.1 and broaden the Travis testing.

/// An initializer to set up a custom KituraKit instance on a specified route using a URL
/// - Parameter baseURL: The custom route KituraKit points to during REST requests.
public init(baseURL: URL) {
public init(baseURL: URL, containsSelfSignedCert: Bool? = false, clientCertificate: ClientCertificate? = nil) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is containsSelfSignedCert an optional? if it is nil it seems to just default to false?

// MARK: Initializers

/// An initializer to set up a custom KituraKit instance on a specified route using a URL
/// - Parameter baseURL: The custom route KituraKit points to during REST requests.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add jazzy docs comments for the new init parameters?

Copy link
Copy Markdown
Contributor

@Andrew-Lees11 Andrew-Lees11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ianpartridge ianpartridge merged commit f3ce552 into master Dec 19, 2018
@ianpartridge ianpartridge deleted the selfsigned-cert branch December 19, 2018 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants