2021-12-08 02:58:02 +00:00
|
|
|
//
|
|
|
|
// ClientRegistration.swift
|
|
|
|
// Fervor
|
|
|
|
//
|
|
|
|
// Created by Shadowfacts on 11/25/21.
|
|
|
|
//
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
|
2022-03-06 20:05:33 +00:00
|
|
|
public struct ClientRegistration: Decodable, Sendable {
|
2021-12-08 02:58:02 +00:00
|
|
|
public let clientID: String
|
|
|
|
public let clientSecret: String
|
|
|
|
|
|
|
|
public init(from decoder: Decoder) throws {
|
|
|
|
let container = try decoder.container(keyedBy: CodingKeys.self)
|
|
|
|
|
|
|
|
self.clientID = try container.decode(String.self, forKey: .clientID)
|
|
|
|
self.clientSecret = try container.decode(String.self, forKey: .clientSecret)
|
|
|
|
}
|
|
|
|
|
|
|
|
private enum CodingKeys: String, CodingKey {
|
|
|
|
case clientID = "client_id"
|
|
|
|
case clientSecret = "client_secret"
|
|
|
|
}
|
|
|
|
}
|