Skip to content
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

feat: Add OTP authenticator support #149

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 21 additions & 1 deletion ParseSwift.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
7004C24D25B69207005E0AD9 /* ParseRoleTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7004C22D25B69077005E0AD9 /* ParseRoleTests.swift */; };
700A8A662B4CC1E40087ADBE /* ParsePointerable+async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 700A8A652B4CC1E40087ADBE /* ParsePointerable+async.swift */; };
700A8A682B4CC2700087ADBE /* ParsePointerable+combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 700A8A672B4CC2700087ADBE /* ParsePointerable+combine.swift */; };
700A8A6B2B51EBB10087ADBE /* ParseOTP.swift in Sources */ = {isa = PBXBuildFile; fileRef = 700A8A6A2B51EBB10087ADBE /* ParseOTP.swift */; };
700A8A6D2B51EBC20087ADBE /* ParseOTP+async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 700A8A6C2B51EBC20087ADBE /* ParseOTP+async.swift */; };
700A8A6F2B51EBE10087ADBE /* ParseOTP+combine.swift in Sources */ = {isa = PBXBuildFile; fileRef = 700A8A6E2B51EBE10087ADBE /* ParseOTP+combine.swift */; };
700AFE03289C3508006C1CD9 /* ParseQueryCacheTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 700AFE02289C3508006C1CD9 /* ParseQueryCacheTests.swift */; };
70110D52250680140091CC1D /* ParseConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70110D51250680140091CC1D /* ParseConstants.swift */; };
70110D572506CE890091CC1D /* BaseParseInstallation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70110D562506CE890091CC1D /* BaseParseInstallation.swift */; };
Expand Down Expand Up @@ -370,6 +373,9 @@
7004C22D25B69077005E0AD9 /* ParseRoleTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseRoleTests.swift; sourceTree = "<group>"; };
700A8A652B4CC1E40087ADBE /* ParsePointerable+async.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ParsePointerable+async.swift"; sourceTree = "<group>"; };
700A8A672B4CC2700087ADBE /* ParsePointerable+combine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ParsePointerable+combine.swift"; sourceTree = "<group>"; };
700A8A6A2B51EBB10087ADBE /* ParseOTP.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseOTP.swift; sourceTree = "<group>"; };
700A8A6C2B51EBC20087ADBE /* ParseOTP+async.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ParseOTP+async.swift"; sourceTree = "<group>"; };
700A8A6E2B51EBE10087ADBE /* ParseOTP+combine.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "ParseOTP+combine.swift"; sourceTree = "<group>"; };
700AFE02289C3508006C1CD9 /* ParseQueryCacheTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseQueryCacheTests.swift; sourceTree = "<group>"; };
70110D51250680140091CC1D /* ParseConstants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ParseConstants.swift; sourceTree = "<group>"; };
70110D562506CE890091CC1D /* BaseParseInstallation.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BaseParseInstallation.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -906,6 +912,16 @@
path = Protocols;
sourceTree = "<group>";
};
700A8A692B51EA8F0087ADBE /* ParseOTP */ = {
isa = PBXGroup;
children = (
700A8A6A2B51EBB10087ADBE /* ParseOTP.swift */,
700A8A6C2B51EBC20087ADBE /* ParseOTP+async.swift */,
700A8A6E2B51EBE10087ADBE /* ParseOTP+combine.swift */,
);
path = ParseOTP;
sourceTree = "<group>";
};
70110D5D250849B30091CC1D /* InternalObjects */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -1116,13 +1132,14 @@
70A2D81325B358FA001BEB7D /* 3rd Party */ = {
isa = PBXGroup;
children = (
7C4C0929285E745400F202C6 /* ParseInstagram */,
703B096126BF484E005A112F /* ParseApple */,
703B096426BF4896005A112F /* ParseFacebook */,
70F03A312780C7DD00E5AFB4 /* ParseGithub */,
70F03A212780B8D000E5AFB4 /* ParseGoogle */,
7C4C0929285E745400F202C6 /* ParseInstagram */,
703B096226BF486C005A112F /* ParseLDAP */,
70F03A322780C7EB00E5AFB4 /* ParseLinkedIn */,
700A8A692B51EA8F0087ADBE /* ParseOTP */,
7C55F9E52860CD48002A352D /* ParseSpotify */,
703B096326BF487E005A112F /* ParseTwitter */,
);
Expand Down Expand Up @@ -1533,6 +1550,7 @@
70B412B929801B8B00F706EA /* ParseHookTriggerRequestable.swift in Sources */,
F97B465F24D9C7B500F4A88B /* KeychainStore.swift in Sources */,
70B4E0C12762F313004C9757 /* QueryWhere.swift in Sources */,
700A8A6B2B51EBB10087ADBE /* ParseOTP.swift in Sources */,
70170A442656B02D0070C905 /* ParseAnalytics.swift in Sources */,
70110D52250680140091CC1D /* ParseConstants.swift in Sources */,
91B79AC326EE3A4E00073F2C /* API+NonParseBodyCommand.swift in Sources */,
Expand Down Expand Up @@ -1560,6 +1578,7 @@
7C4C093A285E9A3700F202C6 /* ParseInstagram+combine.swift in Sources */,
700395A325A119430052CB31 /* Operations.swift in Sources */,
91BB8FCF2690BA70005A6BA5 /* QueryObservable.swift in Sources */,
700A8A6D2B51EBC20087ADBE /* ParseOTP+async.swift in Sources */,
70F03A232780BDE200E5AFB4 /* ParseGoogle.swift in Sources */,
705025E628514F36008D6624 /* ParsePushPayloadAny.swift in Sources */,
709A148228395ED100BF85E5 /* ParseSchema+async.swift in Sources */,
Expand Down Expand Up @@ -1674,6 +1693,7 @@
70D41D8028B520E200613510 /* ParseKeychainAccessGroup.swift in Sources */,
70385E762858E1000084D306 /* ParseHookFunctionable.swift in Sources */,
703B095326BF47FD005A112F /* ParseTwitter+async.swift in Sources */,
700A8A6F2B51EBE10087ADBE /* ParseOTP+combine.swift in Sources */,
7051E2E22986F10D00ABFC7E /* SocketTasks.swift in Sources */,
70CE0ABC285F8FF900DAEA86 /* ParseTypeable.swift in Sources */,
70BC9890252A5B5C00FF3074 /* Objectable.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public extension ParseGitHub {
// MARK: Async/Await

/**
Login a `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Login a `ParseUser` *asynchronously* using GitHub authentication for login.
- parameter id: The **id** from **GitHub**.
- parameter accessToken: Required **access_token** from **GitHub**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand All @@ -31,7 +31,7 @@ public extension ParseGitHub {
}

/**
Login a `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Login a `ParseUser` *asynchronously* using GitHub authentication for login.
- parameter authData: Dictionary containing key/values.
- returns: An instance of the logged in `ParseUser`.
- throws: An error of type `ParseError`.
Expand All @@ -49,7 +49,7 @@ public extension ParseGitHub {
public extension ParseGitHub {

/**
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for login.
- parameter id: The **id** from **GitHub**.
- parameter accessToken: Required **access_token** from **GitHub**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand All @@ -68,7 +68,7 @@ public extension ParseGitHub {
}

/**
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for login.
- parameter authData: Dictionary containing key/values.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: An instance of the logged in `ParseUser`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Combine
public extension ParseGitHub {
// MARK: Combine
/**
Login a `ParseUser` *asynchronously* using GitHub authentication for graph API login. Publishes when complete.
Login a `ParseUser` *asynchronously* using GitHub authentication for login. Publishes when complete.
- parameter id: The **id** from **GitHub**.
- parameter accessToken: Required **access_token** from **GitHub**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand All @@ -31,7 +31,7 @@ public extension ParseGitHub {
}

/**
Login a `ParseUser` *asynchronously* using GitHub authentication for graph API login. Publishes when complete.
Login a `ParseUser` *asynchronously* using GitHub authentication for login. Publishes when complete.
- parameter authData: Dictionary containing key/values.
- returns: A publisher that eventually produces a single value and then finishes or fails.
*/
Expand All @@ -47,7 +47,7 @@ public extension ParseGitHub {

public extension ParseGitHub {
/**
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for login.
Publishes when complete.
- parameter id: The **id** from **GitHub**.
- parameter accessToken: Required **access_token** from **GitHub**.
Expand All @@ -66,7 +66,7 @@ public extension ParseGitHub {
}

/**
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for login.
Publishes when complete.
- parameter authData: Dictionary containing key/values.
- returns: A publisher that eventually produces a single value and then finishes or fails.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public struct ParseGitHub<AuthenticatedUser: ParseUser>: ParseAuthentication {
public extension ParseGitHub {

/**
Login a `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Login a `ParseUser` *asynchronously* using GitHub authentication for login.
- parameter id: The `GitHub id` from **GitHub**.
- parameter accessToken: Required **access_token** from **GitHub**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand Down Expand Up @@ -104,7 +104,7 @@ public extension ParseGitHub {
public extension ParseGitHub {

/**
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using GitHub authentication for login.
- parameter id: The **id** from **GitHub**.
- parameter accessToken: Required **access_token** from **GitHub**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public extension ParseGoogle {
// MARK: Async/Await

/**
Login a `ParseUser` *asynchronously* using Google authentication for graph API login.
Login a `ParseUser` *asynchronously* using Google authentication for login.
- parameter id: The **id** from **Google**.
- parameter idToken: Optional **id_token** from **Google**.
- parameter accessToken: Optional **access_token** from **Google**.
Expand All @@ -34,7 +34,7 @@ public extension ParseGoogle {
}

/**
Login a `ParseUser` *asynchronously* using Google authentication for graph API login.
Login a `ParseUser` *asynchronously* using Google authentication for login.
- parameter authData: Dictionary containing key/values.
- returns: An instance of the logged in `ParseUser`.
- throws: An error of type `ParseError`.
Expand All @@ -52,7 +52,7 @@ public extension ParseGoogle {
public extension ParseGoogle {

/**
Link the *current* `ParseUser` *asynchronously* using Google authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using Google authentication for login.
- parameter id: The **id** from **Google**.
- parameter idToken: Optional **id_token** from **Google**.
- parameter accessToken: Optional **access_token** from **Google**.
Expand All @@ -74,7 +74,7 @@ public extension ParseGoogle {
}

/**
Link the *current* `ParseUser` *asynchronously* using Google authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using Google authentication for login.
- parameter authData: Dictionary containing key/values.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: An instance of the logged in `ParseUser`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Combine
public extension ParseGoogle {
// MARK: Combine
/**
Login a `ParseUser` *asynchronously* using Google authentication for graph API login. Publishes when complete.
Login a `ParseUser` *asynchronously* using Google authentication for login. Publishes when complete.
- parameter id: The **id** from **Google**.
- parameter idToken: Optional **id_token** from **Google**.
- parameter accessToken: Optional **access_token** from **Google**.
Expand All @@ -34,7 +34,7 @@ public extension ParseGoogle {
}

/**
Login a `ParseUser` *asynchronously* using Google authentication for graph API login. Publishes when complete.
Login a `ParseUser` *asynchronously* using Google authentication for login. Publishes when complete.
- parameter authData: Dictionary containing key/values.
- returns: A publisher that eventually produces a single value and then finishes or fails.
*/
Expand All @@ -50,7 +50,7 @@ public extension ParseGoogle {

public extension ParseGoogle {
/**
Link the *current* `ParseUser` *asynchronously* using Google authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using Google authentication for login.
Publishes when complete.
- parameter id: The **id** from **Google**.
- parameter idToken: Optional **id_token** from **Google**.
Expand All @@ -72,7 +72,7 @@ public extension ParseGoogle {
}

/**
Link the *current* `ParseUser` *asynchronously* using Google authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using Google authentication for login.
Publishes when complete.
- parameter authData: Dictionary containing key/values.
- returns: A publisher that eventually produces a single value and then finishes or fails.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public struct ParseGoogle<AuthenticatedUser: ParseUser>: ParseAuthentication {
public extension ParseGoogle {

/**
Login a `ParseUser` *asynchronously* using Google authentication for graph API login.
Login a `ParseUser` *asynchronously* using Google authentication for login.
- parameter id: The `id` from **Google**.
- parameter idToken: Optional **id_token** from **Google**.
- parameter accessToken: Optional **access_token** from **Google**.
Expand Down Expand Up @@ -116,7 +116,7 @@ public extension ParseGoogle {
public extension ParseGoogle {

/**
Link the *current* `ParseUser` *asynchronously* using Google authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using Google authentication for login.
- parameter id: The **id** from **Google**.
- parameter idToken: Optional **id_token** from **Google**.
- parameter accessToken: Optional **access_token** from **Google**.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public extension ParseLinkedIn {
// MARK: Async/Await

/**
Login a `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Login a `ParseUser` *asynchronously* using LinkedIn authentication for login.
- parameter id: The **id** from **LinkedIn**.
- parameter accessToken: Required **access_token** from **LinkedIn**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand All @@ -33,7 +33,7 @@ public extension ParseLinkedIn {
}

/**
Login a `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Login a `ParseUser` *asynchronously* using LinkedIn authentication for login.
- parameter authData: Dictionary containing key/values.
- returns: An instance of the logged in `ParseUser`.
- throws: An error of type `ParseError`.
Expand All @@ -51,7 +51,7 @@ public extension ParseLinkedIn {
public extension ParseLinkedIn {

/**
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for login.
- parameter id: The **id** from **LinkedIn**.
- parameter accessToken: Required **access_token** from **LinkedIn**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand All @@ -72,7 +72,7 @@ public extension ParseLinkedIn {
}

/**
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for login.
- parameter authData: Dictionary containing key/values.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
- returns: An instance of the logged in `ParseUser`.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import Combine
public extension ParseLinkedIn {
// MARK: Combine
/**
Login a `ParseUser` *asynchronously* using LinkedIn authentication for graph API login. Publishes when complete.
Login a `ParseUser` *asynchronously* using LinkedIn authentication for login. Publishes when complete.
- parameter id: The **id** from **LinkedIn**.
- parameter accessToken: Required **access_token** from **LinkedIn**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand All @@ -33,7 +33,7 @@ public extension ParseLinkedIn {
}

/**
Login a `ParseUser` *asynchronously* using LinkedIn authentication for graph API login. Publishes when complete.
Login a `ParseUser` *asynchronously* using LinkedIn authentication for login. Publishes when complete.
- parameter authData: Dictionary containing key/values.
- returns: A publisher that eventually produces a single value and then finishes or fails.
*/
Expand All @@ -49,7 +49,7 @@ public extension ParseLinkedIn {

public extension ParseLinkedIn {
/**
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for login.
Publishes when complete.
- parameter id: The **id** from **LinkedIn**.
- parameter accessToken: Required **access_token** from **LinkedIn**.
Expand All @@ -70,7 +70,7 @@ public extension ParseLinkedIn {
}

/**
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for login.
Publishes when complete.
- parameter authData: Dictionary containing key/values.
- returns: A publisher that eventually produces a single value and then finishes or fails.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public struct ParseLinkedIn<AuthenticatedUser: ParseUser>: ParseAuthentication {
public extension ParseLinkedIn {

/**
Login a `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Login a `ParseUser` *asynchronously* using LinkedIn authentication for login.
- parameter id: The `LinkedIn id` from **LinkedIn**.
- parameter accessToken: Required **access_token** from **LinkedIn**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand Down Expand Up @@ -110,7 +110,7 @@ public extension ParseLinkedIn {
public extension ParseLinkedIn {

/**
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for graph API login.
Link the *current* `ParseUser` *asynchronously* using LinkedIn authentication for login.
- parameter id: The **id** from **LinkedIn**.
- parameter accessToken: Required **access_token** from **LinkedIn**.
- parameter options: A set of header options sent to the server. Defaults to an empty set.
Expand Down
Loading
Loading