-
Notifications
You must be signed in to change notification settings - Fork 12
feat:[HL-76] create FirebaseLoginRequest 🍕 #97
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from 1 commit
0b561b2
91e5942
57db81a
f0d347f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,39 @@ | ||||||||||||||||||||||||||||||||||||||
| import Foundation | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| // MARK: - FirebaseLoginResponse | ||||||||||||||||||||||||||||||||||||||
| public struct FirebaseLoginResponse: Codable { | ||||||||||||||||||||||||||||||||||||||
| let kind, localID, email, displayName: String | ||||||||||||||||||||||||||||||||||||||
| let idToken: String | ||||||||||||||||||||||||||||||||||||||
| let registered: Bool | ||||||||||||||||||||||||||||||||||||||
| let refreshToken, expiresIn: String | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| // MARK: - FirebaseLoginRequest | ||||||||||||||||||||||||||||||||||||||
| public struct FirebaseLoginRequest: RequestType { | ||||||||||||||||||||||||||||||||||||||
|
Comment on lines
+4
to
+12
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||||||||||||||||||||||||||
| public typealias ResponseType = FirebaseLoginResponse | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| private let email: String | ||||||||||||||||||||||||||||||||||||||
| private let password: String | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| public init(email: String, password: String) { | ||||||||||||||||||||||||||||||||||||||
| self.email = email | ||||||||||||||||||||||||||||||||||||||
| self.password = password | ||||||||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| public var baseUrl: URL { Constants.firebaseAuth } | ||||||||||||||||||||||||||||||||||||||
| public var path: String { "AIzaSyB0UczrurqM1STyI8tvx4QZVTyQVw4UJ7Q" } | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| public var method: String = "POST" | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| public var method: String = "POST" | |
| public var method: String { "POST" } |
or
| public var method: String = "POST" | |
| public let method: String = "POST" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
expiresIn should be converted to
Date