From d2c466e85775a0d2aaaf23c1298e093535c946a9 Mon Sep 17 00:00:00 2001 From: Emilie Balland Date: Tue, 12 Feb 2019 13:21:20 +0100 Subject: [PATCH] disable https enforcement in debug mode --- Sources/Base/OAuth2AuthRequest.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/Base/OAuth2AuthRequest.swift b/Sources/Base/OAuth2AuthRequest.swift index 5193d5f2..1d28d882 100644 --- a/Sources/Base/OAuth2AuthRequest.swift +++ b/Sources/Base/OAuth2AuthRequest.swift @@ -145,7 +145,7 @@ open class OAuth2AuthRequest { */ func asURLComponents() throws -> URLComponents { let comp = URLComponents(url: url, resolvingAgainstBaseURL: false) - guard var components = comp, "https" == components.scheme else { + guard var components = comp, _isDebugAssertConfiguration() || "https" == components.scheme else { throw OAuth2Error.notUsingTLS } if .GET == method && params.count > 0 {