Skip to content

Commit fd72a87

Browse files
authored
Update authenication endpoint sparodev#20 (sparodev#21)
- Removed stub patient. - Fix oauth parameter keys' values.
1 parent 80e6037 commit fd72a87

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

WingKit/Classes/Client/Client.swift

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ public struct OAuthCredentials {
3030
}
3131

3232
internal struct OAuthParameterKeys {
33-
static let id = "id"
34-
static let secret = "secret"
33+
static let id = "clientId"
34+
static let secret = "clientSecret"
3535
}
3636

3737
/// The `ClientError` enum describes domain specific errors for the `Client` class.
@@ -49,7 +49,7 @@ internal enum AuthenticationEndpoint: Endpoint {
4949

5050
var path: String {
5151
switch self {
52-
case .authenticate: return "/authenticate"
52+
case .authenticate: return "/accounts/login"
5353
}
5454
}
5555

@@ -75,7 +75,7 @@ public class Client {
7575

7676
// MARK: - Properties
7777

78-
internal let baseURLPath = "https://api-development.mywing.io/api/v2"
78+
internal let baseURLPath = "https://3rd-party-api.mywing.io/v2"
7979

8080
/**
8181
The OAuth credentials assigned to your application to access the Wing API. Used to authenticate with the Wing API

WingKit/Classes/Test Session/Client+TestSession.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ internal enum TestSessionEndpoint: Endpoint {
1515

1616
var path: String {
1717
switch self {
18-
case .create: return "/patients/5yEwdO6MVR8ZA/test-sessions"
18+
case .create: return "/test-sessions"
1919
case .retrieve(let patientId, let sessionId): return "/patients/\(patientId)/test-sessions/\(sessionId)"
2020
}
2121
}

WingKitTests/ClientTest.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class ClientTest: WingKitTestCase {
3535
}
3636

3737
func testAuthenticationEndpointPath() {
38-
XCTAssertEqual(AuthenticationEndpoint.authenticate.path, "/authenticate")
38+
XCTAssertEqual(AuthenticationEndpoint.authenticate.path, "/accounts/login")
3939
}
4040

4141
func testAuthenticationEndpointMethod() {

0 commit comments

Comments
 (0)