Skip to content

Commit

Permalink
Swift 5.7 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mw99 committed Aug 25, 2022
1 parent 2b14d3c commit 67ffdff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion OhhAuth.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "OhhAuth"
s.version = "1.1.0"
s.version = "1.2.0"
s.summary = "Pure Swift implementation of the OAuth 1.0 protocol as an easy to use extension for the URLRequest type. (RFC-5849)"
s.authors = "Markus Wanke"
s.homepage = "https://github.com/mw99/OhhAuth"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ let task = URLSession(configuration: .ephemeral).dataTask(with: req) { (data, re
print(error)
}
else if let data = data {
print(String(data: data, encoding: .utf8) ?? "Does not look like a utf8 response :(")
print(String(data: data, encoding: .utf8) ?? "Does not look like an utf8 response :(")
}
}
task.resume()
Expand Down
6 changes: 3 additions & 3 deletions Sources/OhhAuth.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

import Foundation

public class OhhAuth
open class OhhAuth
{
/// Tuple to represent signing credentials. (consumer as well as user credentials)
public typealias Credentials = (key: String, secret: String)
Expand All @@ -41,7 +41,7 @@ public class OhhAuth
/// - userCredentials: user credentials (nil if this is a request without user association)
///
/// - Returns: OAuth HTTP header entry for the Authorization field.
static func calculateSignature(url: URL, method: String, parameter: [String: String],
public static func calculateSignature(url: URL, method: String, parameter: [String: String],
consumerCredentials cc: Credentials, userCredentials uc: Credentials?) -> String
{
typealias Tup = (key: String, value: String)
Expand Down Expand Up @@ -99,7 +99,7 @@ public class OhhAuth
/// - Parameter paras: url-form parameters
/// - Parameter encoding: used string encoding (default: .utf8)
/// - Returns: correctly percentage encoded url-form parameters
static func httpBody(forFormParameters paras: [String: String], encoding: String.Encoding = .utf8) -> Data?
public static func httpBody(forFormParameters paras: [String: String], encoding: String.Encoding = .utf8) -> Data?
{
let trans: (String, String) -> String = { k, v in
return rfc3986encode(k) + "=" + rfc3986encode(v)
Expand Down

0 comments on commit 67ffdff

Please sign in to comment.