Modern Apps git

xtool.git

Public
git clone https://git.maproj.org/xtool.git
appstore-distribution ▾

xtool.git / Sources / XKit / GrandSlam / Requests / Concrete / GrandSlamAuthCompleteRequest.swift

GrandSlamAuthCompleteRequest.swift41 lines · 857 BRaw
1//
2// GrandSlamAuthCompleteRequest.swift
3// XKit
4//
5// Created by Kabir Oberai on 19/11/19.
6// Copyright © 2019 Kabir Oberai. All rights reserved.
7//
8
9import Foundation
10
11struct GrandSlamAuthCompleteRequest: GrandSlamOperationRequest {
12
13 typealias Decoder = GrandSlamOperationDecoder<Value>
14 struct Value: Decodable {
15 let hamk: Data
16 let encryptedResponse: Data
17 let negProto: Data
18 let sc: Data?
19
20 private enum CodingKeys: String, CodingKey {
21 case hamk = "M2"
22 case encryptedResponse = "spd"
23 case negProto = "np"
24 case sc
25 }
26 }
27
28 static let operation = "complete"
29
30 let username: String
31 let cookie: String
32 let m1Data: Data
33
34 var parameters: [String: Any] {
35 [
36 "c": cookie,
37 "M1": m1Data,
38 ]
39 }
40
41}