Skip to content

Commit

Permalink
updated vapor/engine and vapor/json
Browse files Browse the repository at this point in the history
  • Loading branch information
Edward Jiang committed Aug 30, 2016
1 parent 4ef792a commit 1dc77e8
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ var package = Package(
dependencies: [.Target(name: "Turnstile")]),
],
dependencies: [
.Package(url: "https://github.com/vapor/engine.git", majorVersion: 0, minor: 6),
.Package(url: "https://github.com/vapor/json.git", majorVersion: 0, minor: 5)
.Package(url: "https://github.com/vapor/engine.git", majorVersion: 0, minor: 7),
.Package(url: "https://github.com/vapor/json.git", majorVersion: 0, minor: 6)
]
)
2 changes: 1 addition & 1 deletion Sources/TurnstileWeb/OAuth2.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public class OAuth2 {
/// The Token Endpoint of the OAuth 2 Server
public let tokenURL: String

let HTTPClient = BasicClient.self
let HTTPClient = TempHTTPClient()


/// Creates the OAuth 2 client
Expand Down
24 changes: 24 additions & 0 deletions Sources/TurnstileWeb/TempHTTPClient.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
//
// HTTPClient.swift
// Turnstile
//
// Created by Edward Jiang on 8/30/16.
//
//

import HTTP
import Transport
import TLS

/// Temp HTTP client until we switch to Foundation
class TempHTTPClient: Responder {
func respond(to request: Request) throws -> Response {
let config = try Config(
context: try Context(mode: .client),
verifyCertificates: false
)
let client = try BasicClient(scheme: request.uri.scheme, host: request.uri.host, port: 443, securityLayer: .tls(config))

return try client.respond(to: request)
}
}
2 changes: 1 addition & 1 deletion Tests/TurnstileWebTests/FacebookTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import URI

class FacebookTests: XCTestCase {
var facebook: Facebook!
let HTTPClient = BasicClient.self
let HTTPClient = TempHTTPClient()

override func setUp() {
let clientID = ProcessInfo.processInfo.environment["FACEBOOK_CLIENT_ID"] ?? ""
Expand Down

0 comments on commit 1dc77e8

Please sign in to comment.