Skip to content

Commit 507a6d1

Browse files
committed
Keys
1 parent df57f3c commit 507a6d1

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

Sources/LiveKit/Auth/TokenSource.swift

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
import Foundation
1818

19-
#warning("Fix camel case after deploying backend")
20-
2119
// MARK: - Token
2220

2321
/// `Token` represent the credentials needed for connecting to a new Room.
@@ -40,14 +38,14 @@ public enum Token {
4038
/// - SeeAlso: [Room Configuration Documentation](https://docs.livekit.io/home/get-started/authentication/#room-configuration) for more info.
4139
public let roomConfiguration: RoomConfiguration?
4240

43-
// enum CodingKeys: String, CodingKey {
44-
// case roomName = "room_name"
45-
// case participantName = "participant_name"
46-
// case participantIdentity = "participant_identity"
47-
// case participantMetadata = "participant_metadata"
48-
// case participantAttributes = "participant_attributes"
49-
// case roomConfiguration = "room_configuration"
50-
// }
41+
enum CodingKeys: String, CodingKey {
42+
case roomName = "room_name"
43+
case participantName = "participant_name"
44+
case participantIdentity = "participant_identity"
45+
case participantMetadata = "participant_metadata"
46+
case participantAttributes = "participant_attributes"
47+
case roomConfiguration = "room_configuration"
48+
}
5149

5250
public init(
5351
roomName: String? = nil,
@@ -74,8 +72,8 @@ public enum Token {
7472
public let participantToken: String
7573

7674
enum CodingKeys: String, CodingKey {
77-
case serverURL = "serverUrl"
78-
case participantToken
75+
case serverURL = "server_url"
76+
case participantToken = "participant_token"
7977
}
8078

8179
public init(serverURL: URL, participantToken: String) {

0 commit comments

Comments
 (0)