Skip to content

Commit

Permalink
Use one init for oauth 2 #585
Browse files Browse the repository at this point in the history
  • Loading branch information
phimage authored and e-marchand committed Apr 30, 2020
1 parent 0a5d252 commit fde7795
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions Sources/OAuth2Swift.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,9 @@ open class OAuth2Swift: OAuthSwift {
var codeVerifier: String?

// MARK: init
public convenience init(consumerKey: String, consumerSecret: String, authorizeUrl: URLConvertible, accessTokenUrl: URLConvertible, responseType: String) {
self.init(consumerKey: consumerKey, consumerSecret: consumerSecret, authorizeUrl: authorizeUrl, responseType: responseType)
self.accessTokenUrl = accessTokenUrl.string
}

public convenience init(consumerKey: String, consumerSecret: String, authorizeUrl: URLConvertible, accessTokenUrl: URLConvertible, responseType: String, contentType: String) {
self.init(consumerKey: consumerKey, consumerSecret: consumerSecret, authorizeUrl: authorizeUrl, responseType: responseType)
self.accessTokenUrl = accessTokenUrl.string
public init(consumerKey: String, consumerSecret: String, authorizeUrl: URLConvertible, accessTokenUrl: URLConvertible? = nil, responseType: String, contentType: String? = nil) {
self.accessTokenUrl = accessTokenUrl?.string
self.contentType = contentType
}

public init(consumerKey: String, consumerSecret: String, authorizeUrl: URLConvertible, responseType: String) {
self.consumerKey = consumerKey
self.consumerSecret = consumerSecret
self.authorizeUrl = authorizeUrl.string
Expand Down

0 comments on commit fde7795

Please sign in to comment.