motion-firebase 1.0.9 → 1.0.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +5 -5
- data/lib/firebase/fdata_snapshot.rb +19 -0
- data/lib/firebase/firebase.rb +1 -0
- data/lib/firebase/version.rb +1 -1
- data/lib/firebase-auth/{firebase_auth_client.rb → firebase_simple_login.rb} +2 -2
- data/lib/motion-firebase-auth.rb +5 -2
- data/lib/vendor/FacebookSDK.framework/FacebookSDK.framework.bridgesupport +2646 -0
- data/lib/vendor/Firebase.framework/Firebase +0 -0
- data/lib/vendor/Firebase.framework/Firebase.framework.bridgesupport +552 -0
- data/lib/vendor/Firebase.framework/Versions/A/Firebase +0 -0
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FDataSnapshot.h +4 -4
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FEventType.h +1 -1
- data/lib/vendor/Firebase.framework/Versions/A/Headers/FMutableData.h +9 -4
- data/lib/vendor/Firebase.framework/Versions/A/Headers/Firebase.h +89 -64
- data/lib/vendor/FirebaseSimpleLogin.framework/FirebaseSimpleLogin +0 -0
- data/lib/vendor/FirebaseSimpleLogin.framework/FirebaseSimpleLogin.framework.bridgesupport +154 -0
- data/lib/vendor/FirebaseSimpleLogin.framework/Versions/A/FirebaseSimpleLogin +0 -0
- data/lib/vendor/{FirebaseAuthClient.framework → FirebaseSimpleLogin.framework/Versions/A}/Headers/FATypes.h +4 -2
- data/lib/vendor/{FirebaseAuthClient.framework → FirebaseSimpleLogin.framework/Versions/A}/Headers/FAUser.h +0 -0
- data/lib/vendor/{FirebaseAuthClient.framework/Headers/FirebaseAuthClient.h → FirebaseSimpleLogin.framework/Versions/A/Headers/FirebaseSimpleLogin.h} +5 -4
- data/motion-firebase.gemspec +1 -1
- metadata +63 -86
- data/.gitignore +0 -18
- data/.travis.yml +0 -2
- data/Gemfile +0 -6
- data/Gemfile.lock +0 -28
- data/Rakefile +0 -11
- data/app/app_delegate.rb +0 -156
- data/lib/vendor/Firebase.framework/Headers/FDataSnapshot.h +0 -146
- data/lib/vendor/Firebase.framework/Headers/FEventType.h +0 -43
- data/lib/vendor/Firebase.framework/Headers/FMutableData.h +0 -134
- data/lib/vendor/Firebase.framework/Headers/FQuery.h +0 -229
- data/lib/vendor/Firebase.framework/Headers/FTransactionResult.h +0 -50
- data/lib/vendor/Firebase.framework/Headers/Firebase.h +0 -629
- data/lib/vendor/Firebase.framework/Versions/Current/Firebase +0 -0
- data/lib/vendor/Firebase.framework/Versions/Current/Headers/FDataSnapshot.h +0 -146
- data/lib/vendor/Firebase.framework/Versions/Current/Headers/FEventType.h +0 -43
- data/lib/vendor/Firebase.framework/Versions/Current/Headers/FMutableData.h +0 -134
- data/lib/vendor/Firebase.framework/Versions/Current/Headers/FQuery.h +0 -229
- data/lib/vendor/Firebase.framework/Versions/Current/Headers/FTransactionResult.h +0 -50
- data/lib/vendor/Firebase.framework/Versions/Current/Headers/Firebase.h +0 -629
- data/lib/vendor/FirebaseAuthClient.framework/FirebaseAuthClient +0 -0
- data/lib/vendor/FirebaseAuthClient.framework/Versions/A/FirebaseAuthClient +0 -0
- data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FATypes.h +0 -48
- data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FAUser.h +0 -85
- data/lib/vendor/FirebaseAuthClient.framework/Versions/A/Headers/FirebaseAuthClient.h +0 -149
- data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/FirebaseAuthClient +0 -0
- data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FATypes.h +0 -48
- data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FAUser.h +0 -85
- data/lib/vendor/FirebaseAuthClient.framework/Versions/Current/Headers/FirebaseAuthClient.h +0 -149
- data/resources/Default-568h@2x.png +0 -0
@@ -1,85 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Auth Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#import <Foundation/Foundation.h>
|
30
|
-
#import <Accounts/Accounts.h>
|
31
|
-
#import "FATypes.h"
|
32
|
-
|
33
|
-
|
34
|
-
/**
|
35
|
-
* The FAUser class is a wrapper around the user metadata returned from the Firebase auth server.
|
36
|
-
* It includes a (userId, provider) combo that is unique, as well as the token used to authenticate with Firebase.
|
37
|
-
*
|
38
|
-
* It may include other metadata about the user, depending on the provider used to do the authentication.
|
39
|
-
*/
|
40
|
-
@interface FAUser : NSObject
|
41
|
-
|
42
|
-
|
43
|
-
/** @name Required properties */
|
44
|
-
|
45
|
-
|
46
|
-
/**
|
47
|
-
* @return A userId for this user. It is unique for the given auth provider.
|
48
|
-
*/
|
49
|
-
@property (nonatomic, strong) NSString* userId;
|
50
|
-
|
51
|
-
|
52
|
-
/**
|
53
|
-
* @return The provider that authenticated this user
|
54
|
-
*/
|
55
|
-
@property (nonatomic) FAProvider provider;
|
56
|
-
|
57
|
-
|
58
|
-
/**
|
59
|
-
* @return The token that was used to authenticate this user with Firebase
|
60
|
-
*/
|
61
|
-
@property (nonatomic, strong) NSString* authToken;
|
62
|
-
|
63
|
-
|
64
|
-
/** @name Optional properties */
|
65
|
-
|
66
|
-
|
67
|
-
/**
|
68
|
-
* @return The user's email if this user was authenticated via email/password, nil otherwise
|
69
|
-
*/
|
70
|
-
@property (strong, nonatomic) NSString* email;
|
71
|
-
|
72
|
-
|
73
|
-
/**
|
74
|
-
* @return Metadata about the user provided by third party authentication services if such a service was used for this user. Nil otherwise.
|
75
|
-
*/
|
76
|
-
@property (strong, nonatomic) NSDictionary* thirdPartyUserData;
|
77
|
-
|
78
|
-
|
79
|
-
/**
|
80
|
-
* @return The ACAccount instance provided by the OS. This can be used for getting more information about the user from
|
81
|
-
* a third party via SLRequest
|
82
|
-
*/
|
83
|
-
@property (strong, nonatomic) ACAccount* thirdPartyUserAccount;
|
84
|
-
|
85
|
-
@end
|
@@ -1,149 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Auth Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#import <Foundation/Foundation.h>
|
30
|
-
#import <Firebase/Firebase.h>
|
31
|
-
|
32
|
-
#import "FAUser.h"
|
33
|
-
|
34
|
-
@interface FirebaseAuthClient : NSObject
|
35
|
-
|
36
|
-
/** @name Initializing a FirebaseAuthClient instance */
|
37
|
-
|
38
|
-
|
39
|
-
/**
|
40
|
-
* You must initialize the auth client with a Firebase reference. The auth client will use that reference to authenticate to the Firebase servers
|
41
|
-
*
|
42
|
-
* @param ref A valid Firebase reference
|
43
|
-
* @return An initialized instance of FirebaseAuthClient
|
44
|
-
*/
|
45
|
-
- (id) initWithRef:(Firebase *)ref;
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
/** @name Checking current authentication status */
|
50
|
-
|
51
|
-
/**
|
52
|
-
* checkAuthStatusWithBlock: will determine if there is a logged in user. The provided block will be called asynchronously with the results of the check
|
53
|
-
*
|
54
|
-
* @param block The block to be called with result of the authentication check.
|
55
|
-
*/
|
56
|
-
- (void) checkAuthStatusWithBlock:(void (^)(NSError* error, FAUser* user))block;
|
57
|
-
|
58
|
-
|
59
|
-
/** @name Removing any existing authentication */
|
60
|
-
|
61
|
-
/**
|
62
|
-
* Log the current user out, and clear any stored credentials
|
63
|
-
*/
|
64
|
-
- (void) logout;
|
65
|
-
|
66
|
-
|
67
|
-
/** @name Email/password authentication methods */
|
68
|
-
|
69
|
-
|
70
|
-
/**
|
71
|
-
* Used to create a new user account with the given email and password combo. The results will be passed to the given block.
|
72
|
-
* Note that this method will not log the new user in.
|
73
|
-
*
|
74
|
-
* @param email The email for the account to be created
|
75
|
-
* @param password The password for the account to be created
|
76
|
-
* @param block The block to be called with the results of the operation
|
77
|
-
*/
|
78
|
-
- (void) createUserWithEmail:(NSString *)email password:(NSString *)password andCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
79
|
-
|
80
|
-
|
81
|
-
/**
|
82
|
-
* Remove a user account with the given email and password.
|
83
|
-
*
|
84
|
-
* @param email The email of the account to be removed
|
85
|
-
* @param password The password for the account to be removed
|
86
|
-
* @param block A block to receive the results of the operation
|
87
|
-
*/
|
88
|
-
- (void) removeUserWithEmail:(NSString *)email password:(NSString *)password andCompletionBlock:(void (^)(NSError* error, BOOL success))block;
|
89
|
-
|
90
|
-
|
91
|
-
/**
|
92
|
-
* Attempts to authenticate to Firebase with the given credentials. The block will receive the results of the attempt.
|
93
|
-
*
|
94
|
-
* @param email The email of the account
|
95
|
-
* @param password The password for the account
|
96
|
-
* @param block A block to receive the results of the login attempt
|
97
|
-
*/
|
98
|
-
- (void) loginWithEmail:(NSString *)email andPassword:(NSString *)password withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
99
|
-
|
100
|
-
|
101
|
-
/**
|
102
|
-
* Attempts to change the password for the account with the given credentials to the new password given. Results are reported to the supplied block.
|
103
|
-
*
|
104
|
-
* @param email The email for the account to be changed
|
105
|
-
* @param oldPassword The old password for the account to be changed
|
106
|
-
* @param newPassword The desired newPassword for the account
|
107
|
-
* @param block A block to receive the results of the operation
|
108
|
-
*/
|
109
|
-
- (void) changePasswordForEmail:(NSString *)email oldPassword:(NSString *)oldPassword newPassword:(NSString *)newPassword completionBlock:(void (^)(NSError* error, BOOL success))block;
|
110
|
-
|
111
|
-
|
112
|
-
/** @name Facebook authentication methods */
|
113
|
-
|
114
|
-
|
115
|
-
/**
|
116
|
-
* Attempts to log the user in to the Facebook app with the specified appId. The block will be called with the results of the attempt.
|
117
|
-
*
|
118
|
-
* @param appId The Facebook application id for the app to log into. Make sure that the app has your bundle id registered in the facebook developer console
|
119
|
-
* @param permissions An array of strings, specifying the desired permissions for this user. If the array is empty, 'email' permission will be requested
|
120
|
-
* @param audience One of ACFacebookAudienceEveryone, ACFacebookAudienceFriends, ACFacebookAudienceOnlyMe, or nil. Required if your requested permissions include any write access. Assumed to be ACFacebookAudienceOnlyMe is nil is passed
|
121
|
-
* @param block A block that will be called with the results of the login attempt
|
122
|
-
*/
|
123
|
-
- (void) loginToFacebookAppWithId:(NSString *)appId permissions:(NSArray *)permissions audience:(NSString *)audience withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
124
|
-
|
125
|
-
|
126
|
-
/** @name Twitter authentication methdos */
|
127
|
-
|
128
|
-
|
129
|
-
/**
|
130
|
-
* Attempts to log the user in to the Twitter app with the specified appId.
|
131
|
-
* Requires a block to handle the case where multiple twitter accounts are registered with the OS. The block will be given an array of usernames and should return
|
132
|
-
* the index of the desired account. If, after seeing the list, no account is selected, return NSNotFound.
|
133
|
-
*
|
134
|
-
* @param appId The Twitter app id to log the user into
|
135
|
-
* @param accountSelection A block to handle the case where the OS presents multiple Twitter accounts to choose from. Return the index of the desired username, or NSNotFound
|
136
|
-
* @param block A block that will be called with the results of the login attempt.
|
137
|
-
*/
|
138
|
-
- (void) loginToTwitterAppWithId:(NSString *)appId multipleAccountsHandler:(int (^)(NSArray* usernames))accountSelection withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
/** @name Global configuration and settings */
|
143
|
-
|
144
|
-
/**
|
145
|
-
* @return The FirebaseAuthClient SDK version
|
146
|
-
*/
|
147
|
-
+ (NSString *) sdkVersion;
|
148
|
-
|
149
|
-
@end
|
Binary file
|
@@ -1,48 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Auth Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#ifndef FirebaseAuthClient_FATypes_h
|
30
|
-
#define FirebaseAuthClient_FATypes_h
|
31
|
-
|
32
|
-
typedef enum {
|
33
|
-
FAErrorUserDoesNotExist = -1,
|
34
|
-
FAErrorInvalidPassword = -2,
|
35
|
-
FAErrorAccessNotGranted = -3,
|
36
|
-
FAErrorAccountNotFound = -4,
|
37
|
-
FAErrorAuthenticationProviderNotEnabled = -5,
|
38
|
-
FAErrorUnknown = -9999
|
39
|
-
} FAError;
|
40
|
-
|
41
|
-
typedef enum {
|
42
|
-
FAProviderInvalid = -1,
|
43
|
-
FAProviderPassword = 1,
|
44
|
-
FAProviderFacebook = 2,
|
45
|
-
FAProviderTwitter = 3
|
46
|
-
} FAProvider;
|
47
|
-
|
48
|
-
#endif
|
@@ -1,85 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Auth Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#import <Foundation/Foundation.h>
|
30
|
-
#import <Accounts/Accounts.h>
|
31
|
-
#import "FATypes.h"
|
32
|
-
|
33
|
-
|
34
|
-
/**
|
35
|
-
* The FAUser class is a wrapper around the user metadata returned from the Firebase auth server.
|
36
|
-
* It includes a (userId, provider) combo that is unique, as well as the token used to authenticate with Firebase.
|
37
|
-
*
|
38
|
-
* It may include other metadata about the user, depending on the provider used to do the authentication.
|
39
|
-
*/
|
40
|
-
@interface FAUser : NSObject
|
41
|
-
|
42
|
-
|
43
|
-
/** @name Required properties */
|
44
|
-
|
45
|
-
|
46
|
-
/**
|
47
|
-
* @return A userId for this user. It is unique for the given auth provider.
|
48
|
-
*/
|
49
|
-
@property (nonatomic, strong) NSString* userId;
|
50
|
-
|
51
|
-
|
52
|
-
/**
|
53
|
-
* @return The provider that authenticated this user
|
54
|
-
*/
|
55
|
-
@property (nonatomic) FAProvider provider;
|
56
|
-
|
57
|
-
|
58
|
-
/**
|
59
|
-
* @return The token that was used to authenticate this user with Firebase
|
60
|
-
*/
|
61
|
-
@property (nonatomic, strong) NSString* authToken;
|
62
|
-
|
63
|
-
|
64
|
-
/** @name Optional properties */
|
65
|
-
|
66
|
-
|
67
|
-
/**
|
68
|
-
* @return The user's email if this user was authenticated via email/password, nil otherwise
|
69
|
-
*/
|
70
|
-
@property (strong, nonatomic) NSString* email;
|
71
|
-
|
72
|
-
|
73
|
-
/**
|
74
|
-
* @return Metadata about the user provided by third party authentication services if such a service was used for this user. Nil otherwise.
|
75
|
-
*/
|
76
|
-
@property (strong, nonatomic) NSDictionary* thirdPartyUserData;
|
77
|
-
|
78
|
-
|
79
|
-
/**
|
80
|
-
* @return The ACAccount instance provided by the OS. This can be used for getting more information about the user from
|
81
|
-
* a third party via SLRequest
|
82
|
-
*/
|
83
|
-
@property (strong, nonatomic) ACAccount* thirdPartyUserAccount;
|
84
|
-
|
85
|
-
@end
|
@@ -1,149 +0,0 @@
|
|
1
|
-
/*
|
2
|
-
* Firebase iOS Auth Client Library
|
3
|
-
*
|
4
|
-
* Copyright © 2013 Firebase - All Rights Reserved
|
5
|
-
* https://www.firebase.com
|
6
|
-
*
|
7
|
-
* Redistribution and use in source and binary forms, with or without
|
8
|
-
* modification, are permitted provided that the following conditions are met:
|
9
|
-
*
|
10
|
-
* 1. Redistributions of source code must retain the above copyright notice, this
|
11
|
-
* list of conditions and the following disclaimer.
|
12
|
-
*
|
13
|
-
* 2. Redistributions in binaryform must reproduce the above copyright notice,
|
14
|
-
* this list of conditions and the following disclaimer in the documentation
|
15
|
-
* and/or other materials provided with the distribution.
|
16
|
-
*
|
17
|
-
* THIS SOFTWARE IS PROVIDED BY FIREBASE AS IS AND ANY EXPRESS OR
|
18
|
-
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
19
|
-
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
|
20
|
-
* EVENT SHALL FIREBASE BE LIABLE FOR ANY DIRECT,
|
21
|
-
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
22
|
-
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
23
|
-
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
24
|
-
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
25
|
-
* OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
|
26
|
-
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
27
|
-
*/
|
28
|
-
|
29
|
-
#import <Foundation/Foundation.h>
|
30
|
-
#import <Firebase/Firebase.h>
|
31
|
-
|
32
|
-
#import "FAUser.h"
|
33
|
-
|
34
|
-
@interface FirebaseAuthClient : NSObject
|
35
|
-
|
36
|
-
/** @name Initializing a FirebaseAuthClient instance */
|
37
|
-
|
38
|
-
|
39
|
-
/**
|
40
|
-
* You must initialize the auth client with a Firebase reference. The auth client will use that reference to authenticate to the Firebase servers
|
41
|
-
*
|
42
|
-
* @param ref A valid Firebase reference
|
43
|
-
* @return An initialized instance of FirebaseAuthClient
|
44
|
-
*/
|
45
|
-
- (id) initWithRef:(Firebase *)ref;
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
/** @name Checking current authentication status */
|
50
|
-
|
51
|
-
/**
|
52
|
-
* checkAuthStatusWithBlock: will determine if there is a logged in user. The provided block will be called asynchronously with the results of the check
|
53
|
-
*
|
54
|
-
* @param block The block to be called with result of the authentication check.
|
55
|
-
*/
|
56
|
-
- (void) checkAuthStatusWithBlock:(void (^)(NSError* error, FAUser* user))block;
|
57
|
-
|
58
|
-
|
59
|
-
/** @name Removing any existing authentication */
|
60
|
-
|
61
|
-
/**
|
62
|
-
* Log the current user out, and clear any stored credentials
|
63
|
-
*/
|
64
|
-
- (void) logout;
|
65
|
-
|
66
|
-
|
67
|
-
/** @name Email/password authentication methods */
|
68
|
-
|
69
|
-
|
70
|
-
/**
|
71
|
-
* Used to create a new user account with the given email and password combo. The results will be passed to the given block.
|
72
|
-
* Note that this method will not log the new user in.
|
73
|
-
*
|
74
|
-
* @param email The email for the account to be created
|
75
|
-
* @param password The password for the account to be created
|
76
|
-
* @param block The block to be called with the results of the operation
|
77
|
-
*/
|
78
|
-
- (void) createUserWithEmail:(NSString *)email password:(NSString *)password andCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
79
|
-
|
80
|
-
|
81
|
-
/**
|
82
|
-
* Remove a user account with the given email and password.
|
83
|
-
*
|
84
|
-
* @param email The email of the account to be removed
|
85
|
-
* @param password The password for the account to be removed
|
86
|
-
* @param block A block to receive the results of the operation
|
87
|
-
*/
|
88
|
-
- (void) removeUserWithEmail:(NSString *)email password:(NSString *)password andCompletionBlock:(void (^)(NSError* error, BOOL success))block;
|
89
|
-
|
90
|
-
|
91
|
-
/**
|
92
|
-
* Attempts to authenticate to Firebase with the given credentials. The block will receive the results of the attempt.
|
93
|
-
*
|
94
|
-
* @param email The email of the account
|
95
|
-
* @param password The password for the account
|
96
|
-
* @param block A block to receive the results of the login attempt
|
97
|
-
*/
|
98
|
-
- (void) loginWithEmail:(NSString *)email andPassword:(NSString *)password withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
99
|
-
|
100
|
-
|
101
|
-
/**
|
102
|
-
* Attempts to change the password for the account with the given credentials to the new password given. Results are reported to the supplied block.
|
103
|
-
*
|
104
|
-
* @param email The email for the account to be changed
|
105
|
-
* @param oldPassword The old password for the account to be changed
|
106
|
-
* @param newPassword The desired newPassword for the account
|
107
|
-
* @param block A block to receive the results of the operation
|
108
|
-
*/
|
109
|
-
- (void) changePasswordForEmail:(NSString *)email oldPassword:(NSString *)oldPassword newPassword:(NSString *)newPassword completionBlock:(void (^)(NSError* error, BOOL success))block;
|
110
|
-
|
111
|
-
|
112
|
-
/** @name Facebook authentication methods */
|
113
|
-
|
114
|
-
|
115
|
-
/**
|
116
|
-
* Attempts to log the user in to the Facebook app with the specified appId. The block will be called with the results of the attempt.
|
117
|
-
*
|
118
|
-
* @param appId The Facebook application id for the app to log into. Make sure that the app has your bundle id registered in the facebook developer console
|
119
|
-
* @param permissions An array of strings, specifying the desired permissions for this user. If the array is empty, 'email' permission will be requested
|
120
|
-
* @param audience One of ACFacebookAudienceEveryone, ACFacebookAudienceFriends, ACFacebookAudienceOnlyMe, or nil. Required if your requested permissions include any write access. Assumed to be ACFacebookAudienceOnlyMe is nil is passed
|
121
|
-
* @param block A block that will be called with the results of the login attempt
|
122
|
-
*/
|
123
|
-
- (void) loginToFacebookAppWithId:(NSString *)appId permissions:(NSArray *)permissions audience:(NSString *)audience withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
124
|
-
|
125
|
-
|
126
|
-
/** @name Twitter authentication methdos */
|
127
|
-
|
128
|
-
|
129
|
-
/**
|
130
|
-
* Attempts to log the user in to the Twitter app with the specified appId.
|
131
|
-
* Requires a block to handle the case where multiple twitter accounts are registered with the OS. The block will be given an array of usernames and should return
|
132
|
-
* the index of the desired account. If, after seeing the list, no account is selected, return NSNotFound.
|
133
|
-
*
|
134
|
-
* @param appId The Twitter app id to log the user into
|
135
|
-
* @param accountSelection A block to handle the case where the OS presents multiple Twitter accounts to choose from. Return the index of the desired username, or NSNotFound
|
136
|
-
* @param block A block that will be called with the results of the login attempt.
|
137
|
-
*/
|
138
|
-
- (void) loginToTwitterAppWithId:(NSString *)appId multipleAccountsHandler:(int (^)(NSArray* usernames))accountSelection withCompletionBlock:(void (^)(NSError* error, FAUser* user))block;
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
/** @name Global configuration and settings */
|
143
|
-
|
144
|
-
/**
|
145
|
-
* @return The FirebaseAuthClient SDK version
|
146
|
-
*/
|
147
|
-
+ (NSString *) sdkVersion;
|
148
|
-
|
149
|
-
@end
|
Binary file
|