diff options
author | Zsika Phillip <protocol86@users.noreply.github.com> | 2017-09-15 14:54:11 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-15 14:54:11 -0700 |
commit | 7dc124882a987de77de27943357d9259a55ec0d2 (patch) | |
tree | bac42ab9fb3d6c053292c6fedb420e122a14bce5 /Firebase | |
parent | f0442122d37dd0918655af97c0ee8a113b158d99 (diff) |
Add missing comments (#273)
* Small code clean-up changes
* Fixes typos
* Addresses comment
Diffstat (limited to 'Firebase')
-rw-r--r-- | Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m | 13 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuthDefaultUIDelegate.h | 5 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuthURLPresenter.h | 3 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuthURLPresenter.m | 3 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuthWebView.h | 3 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuthWebViewController.h | 10 | ||||
-rw-r--r-- | Firebase/Auth/Source/FIRAuthWebViewController.m | 4 | ||||
-rw-r--r-- | Firebase/Auth/Source/Public/FIRAuthUIDelegate.h | 3 |
8 files changed, 37 insertions, 7 deletions
diff --git a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m index 3a098a5..5d22fc4 100644 --- a/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m +++ b/Firebase/Auth/Source/AuthProviders/Phone/FIRPhoneAuthProvider.m @@ -429,6 +429,13 @@ NSString *const kReCAPTCHAURLStringFormat = @"https://%@/__/auth/handler?%@"; }]; } +/** @fn reCAPTCHAURLWithEventID:completion: + @brief Constructs a URL used for opening a reCAPTCHA app verification flow using a given event + ID. + @param eventID The event ID used for this purpose. + @param completion The callback invoked after the URL has been constructed or an error + has been encountered. + */ - (void)reCAPTCHAURLWithEventID:(NSString *)eventID completion:(FIRReCAPTCHAURLCallBack)completion { [self fetchAuthDomainWithCompletion:^(NSString *_Nullable authDomain, NSError *_Nullable error) { @@ -457,6 +464,12 @@ NSString *const kReCAPTCHAURLStringFormat = @"https://%@/__/auth/handler?%@"; }]; } + +/** @fn fetchAuthDomainWithCompletion:completion: + @brief Fetches the auth domain associated with the Firebase Project. + @param completion The callback invoked after the auth domain has been constructed or an error + has been encountered. + */ - (void)fetchAuthDomainWithCompletion:(FIRFetchAuthDomainCallback)completion { FIRGetProjectConfigRequest *request = [[FIRGetProjectConfigRequest alloc] initWithRequestConfiguration:_auth.requestConfiguration]; diff --git a/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.h b/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.h index f0e5d80..03cadf7 100644 --- a/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.h +++ b/Firebase/Auth/Source/FIRAuthDefaultUIDelegate.h @@ -20,6 +20,11 @@ NS_ASSUME_NONNULL_BEGIN +/** @class FIRAuthDefaultUIDelegate + @brief Class responsible for providing a default FIRAuthUIDelegte. + @remarks This class should be used in the case that a UIDelegate was expected and necessary to + continue a given flow, but none was provided. + */ @interface FIRAuthDefaultUIDelegate : NSObject <FIRAuthUIDelegate> /** @fn defaultUIDelegate diff --git a/Firebase/Auth/Source/FIRAuthURLPresenter.h b/Firebase/Auth/Source/FIRAuthURLPresenter.h index 694b398..a886a3e 100644 --- a/Firebase/Auth/Source/FIRAuthURLPresenter.h +++ b/Firebase/Auth/Source/FIRAuthURLPresenter.h @@ -35,6 +35,9 @@ typedef void (^FIRAuthURLPresentationCompletion)(NSURL *_Nullable callbackURL, */ typedef BOOL (^FIRAuthURLCallbackMatcher)(NSURL * _Nullable callbackURL); +/** @class FIRAuthURLPresenter + @brief A Class responsible for presenting URL via SFSafariViewController or UIWebView. + */ @interface FIRAuthURLPresenter : NSObject /** @fn presentURL:UIDelegate:callbackMatcher:completion: diff --git a/Firebase/Auth/Source/FIRAuthURLPresenter.m b/Firebase/Auth/Source/FIRAuthURLPresenter.m index d923c8a..9e24805 100644 --- a/Firebase/Auth/Source/FIRAuthURLPresenter.m +++ b/Firebase/Auth/Source/FIRAuthURLPresenter.m @@ -26,7 +26,8 @@ NS_ASSUME_NONNULL_BEGIN -@interface FIRAuthURLPresenter () <SFSafariViewControllerDelegate, FIRAuthWebViewDelegate> +@interface FIRAuthURLPresenter () <SFSafariViewControllerDelegate, + FIRAuthWebViewControllerDelegate> @end @implementation FIRAuthURLPresenter { diff --git a/Firebase/Auth/Source/FIRAuthWebView.h b/Firebase/Auth/Source/FIRAuthWebView.h index f4a8d1b..28af833 100644 --- a/Firebase/Auth/Source/FIRAuthWebView.h +++ b/Firebase/Auth/Source/FIRAuthWebView.h @@ -18,6 +18,9 @@ NS_ASSUME_NONNULL_BEGIN +/** @class FIRAuthWebView + @brief A class reponsible for creating a UIWebview for use within Firebase Auth. + */ @interface FIRAuthWebView : UIView /** @property webView diff --git a/Firebase/Auth/Source/FIRAuthWebViewController.h b/Firebase/Auth/Source/FIRAuthWebViewController.h index 5c2c042..4bf9678 100644 --- a/Firebase/Auth/Source/FIRAuthWebViewController.h +++ b/Firebase/Auth/Source/FIRAuthWebViewController.h @@ -20,7 +20,10 @@ NS_ASSUME_NONNULL_BEGIN -@protocol FIRAuthWebViewDelegate <NSObject> +/** @protocol FIRAuthWebViewControllerDelegate + @brief Defines a delegate for FIRAuthWebViewController + */ +@protocol FIRAuthWebViewControllerDelegate <NSObject> /** @fn webViewController:canHandleURL: @brief Determines if a URL should be handled by the delegate. @@ -45,6 +48,9 @@ NS_ASSUME_NONNULL_BEGIN @end +/** @class FIRAuthWebViewController + @brief Reponsible for creating a UIViewController for presenting a FIRAutWebView. + */ @interface FIRAuthWebViewController : UIViewController /** @fn initWithNibName:bundle: @@ -59,7 +65,7 @@ NS_ASSUME_NONNULL_BEGIN - (instancetype)initWithCoder:(NSCoder *)aDecoder NS_UNAVAILABLE; - (instancetype)initWithURL:(NSURL *)URL - delegate:(__weak id<FIRAuthWebViewDelegate>)delegate + delegate:(__weak id<FIRAuthWebViewControllerDelegate>)delegate NS_DESIGNATED_INITIALIZER; @end diff --git a/Firebase/Auth/Source/FIRAuthWebViewController.m b/Firebase/Auth/Source/FIRAuthWebViewController.m index b9a2473..a3ab06a 100644 --- a/Firebase/Auth/Source/FIRAuthWebViewController.m +++ b/Firebase/Auth/Source/FIRAuthWebViewController.m @@ -32,7 +32,7 @@ NS_ASSUME_NONNULL_BEGIN /** @var _delegate @brief The delegate to call. */ - __weak id<FIRAuthWebViewDelegate> _delegate; + __weak id<FIRAuthWebViewControllerDelegate> _delegate; /** @var _webView; @brief The web view instance for easier access. @@ -41,7 +41,7 @@ NS_ASSUME_NONNULL_BEGIN } - (instancetype)initWithURL:(NSURL *)URL - delegate:(__weak id<FIRAuthWebViewDelegate>)delegate { + delegate:(__weak id<FIRAuthWebViewControllerDelegate>)delegate { self = [super initWithNibName:nil bundle:nil]; if (self) { _URL = URL; diff --git a/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h b/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h index a8d0549..ee044dc 100644 --- a/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h +++ b/Firebase/Auth/Source/Public/FIRAuthUIDelegate.h @@ -23,8 +23,7 @@ NS_ASSUME_NONNULL_BEGIN /** @protocol FIRAuthUIDelegate @brief A protocol to handle user interface interactions for Firebase Auth. -*/ - + */ @protocol FIRAuthUIDelegate <NSObject> /** @fn presentViewController:animated:completion: |