@@ -21,29 +21,23 @@ public struct ParseSpotify<AuthenticatedUser: ParseUser>: ParseAuthentication {
21
21
enum AuthenticationKeys : String , Codable {
22
22
case id
23
23
case accessToken = " access_token "
24
- case clientId = " client_id "
25
24
case expirationDate = " expiration_date "
26
25
case refreshToken = " refresh_token "
27
26
/// Properly makes an authData dictionary with the required keys.
28
27
/// - parameter id: Required id for the user.
29
28
/// - parameter accessToken: Required access token for Spotify.
30
- /// - parameter clientId: Optional client id for Spotify.
31
29
/// - parameter expiresIn: Optional expiration in seconds for Spotify.
32
30
/// - parameter refreshToken: Optional refresh token for Spotify.
33
31
/// - returns: authData dictionary.
34
32
func makeDictionary( id: String ,
35
33
accessToken: String ,
36
- clientId: String ? = nil ,
37
34
expiresIn: Int ? = nil ,
38
35
refreshToken: String ? = nil ) -> [ String : String ] {
39
36
40
37
var returnDictionary = [
41
38
AuthenticationKeys . id. rawValue: id,
42
39
AuthenticationKeys . accessToken. rawValue: accessToken
43
40
]
44
- if let clientId = clientId {
45
- returnDictionary [ AuthenticationKeys . clientId. rawValue] = clientId
46
- }
47
41
if let expiresIn = expiresIn,
48
42
let expirationDate = Calendar . current. date ( byAdding: . second,
49
43
value: expiresIn,
@@ -83,7 +77,6 @@ public extension ParseSpotify {
83
77
Login a `ParseUser` *asynchronously* using Spotify authentication.
84
78
- parameter id: The **Spotify profile id** from **Spotify**.
85
79
- parameter accessToken: Required **access_token** from **Spotify**.
86
- - parameter clientId: Optional **client_id** from **Spotify**.
87
80
- parameter expiresIn: Optional **expires_in** in seconds from **Spotify**.
88
81
- parameter refreshToken: Optional **refresh_token** from **Spotify**.
89
82
- parameter options: A set of header options sent to the server. Defaults to an empty set.
@@ -92,7 +85,6 @@ public extension ParseSpotify {
92
85
*/
93
86
func login( id: String ,
94
87
accessToken: String ,
95
- clientId: String ? = nil ,
96
88
expiresIn: Int ? = nil ,
97
89
refreshToken: String ? = nil ,
98
90
options: API . Options = [ ] ,
@@ -102,7 +94,6 @@ public extension ParseSpotify {
102
94
let spotifyAuthData = AuthenticationKeys . id
103
95
. makeDictionary ( id: id,
104
96
accessToken: accessToken,
105
- clientId: clientId,
106
97
expiresIn: expiresIn,
107
98
refreshToken: refreshToken)
108
99
login ( authData: spotifyAuthData,
@@ -137,7 +128,6 @@ public extension ParseSpotify {
137
128
Link the *current* `ParseUser` *asynchronously* using Spotify authentication.
138
129
- parameter id: The **Spotify profile id** from **Spotify**.
139
130
- parameter accessToken: Required **access_token** from **Spotify**.
140
- - parameter clientId: Optional **client_id** from **Spotify**.
141
131
- parameter expiresIn: Optional **expires_in** in seconds from **Spotify**.
142
132
- parameter refreshToken: Optional **refresh_token** from **Spotify**.
143
133
- parameter options: A set of header options sent to the server. Defaults to an empty set.
@@ -146,7 +136,6 @@ public extension ParseSpotify {
146
136
*/
147
137
func link( id: String ,
148
138
accessToken: String ,
149
- clientId: String ? = nil ,
150
139
expiresIn: Int ? = nil ,
151
140
refreshToken: String ? = nil ,
152
141
options: API . Options = [ ] ,
@@ -155,7 +144,6 @@ public extension ParseSpotify {
155
144
let spotifyAuthData = AuthenticationKeys . id
156
145
. makeDictionary ( id: id,
157
146
accessToken: accessToken,
158
- clientId: clientId,
159
147
expiresIn: expiresIn,
160
148
refreshToken: refreshToken)
161
149
link ( authData: spotifyAuthData,
0 commit comments