diff --git a/Channelize.framework/Assets.car b/Channelize.framework/Assets.car deleted file mode 100644 index 875bd90..0000000 Binary files a/Channelize.framework/Assets.car and /dev/null differ diff --git a/Channelize.framework/Channelize b/Channelize.framework/Channelize deleted file mode 100755 index ca383c0..0000000 Binary files a/Channelize.framework/Channelize and /dev/null differ diff --git a/Channelize.framework/Headers/Channelize-Swift.h b/Channelize.framework/Headers/Channelize-Swift.h deleted file mode 100644 index 229baa1..0000000 --- a/Channelize.framework/Headers/Channelize-Swift.h +++ /dev/null @@ -1,445 +0,0 @@ -// Generated by Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgcc-compat" - -#if !defined(__has_include) -# define __has_include(x) 0 -#endif -#if !defined(__has_attribute) -# define __has_attribute(x) 0 -#endif -#if !defined(__has_feature) -# define __has_feature(x) 0 -#endif -#if !defined(__has_warning) -# define __has_warning(x) 0 -#endif - -#if __has_include() -# include -#endif - -#pragma clang diagnostic ignored "-Wauto-import" -#include -#include -#include -#include - -#if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) -typedef uint_least16_t char16_t; -typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); -#endif - -#if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) -#endif -#if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class -#endif -#if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif -#endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) -#endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) -#endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) -#endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE -#endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT -#endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN -#endif -#if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA -#endif -#if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA -#endif -#if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA -#endif -#if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif -#endif - -#if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -#endif - -#if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) -#endif - -#if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif -#endif -#if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif -#endif -#if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif -#endif -#if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) -#endif -#if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) -#endif -#if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) -#endif -#if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) -#endif -#if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) -#endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) -#endif -#if __has_feature(modules) -@import CoreGraphics; -@import Foundation; -@import InputBarAccessoryView; -@import UIKit; -#endif - -#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" -#pragma clang diagnostic ignored "-Wduplicate-method-arg" -#if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" -#endif -#pragma clang diagnostic ignored "-Wunknown-pragmas" -#pragma clang diagnostic ignored "-Wnullability" - -#if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Channelize",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") -#endif - -@class NSCoder; -@class NSAttributedString; - -SWIFT_CLASS("_TtC10Channelize19BottomSeparatorCell") -@interface BottomSeparatorCell : UICollectionViewCell -- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -- (void)setTextOnLabel:(NSAttributedString * _Nonnull)text :(NSTextAlignment)alignment SWIFT_DEPRECATED_OBJC("Swift method 'BottomSeparatorCell.setTextOnLabel(_:_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)layoutSubviews; -@end - -@class UITextView; - -SWIFT_CLASS("_TtC10Channelize7CHToken") -@interface CHToken : UIView -@property (nonatomic, strong) UITextView * _Nonnull hiddenTextView SWIFT_DEPRECATED_OBJC("Swift property 'CHToken.hiddenTextView' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic) BOOL isSelected SWIFT_DEPRECATED_OBJC("Swift property 'CHToken.isSelected' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithFrame:(CGRect)frame SWIFT_UNAVAILABLE; -@end - -@class UITapGestureRecognizer; - -SWIFT_CLASS("_TtC10Channelize11CHTokenView") -@interface CHTokenView : UIView -@property (nonatomic, strong) UITextView * _Nonnull textView SWIFT_DEPRECATED_OBJC("Swift property 'CHTokenView.textView' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)layoutSubviews; -- (void)awakeFromNib; -/// Reloads data from datasource and delegate implementations. -- (void)reloadData SWIFT_DEPRECATED_OBJC("Swift method 'CHTokenView.reloadData()' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -/// Returns a generated token. -/// \param index Int value for token index. -/// -/// -/// returns: -/// CHToken -- (CHToken * _Nonnull)tokenForIndex:(NSInteger)index SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift method 'CHTokenView.tokenForIndex(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -/// Selects the tapped token for interaction (i.e. removal). -/// \param tapGesture UITapGestureRecognizer associated with the token. -/// -/// -/// returns: -/// CHToken -- (void)didTapToken:(UITapGestureRecognizer * _Nonnull)tapGesture; -- (void)selectToken:(CHToken * _Nonnull)token SWIFT_DEPRECATED_OBJC("Swift method 'CHTokenView.selectToken(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)textViewDidBeginEditing:(UITextView * _Nonnull)textView; -- (void)textViewDidEndEditing:(UITextView * _Nonnull)textView; -- (BOOL)textView:(UITextView * _Nonnull)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString * _Nonnull)text SWIFT_WARN_UNUSED_RESULT; -- (void)textViewDidChange:(UITextView * _Nonnull)textView; -/// Dismiss keyboard and resign responder for Token View -- (void)dismissTokenView SWIFT_DEPRECATED_OBJC("Swift method 'CHTokenView.dismissTokenView()' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - -@interface InputTextView (SWIFT_EXTENSION(Channelize)) -- (BOOL)textView:(UITextView * _Nonnull)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString * _Nonnull)text SWIFT_WARN_UNUSED_RESULT; -@end - - - - - -@class UICollectionViewLayout; -@class NSBundle; - -SWIFT_CLASS("_TtC10Channelize23RecentMessageController") -@interface RecentMessageController : UICollectionViewController -- (void)viewDidLoad; -- (void)viewWillAppear:(BOOL)animated; -- (void)viewDidAppear:(BOOL)animated; -- (void)viewWillDisappear:(BOOL)animated; -- (nonnull instancetype)initWithCollectionViewLayout:(UICollectionViewLayout * _Nonnull)layout OBJC_DESIGNATED_INITIALIZER; -- (nonnull instancetype)initWithNibName:(NSString * _Nullable)nibNameOrNil bundle:(NSBundle * _Nullable)nibBundleOrNil OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -@end - - - - - -@class UICollectionView; - -@interface RecentMessageController (SWIFT_EXTENSION(Channelize)) -- (CGSize)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout sizeForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT; -- (CGFloat)collectionView:(UICollectionView * _Nonnull)collectionView layout:(UICollectionViewLayout * _Nonnull)collectionViewLayout minimumLineSpacingForSectionAtIndex:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -@end - - -@interface RecentMessageController (SWIFT_EXTENSION(Channelize)) -@end - -@class UISearchBar; - -@interface RecentMessageController (SWIFT_EXTENSION(Channelize)) -- (BOOL)searchBarShouldBeginEditing:(UISearchBar * _Nonnull)searchBar SWIFT_WARN_UNUSED_RESULT; -@end - -@class UIScrollView; - -@interface RecentMessageController (SWIFT_EXTENSION(Channelize)) -- (void)scrollViewWillBeginDragging:(UIScrollView * _Nonnull)scrollView; -- (void)scrollViewDidEndDragging:(UIScrollView * _Nonnull)scrollView willDecelerate:(BOOL)decelerate; -- (void)scrollViewDidEndDecelerating:(UIScrollView * _Nonnull)scrollView; -- (void)scrollViewWillBeginDecelerating:(UIScrollView * _Nonnull)scrollView; -@end - - - - -@interface RecentMessageController (SWIFT_EXTENSION(Channelize)) -- (NSInteger)collectionView:(UICollectionView * _Nonnull)collectionView numberOfItemsInSection:(NSInteger)section SWIFT_WARN_UNUSED_RESULT; -- (UICollectionViewCell * _Nonnull)collectionView:(UICollectionView * _Nonnull)collectionView cellForItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath SWIFT_WARN_UNUSED_RESULT; -- (void)collectionView:(UICollectionView * _Nonnull)collectionView didSelectItemAtIndexPath:(NSIndexPath * _Nonnull)indexPath; -@end - - -@interface RecentMessageController (SWIFT_EXTENSION(Channelize)) -- (void)didUserGetOnlineWithUserId:(NSString * _Nonnull)userId SWIFT_DEPRECATED_OBJC("Swift method 'RecentMessageController.didUserGetOnline(userId:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)didUserGetOfflineWithUserId:(NSString * _Nonnull)userId SWIFT_DEPRECATED_OBJC("Swift method 'RecentMessageController.didUserGetOffline(userId:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)didUserBlockedWithIsMe:(BOOL)isMe userId:(NSString * _Nullable)userId SWIFT_DEPRECATED_OBJC("Swift method 'RecentMessageController.didUserBlocked(isMe:userId:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@end - - -@interface RecentMessageController (SWIFT_EXTENSION(Channelize)) -- (void)didAdminAddedWithConversationId:(NSString * _Nullable)conversationId isAdmin:(BOOL)isAdmin userId:(NSString * _Nullable)userId SWIFT_DEPRECATED_OBJC("Swift method 'RecentMessageController.didAdminAdded(conversationId:isAdmin:userId:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)didChangeTypingStatusWithConversationId:(NSString * _Nullable)conversationId userId:(NSString * _Nullable)userId isTyping:(BOOL)isTyping SWIFT_DEPRECATED_OBJC("Swift method 'RecentMessageController.didChangeTypingStatus(conversationId:userId:isTyping:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)didMessagesDeletedForEveryOneWithConversationId:(NSString * _Nullable)conversationId messageIds:(NSArray * _Nullable)messageIds SWIFT_DEPRECATED_OBJC("Swift method 'RecentMessageController.didMessagesDeletedForEveryOne(conversationId:messageIds:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@end - -@class UIFont; -@class UIColor; - -SWIFT_CLASS("_TtC10Channelize18TTSegmentedControl") -@interface TTSegmentedControl : UIView -@property (nonatomic, strong) UIFont * _Nonnull defaultTextFont; -@property (nonatomic, strong) UIFont * _Nonnull selectedTextFont; -@property (nonatomic, strong) UIColor * _Nonnull defaultTextColor; -@property (nonatomic, strong) UIColor * _Nonnull selectedTextColor; -@property (nonatomic) BOOL useGradient; -@property (nonatomic, strong) UIColor * _Nonnull containerBackgroundColor; -@property (nonatomic, strong) UIColor * _Nonnull thumbColor; -@property (nonatomic, copy) NSArray * _Nullable thumbGradientColors; -@property (nonatomic, strong) UIColor * _Nonnull thumbShadowColor; -@property (nonatomic) BOOL useShadow; -@property (nonatomic) CGSize padding; -@property (nonatomic) CGFloat cornerRadius; -@property (nonatomic) BOOL hasBounceAnimation SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.hasBounceAnimation' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic, copy) NSArray * _Nonnull itemTitles SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.itemTitles' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic, copy) NSArray * _Null_unspecified attributedDefaultTitles SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.attributedDefaultTitles' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic, copy) NSArray * _Null_unspecified attributedSelectedTitles SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.attributedSelectedTitles' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic, copy) void (^ _Nullable didSelectItemWith)(NSInteger, NSString * _Nullable) SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.didSelectItemWith' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic) BOOL allowDrag SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.allowDrag' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic) BOOL allowChangeThumbWidth SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.allowChangeThumbWidth' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@property (nonatomic) BOOL noItemSelected SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.noItemSelected' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)awakeFromNib; -- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder OBJC_DESIGNATED_INITIALIZER; -- (void)layoutSubviews; -+ (UIColor * _Nonnull)UIColorFromRGB:(NSUInteger)rgbValue SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.UIColorFromRGB(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@end - - - -@class UITouch; -@class UIEvent; - -@interface TTSegmentedControl (SWIFT_EXTENSION(Channelize)) -- (void)touchesEnded:(NSSet * _Nonnull)touches withEvent:(UIEvent * _Nullable)event; -- (void)touchesMoved:(NSSet * _Nonnull)touches withEvent:(UIEvent * _Nullable)event; -- (void)touchesBegan:(NSSet * _Nonnull)touches withEvent:(UIEvent * _Nullable)event; -- (void)touchesCancelled:(NSSet * _Nonnull)touches withEvent:(UIEvent * _Nullable)event; -@end - - - - - - -@interface TTSegmentedControl (SWIFT_EXTENSION(Channelize)) -@property (nonatomic, readonly) NSInteger currentIndex SWIFT_DEPRECATED_OBJC("Swift property 'TTSegmentedControl.currentIndex' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)selectItemAtIndex:(NSInteger)index animated:(BOOL)animated SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.selectItemAt(index:animated:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)changeTitle:(NSString * _Nonnull)title atIndex:(NSInteger)atIndex SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.changeTitle(_:atIndex:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)changeAttributedTitle:(NSAttributedString * _Nonnull)title selectedTile:(NSAttributedString * _Nullable)selectedTile atIndex:(NSInteger)atIndex SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.changeAttributedTitle(_:selectedTile:atIndex:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (NSString * _Nonnull)titleForItemAtIndex:(NSInteger)index SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.titleForItemAtIndex(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)changeThumbShadowColor:(UIColor * _Nonnull)color SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.changeThumbShadowColor(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)changeThumbColor:(UIColor * _Nonnull)color SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.changeThumbColor(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)changeBackgroundColor:(UIColor * _Nonnull)color SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.changeBackgroundColor(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -- (void)changeThumbGradientColors:(NSArray * _Nonnull)colors SWIFT_DEPRECATED_OBJC("Swift method 'TTSegmentedControl.changeThumbGradientColors(_:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@end - - -@interface UIColor (SWIFT_EXTENSION(Channelize)) -/// Constructing color from hex string -/// \param hex A hex string, can either contain # or not -/// -- (nonnull instancetype)initWithHex:(NSString * _Nonnull)string SWIFT_DEPRECATED_OBJC("Swift initializer 'UIColor.init(hex:)' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemBlue SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemBlue' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemBlue SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemBlue' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemGray SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemGray' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemGray SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemGray' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemGreen SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemGreen' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemGreen SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemGreen' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemIndigo SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemIndigo' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemIndigo SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemIndigo' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemOrange SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemOrange' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemOrange SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemOrange' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemPink SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemPink' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemPink SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemPink' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemPurple SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemPurple' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemPurple SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemPurple' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemRed SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemRed' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemRed SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemRed' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemTeal SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemTeal' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemTeal SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemTeal' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) UIColor * _Nonnull systemYellow SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemYellow' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint");) -+ (UIColor * _Nonnull)systemYellow SWIFT_WARN_UNUSED_RESULT SWIFT_DEPRECATED_OBJC("Swift property 'UIColor.systemYellow' uses '@objc' inference deprecated in Swift 4; add '@objc' to provide an Objective-C entrypoint"); -@end - - - - - - - - - - - - -@interface UITabBar (SWIFT_EXTENSION(Channelize)) -- (CGSize)sizeThatFits:(CGSize)size SWIFT_WARN_UNUSED_RESULT; -@end - - - - - - - - - - - - - - - - - - - - - -#if __has_attribute(external_source_symbol) -# pragma clang attribute pop -#endif -#pragma clang diagnostic pop diff --git a/Channelize.framework/Headers/Channelize.h b/Channelize.framework/Headers/Channelize.h deleted file mode 100644 index ec5748b..0000000 --- a/Channelize.framework/Headers/Channelize.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Channelize.h -// Channelize -// -// Created by bigstep on 21/07/17. -// Copyright © 2017 bigstep. All rights reserved. -// - -#import - -//! Project version number for Channelize. -FOUNDATION_EXPORT double ChannelizeVersionNumber; - -//! Project version string for Channelize. -FOUNDATION_EXPORT const unsigned char ChannelizeVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Channelize.framework/Info.plist b/Channelize.framework/Info.plist deleted file mode 100644 index 4e2cdde..0000000 Binary files a/Channelize.framework/Info.plist and /dev/null differ diff --git a/Channelize.framework/Localizable.strings b/Channelize.framework/Localizable.strings deleted file mode 100644 index 62b393a..0000000 Binary files a/Channelize.framework/Localizable.strings and /dev/null differ diff --git a/Channelize.framework/Modules/Channelize.swiftmodule/arm.swiftdoc b/Channelize.framework/Modules/Channelize.swiftmodule/arm.swiftdoc deleted file mode 100644 index f3cc76f..0000000 Binary files a/Channelize.framework/Modules/Channelize.swiftmodule/arm.swiftdoc and /dev/null differ diff --git a/Channelize.framework/Modules/Channelize.swiftmodule/arm.swiftmodule b/Channelize.framework/Modules/Channelize.swiftmodule/arm.swiftmodule deleted file mode 100644 index 9760cf7..0000000 Binary files a/Channelize.framework/Modules/Channelize.swiftmodule/arm.swiftmodule and /dev/null differ diff --git a/Channelize.framework/Modules/Channelize.swiftmodule/arm64.swiftdoc b/Channelize.framework/Modules/Channelize.swiftmodule/arm64.swiftdoc deleted file mode 100644 index 8c3d233..0000000 Binary files a/Channelize.framework/Modules/Channelize.swiftmodule/arm64.swiftdoc and /dev/null differ diff --git a/Channelize.framework/Modules/Channelize.swiftmodule/arm64.swiftmodule b/Channelize.framework/Modules/Channelize.swiftmodule/arm64.swiftmodule deleted file mode 100644 index 80f6378..0000000 Binary files a/Channelize.framework/Modules/Channelize.swiftmodule/arm64.swiftmodule and /dev/null differ diff --git a/Channelize.framework/Modules/module.modulemap b/Channelize.framework/Modules/module.modulemap deleted file mode 100644 index 9f0e1b1..0000000 --- a/Channelize.framework/Modules/module.modulemap +++ /dev/null @@ -1,11 +0,0 @@ -framework module Channelize { - umbrella header "Channelize.h" - - export * - module * { export * } -} - -module Channelize.Swift { - header "Channelize-Swift.h" - requires objc -} diff --git a/Channelize.framework/ic_sound_wave.gif b/Channelize.framework/ic_sound_wave.gif deleted file mode 100644 index 4a21b1a..0000000 Binary files a/Channelize.framework/ic_sound_wave.gif and /dev/null differ diff --git a/Channelize.framework/no_contacts.png b/Channelize.framework/no_contacts.png deleted file mode 100644 index ad4d718..0000000 Binary files a/Channelize.framework/no_contacts.png and /dev/null differ diff --git a/Channelize.framework/no_conversations.png b/Channelize.framework/no_conversations.png deleted file mode 100644 index 017a2db..0000000 Binary files a/Channelize.framework/no_conversations.png and /dev/null differ diff --git a/Channelize.framework/no_messages.png b/Channelize.framework/no_messages.png deleted file mode 100644 index b5c63f0..0000000 Binary files a/Channelize.framework/no_messages.png and /dev/null differ diff --git a/Channelize.framework/no_result_found.png b/Channelize.framework/no_result_found.png deleted file mode 100644 index fca420c..0000000 Binary files a/Channelize.framework/no_result_found.png and /dev/null differ diff --git a/Channelize.framework/photo_placeholder.jpg b/Channelize.framework/photo_placeholder.jpg deleted file mode 100644 index 4f434ec..0000000 Binary files a/Channelize.framework/photo_placeholder.jpg and /dev/null differ diff --git a/Channelize.framework/videoplaceholder.jpg b/Channelize.framework/videoplaceholder.jpg deleted file mode 100644 index f2e4fad..0000000 Binary files a/Channelize.framework/videoplaceholder.jpg and /dev/null differ diff --git a/ChannelizeAPI.podspec b/ChannelizeAPI.podspec deleted file mode 100644 index 3e69036..0000000 --- a/ChannelizeAPI.podspec +++ /dev/null @@ -1,20 +0,0 @@ -Pod::Spec.new do |s| - - s.name = 'ChannelizeAPI' - s.version = '4.0.7' - s.summary = 'Channelize API SDK' - s.description = 'A Real Time Messaging API SDK' - s.homepage = 'https://channelize.io/' - s.license = { :type => 'GPL', :file => 'LICENSE' } - s.author = { "Channelize" => 'support@channelize.io' } - s.platform = :ios, '9.0' - s.requires_arc = true - s.swift_version = '4.2' - s.source = { :git => 'https://github.com/ChannelizeIO/Channelize-iOS.git', :tag => '4.0.7', :branch => 'master' } - s.vendored_frameworks = 'Channelize_API.framework' - s.dependency 'AWSMobileClient', '2.9.3' - s.dependency 'AWSIoT', '2.9.3' - s.dependency 'Alamofire', '4.8.0' - s.dependency 'AlamofireObjectMapper', '5.2.0' - s.dependency 'ObjectMapper', '3.4.2' -end diff --git a/ChannelizeUI.podspec b/ChannelizeUI.podspec deleted file mode 100644 index e4e7656..0000000 --- a/ChannelizeUI.podspec +++ /dev/null @@ -1,23 +0,0 @@ -Pod::Spec.new do |s| - - s.name = "ChannelizeUI" - s.version = "4.0.7" - s.summary = "Channelize UI SDK" - s.description = "A Messaging UI SDK built for Channelize API SDK" - s.homepage = "https://channelize.io/" - s.license = { :type => "GPL", :file => "LICENSE" } - s.author = { "Channelize" => "support@channelize.io" } - s.platform = :ios, "9.0" - s.swift_version = "4.2" - s.source = { :git => "https://github.com/ChannelizeIO/Channelize-iOS.git", :tag => "#{s.version}", :branch => "master" } - s.vendored_frameworks = "Channelize.framework" - s.dependency "CWStatusBarNotification", "2.3.5" - s.dependency "GiphyCoreSDK", "1.4.0" - s.dependency "Crashlytics", "3.12.0" - s.dependency "SDWebImage/GIF", "4.4.3" - s.dependency "SwiftIconFont", "3.0.0" - s.dependency "InputBarAccessoryView", "4.2.1" - s.dependency "ZVProgressHUD", "2.0.3" - s.dependency "ZVActivityIndicatorView", "0.1.3" - s.dependency "RealmSwift" -end diff --git a/Channelize_API.framework/Channelize_API b/Channelize_API.framework/Channelize_API deleted file mode 100755 index 3e7a44a..0000000 Binary files a/Channelize_API.framework/Channelize_API and /dev/null differ diff --git a/Channelize_API.framework/Headers/Channelize_API-Swift.h b/Channelize_API.framework/Headers/Channelize_API-Swift.h deleted file mode 100644 index c693706..0000000 --- a/Channelize_API.framework/Headers/Channelize_API-Swift.h +++ /dev/null @@ -1,194 +0,0 @@ -// Generated by Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgcc-compat" - -#if !defined(__has_include) -# define __has_include(x) 0 -#endif -#if !defined(__has_attribute) -# define __has_attribute(x) 0 -#endif -#if !defined(__has_feature) -# define __has_feature(x) 0 -#endif -#if !defined(__has_warning) -# define __has_warning(x) 0 -#endif - -#if __has_include() -# include -#endif - -#pragma clang diagnostic ignored "-Wauto-import" -#include -#include -#include -#include - -#if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) -typedef uint_least16_t char16_t; -typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); -#endif - -#if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) -#endif -#if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class -#endif -#if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif -#endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) -#endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) -#endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) -#endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE -#endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT -#endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN -#endif -#if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA -#endif -#if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA -#endif -#if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA -#endif -#if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif -#endif - -#if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -#endif - -#if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) -#endif - -#if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif -#endif -#if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif -#endif -#if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif -#endif -#if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) -#endif -#if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) -#endif -#if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) -#endif -#if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) -#endif -#if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) -#endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) -#endif -#if __has_feature(modules) -@import ObjectiveC; -#endif - -#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" -#pragma clang diagnostic ignored "-Wduplicate-method-arg" -#if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" -#endif -#pragma clang diagnostic ignored "-Wunknown-pragmas" -#pragma clang diagnostic ignored "-Wnullability" - -#if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Channelize_API",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") -#endif - - -SWIFT_CLASS("_TtC14Channelize_API12CHActiveCall") -@interface CHActiveCall : NSObject -- (nonnull instancetype)init SWIFT_UNAVAILABLE; -+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable"); -@end - -#if __has_attribute(external_source_symbol) -# pragma clang attribute pop -#endif -#pragma clang diagnostic pop diff --git a/Channelize_API.framework/Headers/Channelize_API.h b/Channelize_API.framework/Headers/Channelize_API.h deleted file mode 100644 index 40b1788..0000000 --- a/Channelize_API.framework/Headers/Channelize_API.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Channelize_API.h -// Channelize-API -// -// Created by Apple on 12/27/18. -// Copyright © 2018 Channelize. All rights reserved. -// - -#import - -//! Project version number for Channelize_API. -FOUNDATION_EXPORT double Channelize_APIVersionNumber; - -//! Project version string for Channelize_API. -FOUNDATION_EXPORT const unsigned char Channelize_APIVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Channelize_API.framework/Info.plist b/Channelize_API.framework/Info.plist deleted file mode 100644 index fa13243..0000000 Binary files a/Channelize_API.framework/Info.plist and /dev/null differ diff --git a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm.swiftdoc b/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm.swiftdoc deleted file mode 100644 index 28eea60..0000000 Binary files a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm.swiftdoc and /dev/null differ diff --git a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm.swiftmodule b/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm.swiftmodule deleted file mode 100644 index cd56c90..0000000 Binary files a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm.swiftmodule and /dev/null differ diff --git a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm64.swiftdoc b/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm64.swiftdoc deleted file mode 100644 index fe015c4..0000000 Binary files a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm64.swiftdoc and /dev/null differ diff --git a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm64.swiftmodule b/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm64.swiftmodule deleted file mode 100644 index df0532d..0000000 Binary files a/Channelize_API.framework/Modules/Channelize_API.swiftmodule/arm64.swiftmodule and /dev/null differ diff --git a/Channelize_API.framework/Modules/module.modulemap b/Channelize_API.framework/Modules/module.modulemap deleted file mode 100644 index 014a1c5..0000000 --- a/Channelize_API.framework/Modules/module.modulemap +++ /dev/null @@ -1,11 +0,0 @@ -framework module Channelize_API { - umbrella header "Channelize_API.h" - - export * - module * { export * } -} - -module Channelize_API.Swift { - header "Channelize_API-Swift.h" - requires objc -} diff --git a/Channelize_Voice_Video.framework/Assets.car b/Channelize_Voice_Video.framework/Assets.car deleted file mode 100644 index 3ac3525..0000000 Binary files a/Channelize_Voice_Video.framework/Assets.car and /dev/null differ diff --git a/Channelize_Voice_Video.framework/Channelize_Voice_Video b/Channelize_Voice_Video.framework/Channelize_Voice_Video deleted file mode 100755 index 699bbb3..0000000 Binary files a/Channelize_Voice_Video.framework/Channelize_Voice_Video and /dev/null differ diff --git a/Channelize_Voice_Video.framework/Headers/Channelize_Voice_Video-Swift.h b/Channelize_Voice_Video.framework/Headers/Channelize_Voice_Video-Swift.h deleted file mode 100644 index a326ce5..0000000 --- a/Channelize_Voice_Video.framework/Headers/Channelize_Voice_Video-Swift.h +++ /dev/null @@ -1,214 +0,0 @@ -// Generated by Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgcc-compat" - -#if !defined(__has_include) -# define __has_include(x) 0 -#endif -#if !defined(__has_attribute) -# define __has_attribute(x) 0 -#endif -#if !defined(__has_feature) -# define __has_feature(x) 0 -#endif -#if !defined(__has_warning) -# define __has_warning(x) 0 -#endif - -#if __has_include() -# include -#endif - -#pragma clang diagnostic ignored "-Wauto-import" -#include -#include -#include -#include - -#if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) -typedef uint_least16_t char16_t; -typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); -#endif - -#if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) -#endif -#if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class -#endif -#if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif -#endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) -#endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) -#endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) -#endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE -#endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT -#endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN -#endif -#if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA -#endif -#if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA -#endif -#if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA -#endif -#if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif -#endif - -#if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -#endif - -#if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) -#endif - -#if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif -#endif -#if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif -#endif -#if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif -#endif -#if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) -#endif -#if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) -#endif -#if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) -#endif -#if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) -#endif -#if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) -#endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) -#endif -#if __has_feature(modules) -@import CallKit; -@import ObjectiveC; -@import UIKit; -#endif - -#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" -#pragma clang diagnostic ignored "-Wduplicate-method-arg" -#if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" -#endif -#pragma clang diagnostic ignored "-Wunknown-pragmas" -#pragma clang diagnostic ignored "-Wnullability" - -#if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="Channelize_Voice_Video",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") -#endif - -@class CXProvider; -@class CXEndCallAction; -@class CXAnswerCallAction; -@class CXStartCallAction; -@class CXSetMutedCallAction; - -SWIFT_CLASS("_TtC22Channelize_Voice_Video12CallProvider") -@interface CallProvider : NSObject -- (nonnull instancetype)init SWIFT_UNAVAILABLE; -+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable"); -- (void)providerDidReset:(CXProvider * _Nonnull)provider; -- (void)provider:(CXProvider * _Nonnull)provider performEndCallAction:(CXEndCallAction * _Nonnull)action; -- (void)provider:(CXProvider * _Nonnull)provider performAnswerCallAction:(CXAnswerCallAction * _Nonnull)action; -- (void)provider:(CXProvider * _Nonnull)provider performStartCallAction:(CXStartCallAction * _Nonnull)action; -- (void)provider:(CXProvider * _Nonnull)provider performSetMutedCallAction:(CXSetMutedCallAction * _Nonnull)action; -@end - - - - - - - - - -#if __has_attribute(external_source_symbol) -# pragma clang attribute pop -#endif -#pragma clang diagnostic pop diff --git a/Channelize_Voice_Video.framework/Headers/Channelize_Voice_Video.h b/Channelize_Voice_Video.framework/Headers/Channelize_Voice_Video.h deleted file mode 100644 index cc51148..0000000 --- a/Channelize_Voice_Video.framework/Headers/Channelize_Voice_Video.h +++ /dev/null @@ -1,19 +0,0 @@ -// -// Channelize_Voice_Video.h -// Channelize_Voice_Video -// -// Created by Ashish-BigStep on 4/3/19. -// Copyright © 2019 Channelize. All rights reserved. -// - -#import - -//! Project version number for Channelize_Voice_Video. -FOUNDATION_EXPORT double Channelize_Voice_VideoVersionNumber; - -//! Project version string for Channelize_Voice_Video. -FOUNDATION_EXPORT const unsigned char Channelize_Voice_VideoVersionString[]; - -// In this header, you should import all the public headers of your framework using statements like #import - - diff --git a/Channelize_Voice_Video.framework/Info.plist b/Channelize_Voice_Video.framework/Info.plist deleted file mode 100644 index 99c90c2..0000000 Binary files a/Channelize_Voice_Video.framework/Info.plist and /dev/null differ diff --git a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm.swiftdoc b/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm.swiftdoc deleted file mode 100644 index 418a47a..0000000 Binary files a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm.swiftdoc and /dev/null differ diff --git a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm.swiftmodule b/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm.swiftmodule deleted file mode 100644 index 2b87f5e..0000000 Binary files a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm.swiftmodule and /dev/null differ diff --git a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm64.swiftdoc b/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm64.swiftdoc deleted file mode 100644 index 5aa59c2..0000000 Binary files a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm64.swiftdoc and /dev/null differ diff --git a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm64.swiftmodule b/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm64.swiftmodule deleted file mode 100644 index 47caef0..0000000 Binary files a/Channelize_Voice_Video.framework/Modules/Channelize_Voice_Video.swiftmodule/arm64.swiftmodule and /dev/null differ diff --git a/Channelize_Voice_Video.framework/Modules/module.modulemap b/Channelize_Voice_Video.framework/Modules/module.modulemap deleted file mode 100644 index 55d95d6..0000000 --- a/Channelize_Voice_Video.framework/Modules/module.modulemap +++ /dev/null @@ -1,11 +0,0 @@ -framework module Channelize_Voice_Video { - umbrella header "Channelize_Voice_Video.h" - - export * - module * { export * } -} - -module Channelize_Voice_Video.Swift { - header "Channelize_Voice_Video-Swift.h" - requires objc -} diff --git a/Channelize_Voice_Video.framework/callEnd.png b/Channelize_Voice_Video.framework/callEnd.png deleted file mode 100644 index 9131540..0000000 Binary files a/Channelize_Voice_Video.framework/callEnd.png and /dev/null differ diff --git a/demo/Assests/CHLocalizable.strings b/demo/Assests/CHLocalizable.strings deleted file mode 100644 index 73857fc..0000000 --- a/demo/Assests/CHLocalizable.strings +++ /dev/null @@ -1,305 +0,0 @@ -"pmImage" = "Photo"; -"pmVideo" = "Video"; -"pmAudio" = "Audio"; -"pmDocument" = "Document"; -"pmActionBarTitle" = "Picture"; -"pmDone" = "Done"; -"pmUpload" = "Upload"; -"pmCameraTxt" = "Taking Pictures"; -"pmMultiImgBtnTitle" = "All photos"; -"pmFolderAll" = "All Images"; -"pmPreview" = "Preview"; -"pmMsgNoCamera" = "No system camera found"; -"pmImageAmountLimit" = "You can select only 10 photos at a time"; -"pmSelectStatus" = "Select Status"; -"pmOnline" = "Online"; -"pmOffline" = "Offline"; -"pmGroupProfile" = "Group Profile"; -"pmLeaveGroupAlert" = "Are you sure you want to leave this group? You will no longer receive new messages."; -"pmLeave" = "Leave"; -"pmCancel" = "Cancel"; -"pmOk" = "OK"; -"pmSave" = "Save"; -"pmLeaveGroup" = "Leave Group"; -"pmChangeName" = "Change Name"; -"pmChangeGroupPhoto" = "Change Group Photo"; -"pmNewMessage" = "Send a message"; -"pmViewProfile" = "View Profile"; -"pmRemoveUser" = "Remove this Person"; -"pmNewGroup" = "New Group"; -"pmSearch" = "Search"; -"pmSuggestions" = "Suggested"; -"pmCreateAdminAlert" = "Are you sure you want to leave the Group? Before leaving, select any of the member listed below as admin of this Group."; -"pmAllowReadExternalStorage" = "You need to provide storage permission to this application to read the content from external storage."; -"pmAllowWriteExternalStorage" = "You need to provide storage permission to this application to write content to external storage."; -"pmAllowCameraPermission" = "You need to provide camera access to click pictures and record videos using this application."; -"pmStorageSettingsMessage" = "This feature needs storage permission, please open the App Info and provide storage permission."; -"pmCameraSettingsMessage" = "This feature needs camera permission, please open the App Info and provide camera permission."; -"pmOpenAppInfo" = "App Info"; -"pmToday" = "Today"; -"pmYesterday" = "Yesterday"; -"pmBlockUserAlert" = "Are you sure you want to block this user? The blocked contacts will no longer be able to send you messages."; -"pmBlockUser" = "Block User"; -"pmBlock" = "Block"; -"pmUnblockUserAlert" = "Unblock %@ to send a message."; -"pmUnblock" = "Unblock User"; -"pmUserTyping" = "%@ is typing…"; -"pmTyping" = "typing…"; -"pmLastseenToday" = "Last seen today at time"; -"pmLastseenDate" = "Last seen on date at time"; -"pmRecent" = "Recent"; -"pmContacts" = "Contacts"; -"pmGroups" = "Groups"; -"pmSettings" = "Settings"; -"pmMembersCountText" = "%@ members"; -"pmSelfMemberText" = "You"; -"pmProfileActivityLabel" = "Profile"; -"pmTypeMessage" = "Type a message…"; -"pmLeftGroupMessage" = "You are no longer a participant in this group"; -"pmNoContacts" = "No contacts available"; -"pmNoGroup" = "No groups available"; -"pmNoBlockedContacts" = "You don't have any blocked contacts"; -"pmNoRecentChats" = "Try make friends and start new conversation"; -"pmNoDataMsg" = "No results found"; -"pmBlockedUsers" = "Blocked Users"; -"pmDefaultLanguage" = "Default Language"; -"pmNotifications" = "Notifications"; -"pmIm" = "I\'m"; -"pmDeletedUser" = "Deleted User"; -"pmThisUser" = "this user"; -"pmAddMembers" = "Add Members"; -"pmMember" = "Members"; -"pmActiveTimeText" = "%@\u0020%@"; -"pmActive" = "Active"; -"pmGroupNameHint" = "Name (ex: Family)"; -"pmSearchContacts" = "Search contacts to add "; -"pmEnterGroupName" = "Please enter Group name"; -"pmMemberCountErrorMsg" = "Select at least one contact to create Group"; -"pmFileSizeLimit" = "Please select a file less than 25Mb"; -"pmAdminText" = "admin"; -"pmBlockedMessage" = "This user is blocked. Unblock this user to send a message and to make a call."; -"pmRetry" = "RETRY"; -"pmSeen" = "Seen"; -"pmSent" = "Sent"; -"pmDelivered" = "Delivered"; -"pmCreate" = "Create"; -"pmLogout" = "Logout"; -"pmFile" = "File"; -"pmEditParticipant" = "Edit Participants"; -"pmSendImage" = "Send Photos"; -"pmSendVideo" = "Send Video"; -"pmLastSeen" = "Last seen"; -"pmSomeoneLbl" = "Someone is"; -"pmCreateAdmin" = "Choose a new Admin"; -"pmChooseAdmin" = "Choose an Admin"; -"pmChoose" = "Choose"; -"pmAlertMessage" = "What would you like to do?"; -"pmUserProfile" = "User Profile"; -"pmSearchUser" = "Search User"; -"pmEditMembers" = "Edit Members"; -"pmAdd" = "Add"; -"pmBack" = "Back"; -"pmRemove" = "Remove"; -"pmEditName" = "Edit Name"; -"pmChangeNameMsg" = "Change the name of"; -"pmRemoveUserAlert" = "They won't be able to continue chatting with this group"; -"pmTypeName" = "Type a Name..."; -"pmLeftGroupAlert" = "You have successfully left the group. You will no longer receive new message"; -"pmShowOnline" = "Show Online"; -"pmLastseenText" = "Last seen"; -"pmAttachFile" = "Send a file"; -"pmChangeImage" = "Change Profile Image"; -"pmTotalMembers" = "Total Members"; -"pmSettingsSavedNotificationText" = "Your Settings have been saved"; -"pmShowMoreText" = "Show More"; -"pmRecentMessagesText" = "Recent messages"; -"pmBlockedUserText" = "This user is blocked. Unblock this user to send a message"; -"pmAudioSoonLoadText" = "Audio Will Load Soon"; -"pmMakeGroupAdminText" = "Make Admin"; -"pmChangeGroupAdminText" = "Are you sure you want to make him/her Group Admin? This will give him/her access to all Admin rights"; -"pmYes" = "Yes"; -"pmNo" = "No"; -"pmWhatLikeToDoText" = "Are you sure you want to remove this member from group?"; -"pmFilesNotification" = "You’re not allowed to share files other than Audio, Video and Image. File size should be less than 25MB."; -"pmNoMediaFound" = "No Media Found"; -"pmGroupAdminText" = "Group Admin"; -"pmShortTitleGroupCreate" = "Title is Short"; -"pmLongTitleGroupCreate" = "Title is Large"; -"pmUploadItemNotImage" = "The Uploaded Item is not an Image"; -"pmMessage" = "Message"; -"pmPressEnterSearch" = "Press Enter To Search"; -"pmDelete" = "Delete"; -"pmClear" = "Clear"; -"pmConversation" = "Conversation"; -"pmClearConversation" = "Clear Conversation"; -"pmDeleteConversation" = "Delete Conversation"; -"pmSelectMessagesDelete" = "Select Messages To Delete"; -"pmDeleteConversationAlert" = "Are you sure you want to delete this conversation? Once deleted, it cannot be undone."; -"pmDeleteConversationMessage" = "Deleting conversation"; -"pmDeleteMessages" = "Delete Messages"; -"pmDeleteSingleMessage" = "Delete Message"; -"pmDeleteSelectedConfirm" = "Are you sure you want to delete %s messages? Once you delete, it cannot be undone. "; -"pmClearConversationAlert" = "Are you sure you want to clear this conversation? Once cleared, it cannot be undone."; -"pmClearConversationMessage" = "Clearing conversation"; -"pmMenuItemDelete" = "Delete"; -"pmDeleteMessagesAlert" = "Are you sure you want to delete %@ messages? Once deleted, it can't be undone."; -"pmUserBlockedMessage" = "User has been blocked successfully"; -"pmUserUnblockedMessage" = "User has been unblocked successfully"; -"pmMessaging" = "Messaging"; -"pmEmoji" = "Emoji"; -"pmSaving" = "Saving"; -"pmUploading" = "Uploading"; -"pmCreatingGroup" = "Creating Group"; -"pmPeople" = "People"; -"pmGroupConversation" = "Group Conversations"; -"pmMuteConversation" = "Mute Conversation"; -"pmUnmuteConversation" = "UnMute Conversation"; -"pmMuteAlert" = "Are you sure you want to mute this conversation?"; -"pmUnmuteAlert" = "Are You Want To Unmute this chat"; -"pmMessageCountOne" = "%@ message"; -"pmMessageCountOther" = "%@ messages"; -"pmUserDeletedText" = "This user has been deleted, you can't reply in this conversation."; -"pmAddGroupAdminText" = "You will be make this user an admin. Do you want to continue?"; -"pmAddGroupAdminAlertText" = "As you are the only admin. You need to make someone as admin before leaving group"; -"pmDeletedMember" = "Deleted Member"; -"pmConnected" = "Connected"; -"pmDisconnected" = "Disconnected"; -"pmUnreadMessagesText" = "Unread Messages"; -"pmUsersTyping" = "%@ are typing…"; -"pmSomethingWentWrong" = "Something went wrong, Please try again."; -"pmLeavingGroupMessage" = "Leaving group"; -"pmDeletingChatMessages" = "Deleting messages"; -"pmDeletingChatMessage" = "Deleting message"; -"pmAddingChatMembers" = "Adding members"; -"pmAndText" = "and"; -"pmAreTyping" = "are typing"; -"pmRemoving" = "Removing"; -"pmUpdating" = "Updating"; -"pmPleaseWait" = "Please wait"; -"pmSelectMembers_to_add_in_group" = "Select member\'s name to add them to this group"; -"pmAdminLeaveGroupAlertMessage" = "Make someone else Group Admin before leaving the Group."; -"pmUserCanNotReply" = "You can\'t reply in this conversation"; -"pmTapRetry" = "Tap to retry"; -"pmConnecting" = "Connecting"; -"pmMenuItemCopy" = "Copy"; -"pmTextCopied" = "Copied to clipborad"; -"pmAllMembers" = "All Contacts"; -"pmNoMessages" = "No messages. Be the first one to share photos, videos and much more."; -"pmFileDeleted" = "This file has been deleted."; -"pmChoose" = "Choose"; -"pmRemoved" = "Removed"; -"pmAddedAsAdmin" = "%@ added as Admin"; -"pmUpdated" = "Updated successfully"; -"pmFailed" = "Failed"; -"pmAddSuccess" = "Added successfully"; -"pmCreateBeforeSuccess" = "Please wait while we set up the group"; -"pmCreateAfterSuccess" = "Group created successfully"; -"pmSingleDeleteSelectedConfirm" = "Are you sure you want to delete this message? Once you delete, it cannot be undone. "; -"pmMetaGroupCreate" = "%@ created group %@"; -"pmMetaGroupAddMembers" = "%@ added %@"; -"pmMetaGroupRemoveMembers" = "%@ removed %@"; -"pmMetaGroupLeave" = "%@ left"; -"pmMetaGroupMakeAdmin" = "%@ are now an admin"; -"pmMetaGroupChangeTitle" = "%@ changed the title to %@"; -"pmMetaGroupChangePhoto" = "%@ changed group photo"; -"pmMetaCallVideoMissed" = "%@ missed a call from %@"; -"pmMetaCallVoiceMissed" = "%@ missed a call from %@"; -"pmGif" = "GIF"; -"pmSticker" = "Sticker"; -"pmStickerAndGif" = "Send Stickers and GIFs"; -"pmLocation" = "Send Location"; -"pmNearby" = "Nearby"; -"pmMore" = "More"; -"pmNewChat" = "New Chat"; -"pmYou" = "You"; -"pmReply" = "Reply"; -"pmAudioRecordingProgress" = "Release to Send, Drag up to Discard"; -"pmAudioRecordingCancel" = "Release to Cancel"; -"pmMicrophonePermission" = "Microphone Permission"; -"pmMicrophoneMessage" = "For Audio Recording, In iPhone settings, tap App and turn on Microphone"; -"pmOpenAppSetting" = "Open Settings"; -"pmYearsAgo" = "%@ years ago"; -"pmOneYearAgo" = "1 Year Ago"; -"pmLastYear" = "Last Year"; -"pmMonthsAgo" = "%@ months ago"; -"pmOneMonthAgo" = "1 Month Ago"; -"pmLastMonth" = "Last Month"; -"pmWeeksAgo" = "%@ weeks ago"; -"pmOneWeekAgo" = "1 Week Ago"; -"pmLastWeek" = "Last Week"; -"pmDaysAgo" = "%@ days ago"; -"pmOneDayAgo" = "1 Day Ago"; -"pmHoursAgo" = "%@ hours ago"; -"pmOneHourAgo" = "1 Hour Ago"; -"pmAnHourAgo" = "an hour ago"; -"pmMinutesAgo" = "%@ Minutes Ago"; -"pmOneMinAgo" = "1 minute ago"; -"pmAMinAgo" = "a min ago"; -"pmSecondsAgo" = "%@ sec ago"; -"pmJustNow" = "Just Now"; -"pmAudioButtonTip" = "Press and Hold Mic Icon to send Audio clip"; -"pmCalls" = "Calls"; -"pmMakeCall" = "Make a call"; -"pmIncoming" = "Incoming"; -"pmRejected" = "Rejected"; -"pmOutgoing" = "Outgoing"; -"pmMissed" = "Missed"; -"pmCalling" = "Calling"; -"pmRinging" = "Ringing"; -"pmNoResponse" = "No Response"; -"pmBusyOnAnotherCall" = "Busy on another call"; -"pmEndCall" = "Call Ended"; -"pmDeleteCallLogMessage" = "Deleting Call Log"; -"pmDeleteCalls" = "Delete Call Log"; -"pmDeleteCallsAlert" = "Are you sure you want to delete this call? Once deleted, it can not be undone"; -"pmYou" = "You"; -"pmReply" = "Reply"; -"pmNoCallLogs" = "No Call Logs available"; -"pmNoCallHistory" = "No Call History"; -"pmAudioRecordingProgress" = "Release to Send, Drag up to Discard"; -"pmAudioRecordingCancel" = "Release to Cancel"; -"pmMicrophonePermission" = "Microphone Permission"; -"pmMicrophoneMessage" = "For Audio Recording, In iPhone settings, tap App and turn on Microphone"; -"pmOpenAppSetting" = "Open Settings"; -"pmYearsAgo" = "%@ years ago"; -"pmOneYearAgo" = "1 Year Ago"; -"pmLastYear" = "Last Year"; -"pmMonthsAgo" = "%@ months ago"; -"pmOneMonthAgo" = "1 Month Ago"; -"pmLastMonth" = "Last Month"; -"pmWeeksAgo" = "%@ weeks ago"; -"pmOneWeekAgo" = "1 Week Ago"; -"pmLastWeek" = "Last Week"; -"pmDaysAgo" = "%@ days ago"; -"pmOneDayAgo" = "1 Day Ago"; -"pmHoursAgo" = "%@ hours ago"; -"pmOneHourAgo" = "1 Hour Ago"; -"pmAnHourAgo" = "an hour ago"; -"pmMinutesAgo" = "%@ Minutes Ago"; -"pmOneMinAgo" = "1 minute ago"; -"pmAMinAgo" = "a min ago"; -"pmSecondsAgo" = "%@ sec ago"; -"pmJustNow" = "Just Now"; -"pmAudioButtonTip" = "Press and Hold Mic Icon to send Audio clip"; -"pmVideoCallResolution" = "Video Call Resolution"; -"pmVoiceMessageError" = "The voice message is too short. Please record at-least 2 seconds."; -"pmGroupCreationHint" = "Please provide a group title and optional group icon."; -"pmVoiceMessageRecordError" = "You cannot record voice messages during a call."; -"pmAnotherCallError" = "You cannot make another call during an ongoing call."; -"pmCameraAccessError" = "You cannot use Camera during a call."; -"pmGroupTitle" = "Group Title"; -"pmCallReject" = "Call Rejected"; -"pmRemoteVideoMuted" = "%@ muted Video"; -"pmRemoteAudioMuted" = "%@ muted Audio"; -"pmVoiceCall" = "Voice Call"; -"pmVideoCall" = "Video Call"; -"pmMessageDeleted" = "This message was deleted"; -"pmDeleteForEveryone" = "Delete for everyone"; -"pmCallBack" = "Call Back"; -"pmUserMissedVoiceCall" = "%@ missed voice call"; -"pmUserMissedVideoCall" = "%@ missed video call"; -"pmError" = "Error"; -"pmLocationText" = "Location"; -"pmUserBlockCallError" = "User is blocked. You can't make a call."; -"pmUserHasBlockCallError" = "You can't make a call."; -"pmDeleteForMe" = "Delete for me"; diff --git a/demo/Assests/XCODE10GIF.gif b/demo/Assests/XCODE10GIF.gif deleted file mode 100644 index 54bfbbc..0000000 Binary files a/demo/Assests/XCODE10GIF.gif and /dev/null differ diff --git a/demo/Assests/Xcode10_GiphyCoreSDK.framework.zip b/demo/Assests/Xcode10_GiphyCoreSDK.framework.zip deleted file mode 100644 index ff88691..0000000 Binary files a/demo/Assests/Xcode10_GiphyCoreSDK.framework.zip and /dev/null differ diff --git a/demo/Assests/Xcode11_GiphyCoreSDK.framework.zip b/demo/Assests/Xcode11_GiphyCoreSDK.framework.zip deleted file mode 100644 index c0820cc..0000000 Binary files a/demo/Assests/Xcode11_GiphyCoreSDK.framework.zip and /dev/null differ diff --git a/demo/Assests/framwork_placement.png b/demo/Assests/framwork_placement.png deleted file mode 100644 index 831e7a8..0000000 Binary files a/demo/Assests/framwork_placement.png and /dev/null differ diff --git a/demo/Assests/xcode11Giphy.gif b/demo/Assests/xcode11Giphy.gif deleted file mode 100644 index db9600c..0000000 Binary files a/demo/Assests/xcode11Giphy.gif and /dev/null differ diff --git a/demo/GiphyCoreSDK.framework/GiphyCoreSDK b/demo/GiphyCoreSDK.framework/GiphyCoreSDK deleted file mode 100755 index 8fb9d76..0000000 Binary files a/demo/GiphyCoreSDK.framework/GiphyCoreSDK and /dev/null differ diff --git a/demo/GiphyCoreSDK.framework/Headers/GiphyCoreSDK-Swift.h b/demo/GiphyCoreSDK.framework/Headers/GiphyCoreSDK-Swift.h deleted file mode 100644 index 1bb1538..0000000 --- a/demo/GiphyCoreSDK.framework/Headers/GiphyCoreSDK-Swift.h +++ /dev/null @@ -1,1319 +0,0 @@ -// Generated by Apple Swift version 4.2.1 (swiftlang-1000.11.42 clang-1000.11.45.1) -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wgcc-compat" - -#if !defined(__has_include) -# define __has_include(x) 0 -#endif -#if !defined(__has_attribute) -# define __has_attribute(x) 0 -#endif -#if !defined(__has_feature) -# define __has_feature(x) 0 -#endif -#if !defined(__has_warning) -# define __has_warning(x) 0 -#endif - -#if __has_include() -# include -#endif - -#pragma clang diagnostic ignored "-Wauto-import" -#include -#include -#include -#include - -#if !defined(SWIFT_TYPEDEFS) -# define SWIFT_TYPEDEFS 1 -# if __has_include() -# include -# elif !defined(__cplusplus) -typedef uint_least16_t char16_t; -typedef uint_least32_t char32_t; -# endif -typedef float swift_float2 __attribute__((__ext_vector_type__(2))); -typedef float swift_float3 __attribute__((__ext_vector_type__(3))); -typedef float swift_float4 __attribute__((__ext_vector_type__(4))); -typedef double swift_double2 __attribute__((__ext_vector_type__(2))); -typedef double swift_double3 __attribute__((__ext_vector_type__(3))); -typedef double swift_double4 __attribute__((__ext_vector_type__(4))); -typedef int swift_int2 __attribute__((__ext_vector_type__(2))); -typedef int swift_int3 __attribute__((__ext_vector_type__(3))); -typedef int swift_int4 __attribute__((__ext_vector_type__(4))); -typedef unsigned int swift_uint2 __attribute__((__ext_vector_type__(2))); -typedef unsigned int swift_uint3 __attribute__((__ext_vector_type__(3))); -typedef unsigned int swift_uint4 __attribute__((__ext_vector_type__(4))); -#endif - -#if !defined(SWIFT_PASTE) -# define SWIFT_PASTE_HELPER(x, y) x##y -# define SWIFT_PASTE(x, y) SWIFT_PASTE_HELPER(x, y) -#endif -#if !defined(SWIFT_METATYPE) -# define SWIFT_METATYPE(X) Class -#endif -#if !defined(SWIFT_CLASS_PROPERTY) -# if __has_feature(objc_class_property) -# define SWIFT_CLASS_PROPERTY(...) __VA_ARGS__ -# else -# define SWIFT_CLASS_PROPERTY(...) -# endif -#endif - -#if __has_attribute(objc_runtime_name) -# define SWIFT_RUNTIME_NAME(X) __attribute__((objc_runtime_name(X))) -#else -# define SWIFT_RUNTIME_NAME(X) -#endif -#if __has_attribute(swift_name) -# define SWIFT_COMPILE_NAME(X) __attribute__((swift_name(X))) -#else -# define SWIFT_COMPILE_NAME(X) -#endif -#if __has_attribute(objc_method_family) -# define SWIFT_METHOD_FAMILY(X) __attribute__((objc_method_family(X))) -#else -# define SWIFT_METHOD_FAMILY(X) -#endif -#if __has_attribute(noescape) -# define SWIFT_NOESCAPE __attribute__((noescape)) -#else -# define SWIFT_NOESCAPE -#endif -#if __has_attribute(warn_unused_result) -# define SWIFT_WARN_UNUSED_RESULT __attribute__((warn_unused_result)) -#else -# define SWIFT_WARN_UNUSED_RESULT -#endif -#if __has_attribute(noreturn) -# define SWIFT_NORETURN __attribute__((noreturn)) -#else -# define SWIFT_NORETURN -#endif -#if !defined(SWIFT_CLASS_EXTRA) -# define SWIFT_CLASS_EXTRA -#endif -#if !defined(SWIFT_PROTOCOL_EXTRA) -# define SWIFT_PROTOCOL_EXTRA -#endif -#if !defined(SWIFT_ENUM_EXTRA) -# define SWIFT_ENUM_EXTRA -#endif -#if !defined(SWIFT_CLASS) -# if __has_attribute(objc_subclassing_restricted) -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) __attribute__((objc_subclassing_restricted)) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# else -# define SWIFT_CLASS(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# define SWIFT_CLASS_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_CLASS_EXTRA -# endif -#endif - -#if !defined(SWIFT_PROTOCOL) -# define SWIFT_PROTOCOL(SWIFT_NAME) SWIFT_RUNTIME_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -# define SWIFT_PROTOCOL_NAMED(SWIFT_NAME) SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_PROTOCOL_EXTRA -#endif - -#if !defined(SWIFT_EXTENSION) -# define SWIFT_EXTENSION(M) SWIFT_PASTE(M##_Swift_, __LINE__) -#endif - -#if !defined(OBJC_DESIGNATED_INITIALIZER) -# if __has_attribute(objc_designated_initializer) -# define OBJC_DESIGNATED_INITIALIZER __attribute__((objc_designated_initializer)) -# else -# define OBJC_DESIGNATED_INITIALIZER -# endif -#endif -#if !defined(SWIFT_ENUM_ATTR) -# if defined(__has_attribute) && __has_attribute(enum_extensibility) -# define SWIFT_ENUM_ATTR(_extensibility) __attribute__((enum_extensibility(_extensibility))) -# else -# define SWIFT_ENUM_ATTR(_extensibility) -# endif -#endif -#if !defined(SWIFT_ENUM) -# define SWIFT_ENUM(_type, _name, _extensibility) enum _name : _type _name; enum SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# if __has_feature(generalized_swift_name) -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) enum _name : _type _name SWIFT_COMPILE_NAME(SWIFT_NAME); enum SWIFT_COMPILE_NAME(SWIFT_NAME) SWIFT_ENUM_ATTR(_extensibility) SWIFT_ENUM_EXTRA _name : _type -# else -# define SWIFT_ENUM_NAMED(_type, _name, SWIFT_NAME, _extensibility) SWIFT_ENUM(_type, _name, _extensibility) -# endif -#endif -#if !defined(SWIFT_UNAVAILABLE) -# define SWIFT_UNAVAILABLE __attribute__((unavailable)) -#endif -#if !defined(SWIFT_UNAVAILABLE_MSG) -# define SWIFT_UNAVAILABLE_MSG(msg) __attribute__((unavailable(msg))) -#endif -#if !defined(SWIFT_AVAILABILITY) -# define SWIFT_AVAILABILITY(plat, ...) __attribute__((availability(plat, __VA_ARGS__))) -#endif -#if !defined(SWIFT_DEPRECATED) -# define SWIFT_DEPRECATED __attribute__((deprecated)) -#endif -#if !defined(SWIFT_DEPRECATED_MSG) -# define SWIFT_DEPRECATED_MSG(...) __attribute__((deprecated(__VA_ARGS__))) -#endif -#if __has_feature(attribute_diagnose_if_objc) -# define SWIFT_DEPRECATED_OBJC(Msg) __attribute__((diagnose_if(1, Msg, "warning"))) -#else -# define SWIFT_DEPRECATED_OBJC(Msg) SWIFT_DEPRECATED_MSG(Msg) -#endif -#if __has_feature(modules) -@import Foundation; -@import ObjectiveC; -#endif - -#pragma clang diagnostic ignored "-Wproperty-attribute-mismatch" -#pragma clang diagnostic ignored "-Wduplicate-method-arg" -#if __has_warning("-Wpragma-clang-attribute") -# pragma clang diagnostic ignored "-Wpragma-clang-attribute" -#endif -#pragma clang diagnostic ignored "-Wunknown-pragmas" -#pragma clang diagnostic ignored "-Wnullability" - -#if __has_attribute(external_source_symbol) -# pragma push_macro("any") -# undef any -# pragma clang attribute push(__attribute__((external_source_symbol(language="Swift", defined_in="GiphyCoreSDK",generated_declaration))), apply_to=any(function,enum,objc_interface,objc_category,objc_protocol)) -# pragma pop_macro("any") -#endif - - - -@class GPHRequestConfig; -@class NSURLResponse; -@class NSOperation; - -/// GIPHY Abstract API Client. -SWIFT_CLASS("_TtC12GiphyCoreSDK17GPHAbstractClient") -@interface GPHAbstractClient : NSObject -/// Giphy API key. -@property (nonatomic, copy) NSString * _Nullable _apiKey; -/// Default timeout for network requests. Default: 10 seconds. -@property (nonatomic) NSTimeInterval timeout; -/// Network reachability status. Not supported in watchOS. -@property (nonatomic) BOOL useReachability; -/// Perform a request -/// \param config GPHRequestConfig -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)httpRequestWith:(GPHRequestConfig * _Nonnull)config completionHandler:(void (^ _Nonnull)(NSDictionary * _Nullable, NSURLResponse * _Nullable, NSError * _Nullable))completionHandler; -- (nonnull instancetype)init SWIFT_UNAVAILABLE; -+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable"); -@end - - -/// Sub-classing Operation to make sure we manage its state correctly -SWIFT_CLASS("_TtC12GiphyCoreSDK17GPHAsyncOperation") -@interface GPHAsyncOperation : NSOperation -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - -@interface GPHAsyncOperation (SWIFT_EXTENSION(GiphyCoreSDK)) -/// To handle KVO for ready state -@property (nonatomic, readonly, getter=isReady) BOOL ready; -/// To handle KVO for ready executing -@property (nonatomic, readonly, getter=isExecuting) BOOL executing; -/// To handle KVO for finished state -@property (nonatomic, readonly, getter=isFinished) BOOL finished; -/// Override so we can claim to be async. -@property (nonatomic, readonly, getter=isAsynchronous) BOOL asynchronous; -/// Override to manage the state correctly for async. -- (void)start; -/// Override to handle canceling so we can change the state to trigger KVO. -- (void)cancel; -@end - - -/// A specific type of async operation with a completion handler. -SWIFT_CLASS("_TtC12GiphyCoreSDK31GPHAsyncOperationWithCompletion") -@interface GPHAsyncOperationWithCompletion : GPHAsyncOperation -- (nonnull instancetype)init SWIFT_UNAVAILABLE; -+ (nonnull instancetype)new SWIFT_DEPRECATED_MSG("-init is unavailable"); -@end - - -SWIFT_CLASS("_TtC12GiphyCoreSDK13GPHFilterable") -@interface GPHFilterable : NSObject -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, copy) BOOL (^ _Nullable filter)(GPHFilterable * _Nonnull);) -+ (BOOL (^ _Nullable)(GPHFilterable * _Nonnull))filter SWIFT_WARN_UNUSED_RESULT; -+ (void)setFilter:(BOOL (^ _Nullable)(GPHFilterable * _Nonnull))value; -- (BOOL)isValidObject SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - -@class NSCoder; - -/// Represents a Giphy Bottle Data -SWIFT_CLASS("_TtC12GiphyCoreSDK13GPHBottleData") -@interface GPHBottleData : GPHFilterable -/// Tid. -@property (nonatomic, readonly, copy) NSString * _Nonnull tid; -/// Tags. -@property (nonatomic, readonly, copy) NSArray * _Nullable tags; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param tid tid. -/// -- (nonnull instancetype)init:(NSString * _Nonnull)tid; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHBottleData (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - -@class GPHMedia; - -/// Represents Giphy Categories & Subcategories -SWIFT_CLASS("_TtC12GiphyCoreSDK11GPHCategory") -@interface GPHCategory : GPHFilterable -/// Name of the Category. -@property (nonatomic, readonly, copy) NSString * _Nonnull name; -/// Encoded name of the Category. -@property (nonatomic, readonly, copy) NSString * _Nonnull nameEncoded; -/// URL Encoded path of the Category (to make sure we have the full-path for subcategories). -@property (nonatomic, readonly, copy) NSString * _Nonnull encodedPath; -/// GIF representation of the Category. -@property (nonatomic, readonly, strong) GPHMedia * _Nullable gif; -/// Subcategories of the Category. -@property (nonatomic, readonly, copy) NSArray * _Nullable subCategories; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param name Name of the Category. -/// -/// \param nameEncoded URL Encoded name of the Category. -/// -/// \param encodedPath URL Encoded path of the Category (to make sure we have the full-path for subcategories). -/// -- (nonnull instancetype)init:(NSString * _Nonnull)name nameEncoded:(NSString * _Nonnull)nameEncoded encodedPath:(NSString * _Nonnull)encodedPath; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - -@interface GPHCategory (SWIFT_EXTENSION(GiphyCoreSDK)) -- (void)addSubCategory:(GPHCategory * _Nonnull)subCategory; -@end - - - - -@interface GPHCategory (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - -@class GPHUser; -@class GPHChannelTag; - -/// Represents Giphy Channels -SWIFT_CLASS("_TtC12GiphyCoreSDK10GPHChannel") -@interface GPHChannel : GPHFilterable -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly) NSInteger StickersRootId;) -+ (NSInteger)StickersRootId SWIFT_WARN_UNUSED_RESULT; -/// ID of this Channel. -@property (nonatomic, readonly) NSInteger id; -/// Slug of the Channel. -@property (nonatomic, readonly, copy) NSString * _Nullable slug; -/// Display name of the Channel. -@property (nonatomic, readonly, copy) NSString * _Nullable displayName; -/// Shortd display name of the Channel. -@property (nonatomic, readonly, copy) NSString * _Nullable shortDisplayName; -/// Type for this Channel. -@property (nonatomic, readonly, copy) NSString * _Nullable type; -/// Content Type (Gif or Sticker) of the Channel -@property (nonatomic, readonly, copy) NSString * _Nullable contentType; -/// Description of the Channel. -@property (nonatomic, readonly, copy) NSString * _Nullable descriptionText; -/// Banner Image of the Channel. -@property (nonatomic, readonly, copy) NSString * _Nullable bannerImage; -/// [optional] The featured gif for the pack itself. -@property (nonatomic, readonly, strong) GPHMedia * _Nullable featuredGif; -/// User who owns this Channel. -@property (nonatomic, readonly, strong) GPHUser * _Nullable user; -/// A list of tags for this Channel. -@property (nonatomic, readonly, copy) NSArray * _Nullable tags; -/// A list of direct ancestors of this Channel. -@property (nonatomic, readonly, copy) NSArray * _Nonnull ancestors; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param id ID of the Channel. -/// -- (nonnull instancetype)init:(NSInteger)id; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHChannel (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - -@class GPHMeta; - -/// Represents a Giphy Response Meta Info -SWIFT_CLASS("_TtC12GiphyCoreSDK11GPHResponse") -@interface GPHResponse : NSObject -/// Message description. -@property (nonatomic, strong) GPHMeta * _Nonnull meta; -/// Initializer -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -/// Convenience Initializer -/// \param meta init with a GPHMeta object. -/// -- (nonnull instancetype)init:(GPHMeta * _Nonnull)meta; -@end - - -/// Represents a Giphy List Channel Response (multiple results) -SWIFT_CLASS("_TtC12GiphyCoreSDK18GPHChannelResponse") -@interface GPHChannelResponse : GPHResponse -/// Channel object. -@property (nonatomic, readonly, strong) GPHChannel * _Nullable data; -/// Convenience Initializer -/// \param meta init with a GPHMeta object. -/// -/// \param data GPHChannel object. -/// -- (nonnull instancetype)init:(GPHMeta * _Nonnull)meta data:(GPHChannel * _Nullable)data; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHChannelResponse (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents Giphy A Channel Tag Object -SWIFT_CLASS("_TtC12GiphyCoreSDK13GPHChannelTag") -@interface GPHChannelTag : GPHFilterable -/// Display name of the Channel. -@property (nonatomic, readonly, copy) NSString * _Nullable tag; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHChannelTag (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - -enum GPHMediaType : NSInteger; -enum GPHRatingType : NSInteger; -enum GPHLanguageType : NSInteger; -@class GPHListMediaResponse; -@class GPHMediaResponse; -@class GPHListCategoryResponse; -@class GPHListTermSuggestionResponse; -@class GPHListChannelResponse; - -/// Entry point into the Swift API. -SWIFT_CLASS("_TtC12GiphyCoreSDK9GPHClient") -@interface GPHClient : GPHAbstractClient -/// Giphy API key. -@property (nonatomic, copy) NSString * _Nonnull apiKey; -/// Initializer -/// \param apiKey Apps api-key to access end-points. -/// -- (nonnull instancetype)initWithApiKey:(NSString * _Nonnull)apiKey OBJC_DESIGNATED_INITIALIZER; -/// Perform a search. -/// \param query Search parameters. -/// -/// \param media Media type (default: .gif) -/// -/// \param offset Offset of results (default: 0) -/// -/// \param limit Total hits you request (default: 25) -/// -/// \param rating maximum rating of returned content (default R) -/// -/// \param lang Language of the content (default English) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)search:(NSString * _Nonnull)query media:(enum GPHMediaType)media offset:(NSInteger)offset limit:(NSInteger)limit rating:(enum GPHRatingType)rating lang:(enum GPHLanguageType)lang completionHandler:(void (^ _Nonnull)(GPHListMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Trending -/// \param media Media type (default: .gif) -/// -/// \param offset offset of results (default: 0) -/// -/// \param limit total hits you request (default: 25) -/// -/// \param rating maximum rating of returned content (default R) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)trending:(enum GPHMediaType)media offset:(NSInteger)offset limit:(NSInteger)limit rating:(enum GPHRatingType)rating completionHandler:(void (^ _Nonnull)(GPHListMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Translate -/// \param term term or phrase to translate into a GIF|Sticker -/// -/// \param media Media type (default: .gif) -/// -/// \param rating maximum rating of returned content (default R) -/// -/// \param lang language of the content (default English) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)translate:(NSString * _Nonnull)term media:(enum GPHMediaType)media rating:(enum GPHRatingType)rating lang:(enum GPHLanguageType)lang completionHandler:(void (^ _Nonnull)(GPHMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Random -/// Example: http://api.giphy.com/v1/gifs/random?api_key=dc6zaTOxFJmzC&tag=cats -/// \param query Search parameters. -/// -/// \param media Media type (default: .gif) -/// -/// \param rating maximum rating of returned content (default R) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)random:(NSString * _Nonnull)query media:(enum GPHMediaType)media rating:(enum GPHRatingType)rating completionHandler:(void (^ _Nonnull)(GPHMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -/// GIF by ID -/// \param id GIF ID. -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)gifByID:(NSString * _Nonnull)id completionHandler:(void (^ _Nonnull)(GPHMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -/// GIFs by IDs -/// \param ids array of GIF IDs. -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)gifsByIDs:(NSArray * _Nonnull)ids completionHandler:(void (^ _Nonnull)(GPHListMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Top Categories for GIFs -/// \param offset offset of results (default: 0) -/// -/// \param limit total hits you request (default: 25) -/// -/// \param sort API-specific sorting convention to use (default: blank) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)categoriesForGifs:(NSInteger)offset limit:(NSInteger)limit sort:(NSString * _Nonnull)sort completionHandler:(void (^ _Nonnull)(GPHListCategoryResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Sub-Categories for GIFs -/// \param category top category to get sub-categories from -/// -/// \param offset offset of results (default: 0) -/// -/// \param limit total hits you request (default: 25) -/// -/// \param sort API-specific sorting convention to use (default: blank) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)subCategoriesForGifs:(NSString * _Nonnull)category offset:(NSInteger)offset limit:(NSInteger)limit sort:(NSString * _Nonnull)sort completionHandler:(void (^ _Nonnull)(GPHListCategoryResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Category Content (only works with Sub-categories / top categories won’t return content) -/// \param category top category -/// -/// \param subCategory sub-category to get contents from -/// -/// \param offset offset of results (default: 0) -/// -/// \param limit total hits you request (default: 25) -/// -/// \param rating maximum rating of returned content (default R) -/// -/// \param lang language of the content (default English) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)gifsByCategory:(NSString * _Nonnull)category subCategory:(NSString * _Nonnull)subCategory offset:(NSInteger)offset limit:(NSInteger)limit rating:(enum GPHRatingType)rating lang:(enum GPHLanguageType)lang completionHandler:(void (^ _Nonnull)(GPHListMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Term Suggestions -/// \param term Word/Words -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)termSuggestions:(NSString * _Nonnull)term completionHandler:(void (^ _Nonnull)(GPHListTermSuggestionResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Get a channel by id -/// \param channelId channel id -/// -/// \param media the media type gif/stickers -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)channel:(NSInteger)channelId media:(enum GPHMediaType)media completionHandler:(void (^ _Nonnull)(GPHChannelResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Get a channel children -/// \param channelId channel id -/// -/// \param offset Offset of results (default: 0) -/// -/// \param limit Total hits you request (default: 25) -/// -/// \param media the media type gif/stickers -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)channelChildren:(NSInteger)channelId offset:(NSInteger)offset limit:(NSInteger)limit media:(enum GPHMediaType)media completionHandler:(void (^ _Nonnull)(GPHListChannelResponse * _Nullable, NSError * _Nullable))completionHandler; -/// Get a channel gifs -/// \param channelId channel id -/// -/// \param offset Offset of results (default: 0) -/// -/// \param limit Total hits you request (default: 25) -/// -/// \param completionHandler Completion handler to be notified of the request’s outcome. -/// -/// -/// returns: -/// A cancellable operation. -- (NSOperation * _Nonnull)channelContent:(NSInteger)channelId offset:(NSInteger)offset limit:(NSInteger)limit media:(enum GPHMediaType)media completionHandler:(void (^ _Nonnull)(GPHListMediaResponse * _Nullable, NSError * _Nullable))completionHandler; -@end - - -enum GPHRenditionType : NSInteger; - -/// Represents a Giphy Image (GIF/Sticker) -SWIFT_CLASS("_TtC12GiphyCoreSDK8GPHImage") -@interface GPHImage : GPHFilterable -/// ID of the Represented GPHMedia Object. -@property (nonatomic, readonly, copy) NSString * _Nonnull mediaId; -/// ID of the Represented Object. -@property (nonatomic, readonly) enum GPHRenditionType rendition; -/// URL of the Gif file. -@property (nonatomic, readonly, copy) NSString * _Nullable gifUrl; -/// URL of the Still Gif file. -@property (nonatomic, readonly, copy) NSString * _Nullable stillGifUrl; -/// Width. -@property (nonatomic, readonly) NSInteger width; -/// Height. -@property (nonatomic, readonly) NSInteger height; -///

of Frames.

-@property (nonatomic, readonly) NSInteger frames; -/// Gif file size in bytes. -@property (nonatomic, readonly) NSInteger gifSize; -/// URL of the WebP file. -@property (nonatomic, readonly, copy) NSString * _Nullable webPUrl; -/// Gif file size in bytes. -@property (nonatomic, readonly) NSInteger webPSize; -/// URL of the mp4 file. -@property (nonatomic, readonly, copy) NSString * _Nullable mp4Url; -/// Gif file size in bytes. -@property (nonatomic, readonly) NSInteger mp4Size; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param mediaId Media Objects ID. -/// -/// \param rendition Rendition Type of the Image. -/// -- (nonnull instancetype)init:(NSString * _Nonnull)mediaId rendition:(enum GPHRenditionType)rendition; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHImage (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy Images (Renditions) for a GPHMedia -SWIFT_CLASS("_TtC12GiphyCoreSDK9GPHImages") -@interface GPHImages : GPHFilterable -/// ID of the Represented Object. -@property (nonatomic, readonly, copy) NSString * _Nonnull mediaId; -/// Original file size and file dimensions. Good for desktop use. -@property (nonatomic, readonly, strong) GPHImage * _Nullable original; -/// Preview image for original. -@property (nonatomic, readonly, strong) GPHImage * _Nullable originalStill; -/// File size under 50kb. Duration may be truncated to meet file size requirements. Good for thumbnails and previews. -@property (nonatomic, readonly, strong) GPHImage * _Nullable preview; -/// Duration set to loop for 15 seconds. Only recommended for this exact use case. -@property (nonatomic, readonly, strong) GPHImage * _Nullable looping; -/// Height set to 200px. Good for mobile use. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedHeight; -/// Static preview image for fixed_height. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedHeightStill; -/// Height set to 200px. Reduced to 6 frames to minimize file size to the lowest. -/// Works well for unlimited scroll on mobile and as animated previews. See Giphy.com on mobile web as an example. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedHeightDownsampled; -/// Height set to 100px. Good for mobile keyboards. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedHeightSmall; -/// Static preview image for fixed_height_small. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedHeightSmallStill; -/// Width set to 200px. Good for mobile use. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedWidth; -/// Static preview image for fixed_width. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedWidthStill; -/// Width set to 200px. Reduced to 6 frames. Works well for unlimited scroll on mobile and as animated previews. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedWidthDownsampled; -/// Width set to 100px. Good for mobile keyboards. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedWidthSmall; -/// Static preview image for fixed_width_small. -@property (nonatomic, readonly, strong) GPHImage * _Nullable fixedWidthSmallStill; -/// File size under 2mb. -@property (nonatomic, readonly, strong) GPHImage * _Nullable downsized; -/// File size under 200kb. -@property (nonatomic, readonly, strong) GPHImage * _Nullable downsizedSmall; -/// File size under 5mb. -@property (nonatomic, readonly, strong) GPHImage * _Nullable downsizedMedium; -/// File size under 8mb. -@property (nonatomic, readonly, strong) GPHImage * _Nullable downsizedLarge; -/// Static preview image for downsized. -@property (nonatomic, readonly, strong) GPHImage * _Nullable downsizedStill; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param mediaId Media Objects ID. -/// -- (nonnull instancetype)init:(NSString * _Nonnull)mediaId; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - -@interface GPHImages (SWIFT_EXTENSION(GiphyCoreSDK)) -- (GPHImage * _Nullable)rendition:(enum GPHRenditionType)rendition SWIFT_WARN_UNUSED_RESULT; -@end - - -@interface GPHImages (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - - -/// Represents Giphy APIs Supported Languages -typedef SWIFT_ENUM(NSInteger, GPHLanguageType, closed) { -/// We use Int, RawRepresentable to be able to bridge btw ObjC<>Swift without loosing String values. -/// English (en) - GPHLanguageTypeEnglish = 0, -/// Spanish (es) - GPHLanguageTypeSpanish = 1, -/// Portuguese (pt) - GPHLanguageTypePortuguese = 2, -/// Indonesian (id) - GPHLanguageTypeIndonesian = 3, -/// French (fr) - GPHLanguageTypeFrench = 4, -/// Arabic (ar) - GPHLanguageTypeArabic = 5, -/// Turkish (tr) - GPHLanguageTypeTurkish = 6, -/// Thai (th) - GPHLanguageTypeThai = 7, -/// Vietnamese (vi) - GPHLanguageTypeVietnamese = 8, -/// German (de) - GPHLanguageTypeGerman = 9, -/// Italian (it) - GPHLanguageTypeItalian = 10, -/// Japanese (ja) - GPHLanguageTypeJapanese = 11, -/// Chinese Simplified (zh-cn) - GPHLanguageTypeChineseSimplified = 12, -/// Chinese Traditional (zh-tw) - GPHLanguageTypeChineseTraditional = 13, -/// Russian (ru) - GPHLanguageTypeRussian = 14, -/// Korean (ko) - GPHLanguageTypeKorean = 15, -/// Polish (pl) - GPHLanguageTypePolish = 16, -/// Dutch (nl) - GPHLanguageTypeDutch = 17, -/// Romanian (ro) - GPHLanguageTypeRomanian = 18, -/// Hungarian (hu) - GPHLanguageTypeHungarian = 19, -/// Swedish (sv) - GPHLanguageTypeSwedish = 20, -/// Czech (cs) - GPHLanguageTypeCzech = 21, -/// Hindi (hi) - GPHLanguageTypeHindi = 22, -/// Bengali (bn) - GPHLanguageTypeBengali = 23, -/// Danish (da) - GPHLanguageTypeDanish = 24, -/// Farsi (fa) - GPHLanguageTypeFarsi = 25, -/// Filipino (tl) - GPHLanguageTypeFilipino = 26, -/// Finnish (fi) - GPHLanguageTypeFinnish = 27, -/// Hebrew (iw) - GPHLanguageTypeHebrew = 28, -/// Malay (ms) - GPHLanguageTypeMalay = 29, -/// Norwegian (no) - GPHLanguageTypeNorwegian = 30, -/// Ukrainian (uk) - GPHLanguageTypeUkrainian = 31, -}; - -@class GPHPagination; - -/// Represents a Giphy List Category Response (multiple results) -SWIFT_CLASS("_TtC12GiphyCoreSDK23GPHListCategoryResponse") -@interface GPHListCategoryResponse : GPHResponse -/// Category Objects. -@property (nonatomic, readonly, copy) NSArray * _Nullable data; -/// Pagination info. -@property (nonatomic, readonly, strong) GPHPagination * _Nullable pagination; -/// Convenience Initializer -/// \param meta init with a GPHMeta object. -/// -/// \param data GPHMedia array (optional). -/// -/// \param pagination GPHPagination object (optional). -/// -- (nonnull instancetype)init:(GPHMeta * _Nonnull)meta data:(NSArray * _Nullable)data pagination:(GPHPagination * _Nullable)pagination; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHListCategoryResponse (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy List Channel Response -SWIFT_CLASS("_TtC12GiphyCoreSDK22GPHListChannelResponse") -@interface GPHListChannelResponse : GPHResponse -/// Category Objects. -@property (nonatomic, readonly, copy) NSArray * _Nullable data; -/// Pagination info. -@property (nonatomic, readonly, strong) GPHPagination * _Nullable pagination; -/// Convenience Initializer -/// \param meta init with a GPHMeta object. -/// -/// \param data GPHChannel array (optional). -/// -/// \param pagination GPHPagination object (optional). -/// -- (nonnull instancetype)init:(GPHMeta * _Nonnull)meta data:(NSArray * _Nullable)data pagination:(GPHPagination * _Nullable)pagination; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHListChannelResponse (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy List Media Response (multiple results) -SWIFT_CLASS("_TtC12GiphyCoreSDK20GPHListMediaResponse") -@interface GPHListMediaResponse : GPHResponse -/// Gifs/Stickers. -@property (nonatomic, readonly, copy) NSArray * _Nullable data; -/// Pagination info. -@property (nonatomic, readonly, strong) GPHPagination * _Nullable pagination; -/// Convenience Initializer -/// \param meta init with a GPHMeta object. -/// -/// \param data GPHMedia array (optional). -/// -/// \param pagination GPHPagination object (optional). -/// -- (nonnull instancetype)init:(GPHMeta * _Nonnull)meta data:(NSArray * _Nullable)data pagination:(GPHPagination * _Nullable)pagination; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHListMediaResponse (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - -@class GPHTermSuggestion; - -/// Represents a Giphy List Term Suggestions Response (multiple results) -SWIFT_CLASS("_TtC12GiphyCoreSDK29GPHListTermSuggestionResponse") -@interface GPHListTermSuggestionResponse : GPHResponse -/// Terms Suggested. -@property (nonatomic, readonly, copy) NSArray * _Nullable data; -/// Convenience Initializer -/// \param meta init with a GPHMeta object. -/// -/// \param data GPHTermSuggestion array (optional). -/// -- (nonnull instancetype)init:(GPHMeta * _Nonnull)meta data:(NSArray * _Nullable)data; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHListTermSuggestionResponse (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy Media Object -SWIFT_CLASS("_TtC12GiphyCoreSDK8GPHMedia") -@interface GPHMedia : GPHFilterable -/// ID of the Object. -@property (nonatomic, readonly, copy) NSString * _Nonnull id; -/// Media Type (GIF|Sticker). -@property (nonatomic, readonly) enum GPHMediaType type; -/// URL of the GIF/Sticker. -@property (nonatomic, readonly, copy) NSString * _Nonnull url; -/// Content Rating (Default G). -@property (nonatomic, readonly) enum GPHRatingType rating; -/// Title. -@property (nonatomic, readonly, copy) NSString * _Nullable title; -/// Caption. -@property (nonatomic, readonly, copy) NSString * _Nullable caption; -/// URL Slug. -@property (nonatomic, readonly, copy) NSString * _Nullable slug; -/// Indexable or Not. -@property (nonatomic, readonly, copy) NSString * _Nullable indexable; -/// Content. -@property (nonatomic, readonly, copy) NSString * _Nullable contentUrl; -/// Bitly Short URL. -@property (nonatomic, readonly, copy) NSString * _Nullable bitlyUrl; -/// Bitly Short URL for GIF. -@property (nonatomic, readonly, copy) NSString * _Nullable bitlyGifUrl; -/// Embed URL. -@property (nonatomic, readonly, copy) NSString * _Nullable embedUrl; -/// Attribution Source. -@property (nonatomic, readonly, copy) NSString * _Nullable source; -/// Attribution Source Domain TLD. -@property (nonatomic, readonly, copy) NSString * _Nullable sourceTld; -/// Attribution Source Post URL. -@property (nonatomic, readonly, copy) NSString * _Nullable sourcePostUrl; -/// Atrribution / User. -@property (nonatomic, readonly, strong) GPHUser * _Nullable user; -/// Renditions of the Media Object. -@property (nonatomic, readonly, strong) GPHImages * _Nullable images; -/// Bottle Data. -@property (nonatomic, readonly, strong) GPHBottleData * _Nullable bottleData; -/// Tags representing the Media Object. -@property (nonatomic, readonly, copy) NSArray * _Nullable tags; -/// Featured Tags. -@property (nonatomic, readonly, copy) NSArray * _Nullable featuredTags; -/// Import Date/Time. -@property (nonatomic, readonly, copy) NSDate * _Nullable importDate; -/// Creation Date/Time. -@property (nonatomic, readonly, copy) NSDate * _Nullable createDate; -/// Last Update Date/Time. -@property (nonatomic, readonly, copy) NSDate * _Nullable updateDate; -/// Trending Date/Time. -@property (nonatomic, readonly, copy) NSDate * _Nullable trendingDate; -@property (nonatomic, readonly) BOOL isHidden; -@property (nonatomic, readonly) BOOL isRemoved; -@property (nonatomic, readonly) BOOL isCommunity; -@property (nonatomic, readonly) BOOL isAnonymous; -@property (nonatomic, readonly) BOOL isFeatured; -@property (nonatomic, readonly) BOOL isRealtime; -@property (nonatomic, readonly) BOOL isIndexable; -@property (nonatomic, readonly) BOOL isSticker; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param id Media Object ID. -/// -/// \param type Media Type (GIF/Sticker). -/// -/// \param url URL of the Media Object. -/// -- (nonnull instancetype)init:(NSString * _Nonnull)id type:(enum GPHMediaType)type url:(NSString * _Nonnull)url; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - -@interface GPHMedia (SWIFT_EXTENSION(GiphyCoreSDK)) -+ (GPHMedia * _Nullable)mapJSON:(NSDictionary * _Nonnull)json request:(NSString * _Nonnull)request media:(enum GPHMediaType)media error:(NSError * _Nullable * _Nullable)error SWIFT_WARN_UNUSED_RESULT; -@end - - - - -@interface GPHMedia (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy Media Response (single result) -SWIFT_CLASS("_TtC12GiphyCoreSDK16GPHMediaResponse") -@interface GPHMediaResponse : GPHResponse -/// Message description. -@property (nonatomic, readonly, strong) GPHMedia * _Nullable data; -/// Convenience Initializer -/// \param meta init with a GPHMeta object. -/// -/// \param data GPHMedia object (optional). -/// -- (nonnull instancetype)init:(GPHMeta * _Nonnull)meta data:(GPHMedia * _Nullable)data; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHMediaResponse (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - -/// Represents a Giphy Object Type (GIF/Sticker/…) -typedef SWIFT_ENUM(NSInteger, GPHMediaType, closed) { -/// We use Int, RawRepresentable to be able to bridge btw ObjC<>Swift without losing String values. -/// Gif Media Type - GPHMediaTypeGif = 0, -/// Sticker Media Type - GPHMediaTypeSticker = 1, -}; - - -/// Represents a Giphy Response Meta Info -SWIFT_CLASS("_TtC12GiphyCoreSDK7GPHMeta") -@interface GPHMeta : NSObject -/// Unique response id. -@property (nonatomic, readonly, copy) NSString * _Nonnull responseId; -/// Status (200, 404…) -@property (nonatomic, readonly) NSInteger status; -/// Message description. -@property (nonatomic, readonly, copy) NSString * _Nonnull msg; -/// Error Code. -@property (nonatomic, readonly, copy) NSString * _Nonnull errorCode; -/// Initializer -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHMeta (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy Response Pagination Info -SWIFT_CLASS("_TtC12GiphyCoreSDK13GPHPagination") -@interface GPHPagination : NSObject -/// Total Result Count. -@property (nonatomic, readonly) NSInteger totalCount; -/// Actual Result Count (not always == limit) -@property (nonatomic, readonly) NSInteger count; -/// Returned (if Filters applied) Result Count (not always == limit) -@property (nonatomic, readonly) NSInteger filteredCount; -/// Offset to start next set of results. -@property (nonatomic, readonly) NSInteger offset; -/// Next Page token -@property (nonatomic, readonly, copy) NSString * _Nullable nextCursor; -/// Initializer -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -- (void)updateFilteredCount:(NSInteger)count; -@end - - - - -@interface GPHPagination (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - -/// Represents content rating (y,g, pg, pg-13 or r) -typedef SWIFT_ENUM(NSInteger, GPHRatingType, closed) { -/// We use Int, RawRepresentable to be able to bridge btw ObjC<>Swift without loosing String values. -/// Rated Y - GPHRatingTypeRatedY = 0, -/// Rated G - GPHRatingTypeRatedG = 1, -/// Rated PG - GPHRatingTypeRatedPG = 2, -/// Rated PG-13 - GPHRatingTypeRatedPG13 = 3, -/// Rated R - GPHRatingTypeRatedR = 4, -/// Not Safe for Work - GPHRatingTypeNsfw = 5, -/// Unrated - GPHRatingTypeUnrated = 6, -}; - -/// Represents a Giphy Rendition Type (Original/Preview/…) -typedef SWIFT_ENUM(NSInteger, GPHRenditionType, closed) { -/// We use Int, RawRepresentable to be able to bridge btw ObjC<>Swift without losing String values. -/// Original file size and file dimensions. Good for desktop use. - GPHRenditionTypeOriginal = 0, -/// Preview image for original. - GPHRenditionTypeOriginalStill = 1, -/// File size under 50kb. Duration may be truncated to meet file size requirements. Good for thumbnails and previews. - GPHRenditionTypePreview = 2, -/// Duration set to loop for 15 seconds. Only recommended for this exact use case. - GPHRenditionTypeLooping = 3, -/// Height set to 200px. Good for mobile use. - GPHRenditionTypeFixedHeight = 4, -/// Static preview image for fixed_height - GPHRenditionTypeFixedHeightStill = 5, -/// Height set to 200px. Reduced to 6 frames to minimize file size to the lowest. -/// Works well for unlimited scroll on mobile and as animated previews. See Giphy.com on mobile web as an example. - GPHRenditionTypeFixedHeightDownsampled = 6, -/// Height set to 100px. Good for mobile keyboards. - GPHRenditionTypeFixedHeightSmall = 7, -/// Static preview image for fixed_height_small - GPHRenditionTypeFixedHeightSmallStill = 8, -/// Width set to 200px. Good for mobile use. - GPHRenditionTypeFixedWidth = 9, -/// Static preview image for fixed_width - GPHRenditionTypeFixedWidthStill = 10, -/// Width set to 200px. Reduced to 6 frames. Works well for unlimited scroll on mobile and as animated previews. - GPHRenditionTypeFixedWidthDownsampled = 11, -/// Width set to 100px. Good for mobile keyboards. - GPHRenditionTypeFixedWidthSmall = 12, -/// Static preview image for fixed_width_small - GPHRenditionTypeFixedWidthSmallStill = 13, -/// File size under 2mb. - GPHRenditionTypeDownsized = 14, -/// File size under 200kb. - GPHRenditionTypeDownsizedSmall = 15, -/// File size under 5mb. - GPHRenditionTypeDownsizedMedium = 16, -/// File size under 8mb. - GPHRenditionTypeDownsizedLarge = 17, -/// Static preview image for downsized. - GPHRenditionTypeDownsizedStill = 18, -}; - - -/// Async Request Operations with Completion Handler Support -SWIFT_CLASS("_TtC12GiphyCoreSDK10GPHRequest") -@interface GPHRequest : GPHAsyncOperationWithCompletion -/// Override the Operation function main to handle the request -- (void)main; -@end - - -SWIFT_CLASS("_TtC12GiphyCoreSDK16GPHRequestConfig") -@interface GPHRequestConfig : NSObject -@property (nonatomic, copy) NSString * _Nonnull base; -@property (nonatomic, copy) NSArray * _Nullable queryItems; -@property (nonatomic, copy) NSDictionary * _Nullable headers; -@property (nonatomic, copy) NSString * _Nonnull path; -@property (nonatomic, copy) NSString * _Nonnull requestType; -@property (nonatomic, copy) NSString * _Nonnull apiKey; -@property (nonatomic) NSInteger retry; -- (NSURLRequest * _Nonnull)getRequest SWIFT_WARN_UNUSED_RESULT; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - -@interface GPHResponse (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy Term Suggestion -SWIFT_CLASS("_TtC12GiphyCoreSDK17GPHTermSuggestion") -@interface GPHTermSuggestion : GPHFilterable -/// Term suggestion. -@property (nonatomic, readonly, copy) NSString * _Nonnull term; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param term Term suggestion. -/// -- (nonnull instancetype)init:(NSString * _Nonnull)term; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHTermSuggestion (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -/// Represents a Giphy User Object -/// http://api.giphy.com/v1/gifs/categories/animals/cats?api_key=4OMJYpPoYwVpe -SWIFT_CLASS("_TtC12GiphyCoreSDK7GPHUser") -@interface GPHUser : GPHFilterable -/// Username. -@property (nonatomic, readonly, copy) NSString * _Nonnull username; -/// User ID. -@property (nonatomic, readonly, copy) NSString * _Nullable userId; -/// Name of the User. -@property (nonatomic, readonly, copy) NSString * _Nullable name; -/// Description of the User. -@property (nonatomic, readonly, copy) NSString * _Nullable userDescription; -/// Attribution Display Name. -@property (nonatomic, readonly, copy) NSString * _Nullable attributionDisplayName; -/// Display Name for the User. -@property (nonatomic, readonly, copy) NSString * _Nullable displayName; -/// Twitter Handler. -@property (nonatomic, readonly, copy) NSString * _Nullable twitter; -/// URL of the Twitter Handler. -@property (nonatomic, readonly, copy) NSString * _Nullable twitterUrl; -/// URL of the Facebook Handler. -@property (nonatomic, readonly, copy) NSString * _Nullable facebookUrl; -/// URL of the Instagram Handler. -@property (nonatomic, readonly, copy) NSString * _Nullable instagramUrl; -/// URL of the Website -@property (nonatomic, readonly, copy) NSString * _Nullable websiteUrl; -/// Displayable URL of the Website. -@property (nonatomic, readonly, copy) NSString * _Nullable websiteDisplayUrl; -/// URL of the Tumblr Handler. -@property (nonatomic, readonly, copy) NSString * _Nullable tumblrUrl; -/// URL of the Avatar. -@property (nonatomic, readonly, copy) NSString * _Nullable avatarUrl; -/// URL of the Banner. -@property (nonatomic, readonly, copy) NSString * _Nullable bannerUrl; -/// URL of the Profile. -@property (nonatomic, readonly, copy) NSString * _Nullable profileUrl; -/// User Public/Private. -@property (nonatomic, readonly) BOOL isPublic; -/// User is Staff. -@property (nonatomic, readonly) BOOL isStaff; -/// User is Verified -@property (nonatomic, readonly) BOOL isVerified; -/// Suppress Chrome. -@property (nonatomic, readonly) BOOL suppressChrome; -/// Last Login Date/Time. -@property (nonatomic, readonly, copy) NSDate * _Nullable loginDate; -/// Join Date/Time. -@property (nonatomic, readonly, copy) NSDate * _Nullable joinDate; -/// JSON Representation. -@property (nonatomic, readonly, copy) NSDictionary * _Nullable jsonRepresentation; -/// User Dictionary to Store data in Obj by the Developer -@property (nonatomic, copy) NSDictionary * _Nullable userDictionary; -/// Convenience Initializer -/// \param username Username of the User. -/// -- (nonnull instancetype)init:(NSString * _Nonnull)username; -- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)aDecoder; -- (void)encodeWithCoder:(NSCoder * _Nonnull)aCoder; -- (BOOL)isEqual:(id _Nullable)object SWIFT_WARN_UNUSED_RESULT; -@property (nonatomic, readonly) NSUInteger hash; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - - - - -@interface GPHUser (SWIFT_EXTENSION(GiphyCoreSDK)) -@property (nonatomic, readonly, copy) NSString * _Nonnull description; -@end - - -SWIFT_CLASS("_TtC12GiphyCoreSDK9GiphyCore") -@interface GiphyCore : NSObject -SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) GPHClient * _Nonnull shared;) -+ (GPHClient * _Nonnull)shared SWIFT_WARN_UNUSED_RESULT; -/// Configure the Client -/// \param apiKey Giphy Api Key to use. -/// -+ (void)configureWithApiKey:(NSString * _Nonnull)apiKey; -/// Configure Filtering for all the Models -/// \param filter GPHFilterBlock to use and figure out if an object is valid or not. -/// -+ (void)setFilterWithFilter:(BOOL (^ _Nonnull)(GPHFilterable * _Nonnull))filter; -- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; -@end - -#if __has_attribute(external_source_symbol) -# pragma clang attribute pop -#endif -#pragma clang diagnostic pop diff --git a/demo/GiphyCoreSDK.framework/Headers/GiphyCoreSDK-umbrella.h b/demo/GiphyCoreSDK.framework/Headers/GiphyCoreSDK-umbrella.h deleted file mode 100644 index 7194923..0000000 --- a/demo/GiphyCoreSDK.framework/Headers/GiphyCoreSDK-umbrella.h +++ /dev/null @@ -1,16 +0,0 @@ -#ifdef __OBJC__ -#import -#else -#ifndef FOUNDATION_EXPORT -#if defined(__cplusplus) -#define FOUNDATION_EXPORT extern "C" -#else -#define FOUNDATION_EXPORT extern -#endif -#endif -#endif - - -FOUNDATION_EXPORT double GiphyCoreSDKVersionNumber; -FOUNDATION_EXPORT const unsigned char GiphyCoreSDKVersionString[]; - diff --git a/demo/GiphyCoreSDK.framework/Info.plist b/demo/GiphyCoreSDK.framework/Info.plist deleted file mode 100644 index a7bd818..0000000 Binary files a/demo/GiphyCoreSDK.framework/Info.plist and /dev/null differ diff --git a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm.swiftdoc b/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm.swiftdoc deleted file mode 100644 index 841fd60..0000000 Binary files a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm.swiftdoc and /dev/null differ diff --git a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm.swiftmodule b/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm.swiftmodule deleted file mode 100644 index afb9416..0000000 Binary files a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm.swiftmodule and /dev/null differ diff --git a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm64.swiftdoc b/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm64.swiftdoc deleted file mode 100644 index 770fc90..0000000 Binary files a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm64.swiftdoc and /dev/null differ diff --git a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm64.swiftmodule b/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm64.swiftmodule deleted file mode 100644 index a67696d..0000000 Binary files a/demo/GiphyCoreSDK.framework/Modules/GiphyCoreSDK.swiftmodule/arm64.swiftmodule and /dev/null differ diff --git a/demo/GiphyCoreSDK.framework/Modules/module.modulemap b/demo/GiphyCoreSDK.framework/Modules/module.modulemap deleted file mode 100644 index 95bb7f3..0000000 --- a/demo/GiphyCoreSDK.framework/Modules/module.modulemap +++ /dev/null @@ -1,11 +0,0 @@ -framework module GiphyCoreSDK { - umbrella header "GiphyCoreSDK-umbrella.h" - - export * - module * { export * } -} - -module GiphyCoreSDK.Swift { - header "GiphyCoreSDK-Swift.h" - requires objc -} diff --git a/demo/GoogleService-Info.plist b/demo/GoogleService-Info.plist deleted file mode 100644 index f3bde9b..0000000 --- a/demo/GoogleService-Info.plist +++ /dev/null @@ -1,36 +0,0 @@ - - - - - CLIENT_ID - 80191794946-95p1farto7v64okvohv1sfs51fu6nv9a.apps.googleusercontent.com - REVERSED_CLIENT_ID - com.googleusercontent.apps.80191794946-95p1farto7v64okvohv1sfs51fu6nv9a - API_KEY - AIzaSyDXk1pxIml1jiMVP498nZkrQ9pcw5890mU - GCM_SENDER_ID - 80191794946 - PLIST_VERSION - 1 - BUNDLE_ID - com.channelize.demo - PROJECT_ID - channelize-demo - STORAGE_BUCKET - channelize-demo.appspot.com - IS_ADS_ENABLED - - IS_ANALYTICS_ENABLED - - IS_APPINVITE_ENABLED - - IS_GCM_ENABLED - - IS_SIGNIN_ENABLED - - GOOGLE_APP_ID - 1:80191794946:ios:f89b5d64ff143725 - DATABASE_URL - https://channelize-demo.firebaseio.com - - diff --git a/demo/Podfile b/demo/Podfile deleted file mode 100644 index 1e80986..0000000 --- a/demo/Podfile +++ /dev/null @@ -1,39 +0,0 @@ -# Uncomment the next line to define a global platform for your project -# platform :ios, '9.0' - -def primemessenger_pods - - pod 'ChannelizeUI', '~> 4.10.0' - pod 'ChannelizeAPI', '~> 4.10.0' - pod 'ChannelizeCall', '~> 4.10.0' - pod 'Chatto', :git => 'https://github.com/BigStepTechnologies/Chatto', :branch => 'update/v4.0' - pod 'ChattoAdditions', :git => 'https://github.com/BigStepTechnologies/Chatto', :branch => 'update/v4.0' - pod 'Firebase/Core', '5.15.0' - pod 'Firebase/Messaging', '5.15.0' -end - -target 'demo' do - # Comment the next line if you're not using Swift and don't want to use dynamic frameworks - use_frameworks! - - # Pods for demo - primemessenger_pods - target 'demoTests' do - inherit! :search_paths - # Pods for testing - end - - target 'demoUITests' do - inherit! :search_paths - # Pods for testing - end - -end - -post_install do |installer| - installer.pods_project.targets.each do |target| - target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '4.2' - end - end -end diff --git a/demo/Podfile.lock b/demo/Podfile.lock deleted file mode 100644 index b770ee7..0000000 --- a/demo/Podfile.lock +++ /dev/null @@ -1,224 +0,0 @@ -PODS: - - AgoraRtcEngine_iOS (2.9.1) - - Alamofire (4.8.2) - - AlamofireObjectMapper (5.2.0): - - Alamofire (~> 4.7) - - ObjectMapper (~> 3.4) - - AWSAuthCore (2.9.3): - - AWSCore (= 2.9.3) - - AWSCognitoIdentityProvider (2.9.3): - - AWSCognitoIdentityProviderASF (= 1.0.1) - - AWSCore (= 2.9.3) - - AWSCognitoIdentityProviderASF (1.0.1) - - AWSCore (2.9.3) - - AWSIoT (2.9.3): - - AWSCore (= 2.9.3) - - AWSMobileClient (2.9.3): - - AWSAuthCore (= 2.9.3) - - AWSCognitoIdentityProvider (= 2.9.3) - - ChannelizeAPI (4.10.1): - - Alamofire (= 4.8.2) - - AlamofireObjectMapper (= 5.2.0) - - AWSIoT (= 2.9.3) - - AWSMobileClient (= 2.9.3) - - ChannelizeCall (4.10.1): - - AgoraRtcEngine_iOS (>= 2.3.1) - - SDWebImage/GIF (= 4.4.3) - - ChannelizeUI (4.10.1): - - Crashlytics (= 3.12.0) - - CWStatusBarNotification (= 2.3.5) - - InputBarAccessoryView (= 4.2.1) - - RealmSwift (= 3.17.3) - - SDWebImage/GIF (= 4.4.3) - - SwiftIconFont (= 3.0.0) - - ZVActivityIndicatorView (= 0.1.3) - - ZVProgressHUD (= 2.0.3) - - Chatto (3.3.1) - - ChattoAdditions (3.3.1): - - Chatto - - SDWebImage/GIF - - Crashlytics (3.12.0): - - Fabric (~> 1.9.0) - - CWStatusBarNotification (2.3.5) - - Fabric (1.9.0) - - Firebase/Core (5.15.0): - - Firebase/CoreOnly - - FirebaseAnalytics (= 5.4.0) - - Firebase/CoreOnly (5.15.0): - - FirebaseCore (= 5.1.10) - - Firebase/Messaging (5.15.0): - - Firebase/CoreOnly - - FirebaseMessaging (= 3.2.2) - - FirebaseAnalytics (5.4.0): - - FirebaseCore (~> 5.1) - - FirebaseInstanceID (~> 3.3) - - GoogleAppMeasurement (= 5.4.0) - - GoogleUtilities/AppDelegateSwizzler (~> 5.2) - - GoogleUtilities/MethodSwizzler (~> 5.2) - - GoogleUtilities/Network (~> 5.2) - - "GoogleUtilities/NSData+zlib (~> 5.2)" - - nanopb (~> 0.3) - - FirebaseAnalyticsInterop (1.4.0) - - FirebaseCore (5.1.10): - - GoogleUtilities/Logger (~> 5.2) - - FirebaseInstanceID (3.3.0): - - FirebaseCore (~> 5.1) - - GoogleUtilities/Environment (~> 5.3) - - GoogleUtilities/UserDefaults (~> 5.3) - - FirebaseMessaging (3.2.2): - - FirebaseAnalyticsInterop (~> 1.1) - - FirebaseCore (~> 5.1) - - FirebaseInstanceID (~> 3.0) - - GoogleUtilities/Environment (~> 5.2) - - GoogleUtilities/Reachability (~> 5.2) - - Protobuf (~> 3.1) - - FLAnimatedImage (1.0.12) - - GoogleAppMeasurement (5.4.0): - - GoogleUtilities/AppDelegateSwizzler (~> 5.2) - - GoogleUtilities/MethodSwizzler (~> 5.2) - - GoogleUtilities/Network (~> 5.2) - - "GoogleUtilities/NSData+zlib (~> 5.2)" - - nanopb (~> 0.3) - - GoogleUtilities/AppDelegateSwizzler (5.8.0): - - GoogleUtilities/Environment - - GoogleUtilities/Logger - - GoogleUtilities/Network - - GoogleUtilities/Environment (5.8.0) - - GoogleUtilities/Logger (5.8.0): - - GoogleUtilities/Environment - - GoogleUtilities/MethodSwizzler (5.8.0): - - GoogleUtilities/Logger - - GoogleUtilities/Network (5.8.0): - - GoogleUtilities/Logger - - "GoogleUtilities/NSData+zlib" - - GoogleUtilities/Reachability - - "GoogleUtilities/NSData+zlib (5.8.0)" - - GoogleUtilities/Reachability (5.8.0): - - GoogleUtilities/Logger - - GoogleUtilities/UserDefaults (5.8.0): - - GoogleUtilities/Logger - - InputBarAccessoryView (4.2.1) - - nanopb (0.3.9011): - - nanopb/decode (= 0.3.9011) - - nanopb/encode (= 0.3.9011) - - nanopb/decode (0.3.9011) - - nanopb/encode (0.3.9011) - - ObjectMapper (3.5.1) - - Protobuf (3.11.1) - - Realm (3.17.3): - - Realm/Headers (= 3.17.3) - - Realm/Headers (3.17.3) - - RealmSwift (3.17.3): - - Realm (= 3.17.3) - - SDWebImage/Core (4.4.3) - - SDWebImage/GIF (4.4.3): - - FLAnimatedImage (~> 1.0) - - SDWebImage/Core - - SwiftIconFont (3.0.0) - - ZVActivityIndicatorView (0.1.3) - - ZVProgressHUD (2.0.3): - - ZVActivityIndicatorView - -DEPENDENCIES: - - ChannelizeAPI (~> 4.10.0) - - ChannelizeCall (~> 4.10.0) - - ChannelizeUI (~> 4.10.0) - - Chatto (from `https://github.com/BigStepTechnologies/Chatto`, branch `update/v4.0`) - - ChattoAdditions (from `https://github.com/BigStepTechnologies/Chatto`, branch `update/v4.0`) - - Firebase/Core (= 5.15.0) - - Firebase/Messaging (= 5.15.0) - -SPEC REPOS: - trunk: - - AgoraRtcEngine_iOS - - Alamofire - - AlamofireObjectMapper - - AWSAuthCore - - AWSCognitoIdentityProvider - - AWSCognitoIdentityProviderASF - - AWSCore - - AWSIoT - - AWSMobileClient - - ChannelizeAPI - - ChannelizeCall - - ChannelizeUI - - Crashlytics - - CWStatusBarNotification - - Fabric - - Firebase - - FirebaseAnalytics - - FirebaseAnalyticsInterop - - FirebaseCore - - FirebaseInstanceID - - FirebaseMessaging - - FLAnimatedImage - - GoogleAppMeasurement - - GoogleUtilities - - InputBarAccessoryView - - nanopb - - ObjectMapper - - Protobuf - - Realm - - RealmSwift - - SDWebImage - - SwiftIconFont - - ZVActivityIndicatorView - - ZVProgressHUD - -EXTERNAL SOURCES: - Chatto: - :branch: update/v4.0 - :git: https://github.com/BigStepTechnologies/Chatto - ChattoAdditions: - :branch: update/v4.0 - :git: https://github.com/BigStepTechnologies/Chatto - -CHECKOUT OPTIONS: - Chatto: - :commit: b1d9674c55e047186549ee6b9514380d8706d076 - :git: https://github.com/BigStepTechnologies/Chatto - ChattoAdditions: - :commit: b1d9674c55e047186549ee6b9514380d8706d076 - :git: https://github.com/BigStepTechnologies/Chatto - -SPEC CHECKSUMS: - AgoraRtcEngine_iOS: b2eedd8f9ab47b71163f3285e836bd23feb43fff - Alamofire: ae5c501addb7afdbb13687d7f2f722c78734c2d3 - AlamofireObjectMapper: 92b6ce2423a9d159e686f6a1d514a009bf903ddc - AWSAuthCore: 616e8c65607d7d4b29a1320e62fe2c6586f2f396 - AWSCognitoIdentityProvider: 827e8d7ec506dd09ed4f72afe7be587a6dd85af5 - AWSCognitoIdentityProviderASF: f94f1a502e72ef3d0a1de93e10bf7a79c8698118 - AWSCore: 5cbb6c6ccfad4b55e494c2e8df87781512f7881e - AWSIoT: d7debf750a8f485a9e93177fda7a345a9121053b - AWSMobileClient: 57b907ae11832376a2d7cf07eba5fbe2c6b8cfa4 - ChannelizeAPI: c5a7bec9ba9b31eddbc25a664de55f0668dd69cc - ChannelizeCall: 8094f6f649f12e9c4a1748e5b6975fb04d2da994 - ChannelizeUI: 369abd85a03d582646ab6cea7a534fac1cf1a3d0 - Chatto: ebf5f731e9771086f33e37372798a721ec555fa1 - ChattoAdditions: 40b5b0b0967f97e62e66376dada34586ef8a1e7e - Crashlytics: 07fb167b1694128c1c9a5a5cc319b0e9c3ca0933 - CWStatusBarNotification: 3d2738b25c3207f60cc50201388d3c96182545ff - Fabric: f988e33c97f08930a413e08123064d2e5f68d655 - Firebase: 8bb9268bff82374f2cbaaabb143e725743c316ae - FirebaseAnalytics: c06f9d70577d79074214700a71fd5d39de5550fb - FirebaseAnalyticsInterop: d48b6ab67bcf016a05e55b71fc39c61c0cb6b7f3 - FirebaseCore: 35747502d9e8c6ee217385ad04446c7c2aaf9c5c - FirebaseInstanceID: e2fa4cb35ef5558c200f7f0ad8a53e212215f93e - FirebaseMessaging: b412996f6a09337d232bb3a6676ce4d1f353d024 - FLAnimatedImage: 4a0b56255d9b05f18b6dd7ee06871be5d3b89e31 - GoogleAppMeasurement: 98b71f5e04142793729a5ef23e5b96651ff4b70f - GoogleUtilities: 04fce34bcd5620c1ee76fb79172105c74a4df335 - InputBarAccessoryView: 37175becdced159cd9ea335f47ae001b1e112909 - nanopb: 18003b5e52dab79db540fe93fe9579f399bd1ccd - ObjectMapper: 70187b8941977c62ccfb423caf6b50be405cabf0 - Protobuf: 20d79da7f20b5928b80043b05080b816e802659e - Realm: 5a1d9d47bfc101dd597668b1a8af4288a2557f6d - RealmSwift: b7fdc2d18616621c31df5c7a398a45a2163f8eb0 - SDWebImage: c5594f1a19c48d526d321e548902b56b479cd508 - SwiftIconFont: 2ba18554a77c44948dc35b561b344e3c23834a84 - ZVActivityIndicatorView: f652f592d048e1b189d5e90a01107ca2de9742a1 - ZVProgressHUD: eae3c3f358d36b3bacc2f7d1dcc6b3b59d101c47 - -PODFILE CHECKSUM: 623018b1f8330ec6435a7b1b9c25d11898422840 - -COCOAPODS: 1.8.0 diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSAuthCore.h b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSAuthCore.h deleted file mode 100644 index 5fe763b..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSAuthCore.h +++ /dev/null @@ -1,29 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -//! Project version number for AWSAuthCore. -FOUNDATION_EXPORT double AWSAuthCoreVersionNumber; - -//! Project version string for AWSAuthCore. -FOUNDATION_EXPORT const unsigned char AWSAuthCoreVersionString[]; - -#import -#import -#import -#import -#import -#import diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSIdentityManager.h b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSIdentityManager.h deleted file mode 100644 index b5e161c..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSIdentityManager.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import -#import -#import "AWSSignInProvider.h" -#import "AWSSignInProviderApplicationIntercept.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSIdentityManager : NSObject - -/** - * Amazon Cognito User Identity ID. This uniquely identifies the user, regardless of - * whether or not the user is signed-in, if User Sign-in is enabled in the project. - * @return unique user identifier - */ -@property (nonatomic, readonly, nullable) NSString *identityId; - -/** - * Amazon Cognito Credentials Provider. This is the credential provider used by the Identity Manager. - * - * @return the cognito credentials provider - */ -@property (nonatomic, readonly, strong) AWSCognitoCredentialsProvider *credentialsProvider; - -/* - Fetches the current auth state for a user - */ --(AWSIdentityManagerAuthState)authState; - -/** - Returns the Identity Manager singleton instance configured using the information provided in `awsconfiguration.json` or `Info.plist` file. - - *Swift* - - let identityManager = AWSIdentityManager.default() - - *Objective-C* - - AWSIdentityManager *identityManager = [AWSIdentityManager defaultIdentityManager]; - */ -+ (instancetype)defaultIdentityManager; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSIdentityManager.m b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSIdentityManager.m deleted file mode 100644 index 422f710..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSIdentityManager.m +++ /dev/null @@ -1,90 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSIdentityManager.h" -#import "AWSSignInProvider.h" -#import "AWSSignInManager.h" - -@interface AWSIdentityManager() - -@property (nonatomic, readwrite, strong) AWSCognitoCredentialsProvider *credentialsProvider; - -@end - -@interface AWSSignInManager() - -@property (nonatomic, strong) id currentSignInProvider; -@property (nonatomic, strong) id potentialSignInProvider; - -@end - -@implementation AWSIdentityManager - -static NSString *const AWSInfoIdentityManager = @"IdentityManager"; -static NSString *const AWSInfoRoot = @"AWS"; - -+ (instancetype)defaultIdentityManager { - static AWSIdentityManager *_defaultIdentityManager = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - AWSServiceInfo *serviceInfo = [[AWSInfo defaultAWSInfo] defaultServiceInfo:AWSInfoIdentityManager]; - if (!serviceInfo) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"The service configuration is `nil`. You need to configure `awsconfiguration.json` or `Info.plist` before using this method." - userInfo:nil]; - } - _defaultIdentityManager = [[AWSIdentityManager alloc] initWithCredentialProvider:serviceInfo]; - }); - - return _defaultIdentityManager; -} - -- (instancetype)initWithCredentialProvider:(AWSServiceInfo *)serviceInfo { - if (self = [super init]) { - - self.credentialsProvider = serviceInfo.cognitoCredentialsProvider; - [self.credentialsProvider setIdentityProviderManagerOnce:self]; - } - return self; -} - --(AWSIdentityManagerAuthState)authState { - if (self.identityId && AWSSignInManager.sharedInstance.currentSignInProvider) { - return AWSIdentityManagerAuthStateAuthenticated; - } else if (self.identityId) { - return AWSIdentityManagerAuthStateUnauthenticated; - } - return AWSIdentityManagerAuthStateUnknown; -} - -#pragma mark - AWSIdentityProviderManager - -- (AWSTask *> *)logins { - if (![AWSSignInManager sharedInstance].currentSignInProvider) { - return [AWSTask taskWithResult:nil]; - } - return [[[AWSSignInManager sharedInstance].currentSignInProvider token] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSString *token = task.result; - return [AWSTask taskWithResult:@{[AWSSignInManager sharedInstance].currentSignInProvider.identityProviderName : token}]; - }]; -} - -#pragma mark - - -- (NSString *)identityId { - return self.credentialsProvider.identityId; -} - -@end diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInButtonView.h b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInButtonView.h deleted file mode 100644 index db406ff..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInButtonView.h +++ /dev/null @@ -1,54 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSSignInProvider.h" -#import "AWSSignInManager.h" - -NS_ASSUME_NONNULL_BEGIN - -typedef NS_ENUM(NSInteger, AWSSignInButtonStyle) { - AWSSignInButtonStyleSmall, - AWSSignInButtonStyleLarge -}; - -/** - Protocol that defines the interface for a button view. - Any button that confirms to this protocol should have a - button style, signin provider and a delegate - **/ -@protocol AWSSignInButtonView - -/** - @property delegate - @brief Set the delegate for the button view here - **/ -@property (nonatomic, weak) id delegate; - -/** - @property buttonStyle - @brief Specify the style of the button : Small or Large - **/ -@property (nonatomic) AWSSignInButtonStyle buttonStyle; - -/** - @property signInProvider - @brief Set the SignIn Provider for the button - **/ -- (void)setSignInProvider:(id)signInProvider; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInManager.h b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInManager.h deleted file mode 100644 index 7e69708..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInManager.h +++ /dev/null @@ -1,118 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSSignInProvider.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * This protocol defines the method to be implemented to receive a call back when a user attempts - * login with a registered sign-in provider. - */ -@protocol AWSSignInDelegate - -/** - This method gets a call back to the assigned delegate when a user attempts login with a registered sign-in provider. - - @param signInProvider The instance of sign in provider implementing `AWSSignInProvider` protocol. - @param result The result of login attempt. If error, set to `nil`. - @param error The error if sign-in attempt failed. - **/ -- (void)onLoginWithSignInProvider:(id)signInProvider - result:(id _Nullable)result - error:(NSError * _Nullable)error NS_SWIFT_NAME(onLogin(signInProvider:result:error:)); - -@end - -@interface AWSSignInManager : NSObject - -/** - * Indicates whether the user is signed-in or not. - * @return true if user is signed-in - */ -@property (nonatomic, readonly, getter=isLoggedIn) BOOL loggedIn; - -/** - * The delegate class to be called when a user attempts to login with a registered sign in provider. - */ -@property (nonatomic, weak) id delegate; - -/* - * Fetches the shared instance of `AWSSignInManager`. - */ -+(instancetype)sharedInstance; - -/** - Registers the shared instance of sign in provider implementing `AWSSignInProvider`. - - @param signInProvider The shared instance of sign in provider implementing `AWSSignInProvider` protocol. - **/ --(void)registerAWSSignInProvider:(id)signInProvider NS_SWIFT_NAME(register(signInProvider:)); - -/** - * Signs the user out of whatever third party identity provider they used to sign in. - * @param completionHandler used to callback application with async operation results - */ -- (void)logoutWithCompletionHandler:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler; - -/** - * Signs the user in with an identity provider. Note that even if User Sign-in is not - * enabled in the project, the user is still signed-in with the Guest type provider. - * @param signInProviderKey the identifier key of sign in provider - * @param completionHandler used to callback application with async operation results - */ -- (void)loginWithSignInProviderKey:(NSString *)signInProviderKey - completionHandler:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler NS_SWIFT_NAME(login(signInProviderKey:completionHandler:)); - -/** - * Attempts to resume session with the previous sign-in provider. - * @param completionHandler used to callback application with async operation results - */ -- (void)resumeSessionWithCompletionHandler:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler; - -/** - * Passes parameters used to launch the application to the current identity provider. For some - * third party providers, this completes the User Sign-in call flow, which used a browser to - * get information from the user, directly. The current sign-in provider will be set to nil if - * the sign-in provider is not registered using `registerAWSSignInProvider:forKey` method of - * `AWSSignInProviderFactory` class. - * - * @param application application - * @param launchOptions options used to launch the application - * @return true if this call handled the operation - */ -- (BOOL)interceptApplication:(UIApplication *)application -didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions; - -/** - * Passes parameters used to launch the application to the current identity provider. For some - * third party providers, this completes the User Sign-in call flow, which used a browser to - * get information from the user, directly. - * - * @param application application - * @param url url used to open the application - * @param sourceApplication source application - * @param annotation annotation - * @return true if this call handled the operation - */ -- (BOOL)interceptApplication:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(nullable NSString *)sourceApplication - annotation:(id)annotation; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInManager.m b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInManager.m deleted file mode 100644 index f3b8c95..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInManager.m +++ /dev/null @@ -1,199 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSSignInManager.h" -#import "AWSIdentityManager.h" -#import "AWSSignInProviderApplicationIntercept.h" - -typedef void (^AWSSignInManagerCompletionBlock)(id result, NSError *error); - -@interface AWSSignInManager() - -@property (atomic, copy) AWSSignInManagerCompletionBlock completionHandler; - -@property (nonatomic, strong) id currentSignInProvider; -@property (nonatomic, strong) id potentialSignInProvider; -@property (nonatomic) BOOL shouldFederate; - -@property (nonatomic) BOOL pendingSignIn; -@property (strong, atomic) NSString *pendingUsername; -@property (strong, atomic) NSString *pendingPassword; - --(void)reSignInWithUsername:(NSString *)username - password:(NSString *)password; - --(id)signInProviderForKey:(NSString *)key; - -@end - -@implementation AWSSignInManager - -static NSMutableDictionary> *signInProviderInfo = nil; -static AWSIdentityManager *identityManager; - -+(instancetype)sharedInstance { - static AWSSignInManager *_sharedSignInManager = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _sharedSignInManager = [[AWSSignInManager alloc] init]; - _sharedSignInManager.shouldFederate = YES; - signInProviderInfo = [[NSMutableDictionary alloc] init]; - identityManager = [AWSIdentityManager defaultIdentityManager]; - }); - - return _sharedSignInManager; -} - --(void)setDontFederate { - AWSSignInManager.sharedInstance.shouldFederate = NO; -} - --(void)reSignInWithUsername:(NSString *)username - password:(NSString *)password { - AWSSignInManager.sharedInstance.pendingUsername = username; - AWSSignInManager.sharedInstance.pendingPassword = password; -} - --(void)registerAWSSignInProvider:(id)signInProvider { - [signInProviderInfo setValue:signInProvider - forKey:signInProvider.identityProviderName]; - -} - --(id)signInProviderForKey:(NSString *)key { - return [signInProviderInfo objectForKey:key]; -} - --(NSArray*)getRegisteredSignInProviders { - return [signInProviderInfo allKeys]; -} - -- (BOOL)isLoggedIn { - return self.currentSignInProvider.isLoggedIn || self.potentialSignInProvider.isLoggedIn; -} - - -- (void)wipeAll { - [identityManager.credentialsProvider clearKeychain]; -} - -- (void)logoutWithCompletionHandler:(void (^)(id result, NSError *error))completionHandler { - if ([self.currentSignInProvider isLoggedIn]) { - [self.currentSignInProvider logout]; - } - - [self wipeAll]; - - self.currentSignInProvider = nil; - - [[identityManager.credentialsProvider getIdentityId] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - dispatch_async(dispatch_get_main_queue(), ^{ - completionHandler(task.result, task.error); - }); - return nil; - }]; -} - -- (void)loginWithSignInProviderKey:(NSString *)signInProviderKey - completionHandler:(void (^)(id result, NSError *error))completionHandler { - - if ([self signInProviderForKey:signInProviderKey]) { - self.potentialSignInProvider = [self signInProviderForKey:signInProviderKey]; - } else { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"The sign in provider is not registered as an available sign in provider. Please register using `registerAWSSignInProvider:`." - userInfo:nil]; - } - - self.completionHandler = completionHandler; - [self.potentialSignInProvider login:completionHandler]; -} - - -- (void)resumeSessionWithCompletionHandler:(void (^)(id result, NSError *error))completionHandler { - - self.completionHandler = completionHandler; - - for(NSString *key in [self getRegisteredSignInProviders]) { - if ([[self signInProviderForKey:key] isLoggedIn]) { - self.potentialSignInProvider = [self signInProviderForKey:key]; - } - } - - [self.potentialSignInProvider reloadSession]; - - if (self.potentialSignInProvider == nil) { - [self completeLogin]; - } -} - -- (void)completeLogin { - - if (self.potentialSignInProvider) { - self.currentSignInProvider = self.potentialSignInProvider; - self.potentialSignInProvider = nil; - } - - if (!self.shouldFederate) { - // Use this for new updated implementation of AWSMobileClient where federation is handled by MobileClient directly. - self.completionHandler(self.currentSignInProvider, nil); - } else { - // Force a refresh of credentials to see if we need to merge unauth credentials. - [identityManager.credentialsProvider invalidateCachedTemporaryCredentials]; - - [[identityManager.credentialsProvider credentials] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - dispatch_async(dispatch_get_main_queue(), ^{ - - [self.delegate onLoginWithSignInProvider:self.currentSignInProvider - result:task.result - error:task.error]; - self.completionHandler(task.result, task.error); - }); - return nil; - }]; - } -} - -- (BOOL)interceptApplication:(UIApplication *)application -didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - for(NSString *key in [self getRegisteredSignInProviders]) { - id signInProvider = [self signInProviderForKey:key]; - if ([signInProvider conformsToProtocol:@protocol(AWSSignInProviderApplicationIntercept)]) { - [(id)signInProvider interceptApplication:application - didFinishLaunchingWithOptions:launchOptions]; - } - } - - return YES; -} - -- (BOOL)interceptApplication:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(NSString *)sourceApplication - annotation:(id)annotation { - if (self.potentialSignInProvider) { - if ([self.potentialSignInProvider conformsToProtocol:@protocol(AWSSignInProviderApplicationIntercept)]) { - id provider = (id)self.potentialSignInProvider; - return [provider interceptApplication:application - openURL:url - sourceApplication:sourceApplication - annotation:annotation]; - } - } - - return YES; -} - -@end diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInProvider.h b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInProvider.h deleted file mode 100644 index a0d8855..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInProvider.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -@class AWSIdentityManager; - -typedef NS_ENUM(NSInteger, AWSIdentityManagerAuthState) { - AWSIdentityManagerAuthStateAuthenticated, - AWSIdentityManagerAuthStateUnauthenticated, - AWSIdentityManagerAuthStateUnknown, -}; - -/** - * `AWSSignInProvider` protocol defines a list of methods and properties which a Sign-In Provider should implement. - * - * The AWSSignInProvider is implemented by difference Sign-In Providers like FacbookSignInProvider, GoogleSignInProvider, etc. - * - */ -@protocol AWSSignInProvider - -/** - Determines if a user is logged in. - */ -@property (nonatomic, readonly, getter=isLoggedIn) BOOL loggedIn; - -/** - The login handler method for the Sign-In Provider. - The completionHandler will bubble back errors to the developers. - */ -- (void)login:(void (^)(id _Nullable result, NSError * _Nullable error))completionHandler; - -/** - The logout handler method for the Sign-In Provider. - */ -- (void)logout; - -/** - The handler method for managing the session reload for the Sign-In Provider. - The completionHandler will bubble back errors to the developers. - */ -- (void)reloadSession; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInProviderApplicationIntercept.h b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInProviderApplicationIntercept.h deleted file mode 100644 index 27e4075..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSSignInProviderApplicationIntercept.h +++ /dev/null @@ -1,52 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@protocol AWSSignInProviderApplicationIntercept - -/** - * Passes parameters used to launch the application to the current identity provider. For some - * third party providers, this completes the User Sign-in call flow, which used a browser to - * get information from the user, directly. The current sign-in provider will be set to nil if - * the sign-in provider is not registered using `registerAWSSignInProvider:forKey` method of - * `AWSSignInProviderFactory` class. - * @param application application - * @param launchOptions options used to launch the application - * @return true if this call handled the operation - */ -- (BOOL)interceptApplication:(UIApplication *)application -didFinishLaunchingWithOptions:(nullable NSDictionary *)launchOptions; - -/** - * Passes parameters used to launch the application to the current identity provider. For some - * third party providers, this completes the User Sign-in call flow, which used a browser to - * get information from the user, directly. - * @param application application - * @param url url used to open the application - * @param sourceApplication source application - * @param annotation annotation - * @return true if this call handled the operation - */ -- (BOOL)interceptApplication:(UIApplication *)application - openURL:(NSURL *)url - sourceApplication:(nullable NSString *)sourceApplication - annotation:(id)annotation; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSUIConfiguration.h b/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSUIConfiguration.h deleted file mode 100644 index 15e984f..0000000 --- a/demo/Pods/AWSAuthCore/AWSAuthSDK/Sources/AWSAuthCore/AWSUIConfiguration.h +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -@protocol AWSUIConfiguration - -/** - @property logoImage - @brief The logo to be used on the Auth UI Screen - **/ -@property (nonatomic, nullable) UIImage *logoImage; - -/** - @property backgroundColor - @brief Gets the backgorund color of the sign in screen configured by the user - **/ -@property (nonatomic, nullable) UIColor *backgroundColor; - -/** - @property fullScreenBackgroundColor - @brief Gets the backgorund color of the sign in screen configured by the user for the whole screen. - **/ -@property (nonatomic) BOOL isBackgroundColorFullScreen; - -/** - @property font - @brief Font for the text in the SignInView and all its subviews. - **/ -@property (nonatomic, nullable) UIFont *font; - -@end diff --git a/demo/Pods/AWSAuthCore/LICENSE b/demo/Pods/AWSAuthCore/LICENSE deleted file mode 100644 index da144d8..0000000 --- a/demo/Pods/AWSAuthCore/LICENSE +++ /dev/null @@ -1 +0,0 @@ -The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the Amazon Cognito Identity Provider and Amazon Cognito Sync subcomponents being licensed under the Amazon Software License and the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). diff --git a/demo/Pods/AWSAuthCore/LICENSE.AMAZON b/demo/Pods/AWSAuthCore/LICENSE.AMAZON deleted file mode 100644 index 0945c46..0000000 --- a/demo/Pods/AWSAuthCore/LICENSE.AMAZON +++ /dev/null @@ -1,27 +0,0 @@ -Amazon Software License -This Amazon Software License (“License”) governs your use, reproduction, and distribution of the accompanying software as specified below. -1. Definitions -“Licensor” means any person or entity that distributes its Work. - -“Software” means the original work of authorship made available under this License. - -“Work” means the Software and any additions to or derivative works of the Software that are made available under this License. - -The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work. - -Works, including the Software, are “made available” under this License by including in or with the Work either (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this License. -2. License Grants -2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form. -2.2 Patent Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free patent license to make, have made, use, sell, offer for sale, import, and otherwise transfer its Work, in whole or in part. The foregoing license applies only to the patent claims licensable by Licensor that would be infringed by Licensor’s Work (or portion thereof) individually and excluding any combinations with any other materials or technology. -3. Limitations -3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, (b) you include a complete copy of this License with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work. -3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this License (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself. -3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use with the web services, computing platforms or applications provided by Amazon.com, Inc. or its affiliates, including Amazon Web Services, Inc. -3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this License from such Licensor (including the grants in Sections 2.1 and 2.2) will terminate immediately. -3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, logos, or trademarks, except as necessary to reproduce the notices described in this License. -3.6 Termination. If you violate any term of this License, then your rights under this License (including the grants in Sections 2.1 and 2.2) will terminate immediately. -4. Disclaimer of Warranty. -THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF M ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE. SOME STATES’ CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU. -5. Limitation of Liability. -EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -Effective Date – April 18, 2008 © 2008 Amazon.com, Inc. or its affiliates. All rights reserved. \ No newline at end of file diff --git a/demo/Pods/AWSAuthCore/LICENSE.APACHE b/demo/Pods/AWSAuthCore/LICENSE.APACHE deleted file mode 100644 index 2c99318..0000000 --- a/demo/Pods/AWSAuthCore/LICENSE.APACHE +++ /dev/null @@ -1,51 +0,0 @@ -Apache License -Version 2.0, January 2004 - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and - 2. You must cause any modified files to carry prominent notices stating that You changed the files; and - 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/demo/Pods/AWSAuthCore/README.md b/demo/Pods/AWSAuthCore/README.md deleted file mode 100644 index a0164aa..0000000 --- a/demo/Pods/AWSAuthCore/README.md +++ /dev/null @@ -1,443 +0,0 @@ -# AWS SDK for iOS - -[![Release](https://img.shields.io/github/release/aws/aws-sdk-ios.svg)](../../releases) -[![CocoaPods](https://img.shields.io/cocoapods/v/AWSiOSSDKv2.svg)](https://cocoapods.org/pods/AWSiOSSDKv2) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![CircleCI](https://circleci.com/gh/aws-amplify/aws-sdk-ios.svg?style=svg)](https://circleci.com/gh/aws-amplify/aws-sdk-ios) - -The AWS SDK for iOS provides a library and documentation for developers to build connected mobile applications using AWS. - -### Features / APIs - -- [__Authentication__](https://aws-amplify.github.io/docs/ios/authentication): APIs and building blocks for developers who want to create user authentication experiences. -- [__Analytics__](https://aws-amplify.github.io/docs/ios/analytics): Easily collect analytics data for your app. Analytics data includes user sessions and other custom events that you want to track in your app. -- [__API__](https://aws-amplify.github.io/docs/ios/api): Provides a simple solution when making HTTP requests. It provides an automatic, lightweight signing process which complies with AWS Signature Version 4. -- [__Storage__](https://aws-amplify.github.io/docs/ios/storage): Provides a simple mechanism for managing user content for your app in public, protected or private storage buckets. -- [__Push Notifications__](https://aws-amplify.github.io/docs/ios/push-notifications): Allows you to integrate push notifications in your app with Amazon Pinpoint targeting and campaign management support. -- [__PubSub__](https://aws-amplify.github.io/docs/ios/pubsub): Provides connectivity with cloud-based message-oriented middleware. -- [__Generated AWS Service Interfaces__](https://aws-amplify.github.io/docs/ios/manualsetup): Provides direct interaction with any AWS service. - -#### Visit our [Web Site](https://aws-amplify.github.io) to learn more about Amplify Framework. - -* [Documentation](https://aws-amplify.github.io/docs) -* [Setup](#setup) -* [Examples](https://github.com/awslabs/aws-sdk-ios-samples) - -## Setup - -To get started with the AWS SDK for iOS, check out the [Developer Guide for iOS](https://aws-amplify.github.io/docs/ios/start). You can set up the SDK and start building a new project, or you integrate the SDK in an existing project. You can also run the samples to get a sense of how the SDK works. - -To use the AWS SDK for iOS, you will need the following installed on your development machine: - -* Xcode 9.2 or later -* iOS 8 or later - -## Include the SDK for iOS in an Existing Application - -The [samples](https://github.com/awslabs/aws-sdk-ios-samples) included with the SDK for iOS are standalone projects that are already set up for you. You can also integrate the SDK for iOS with your own existing project. There are three ways to import the AWS Mobile SDK for iOS into your project: - -* [CocoaPods](https://cocoapods.org/) -* [Carthage](https://github.com/Carthage/Carthage) -* [Dynamic Frameworks](https://aws.amazon.com/mobile/sdk/) - -You should use one of these three ways to import the AWS Mobile SDK but not multiple. Importing the SDK in multiple ways loads duplicate copies of the SDK into the project and causes compiler errors. - -### CocoaPods - -1. The AWS Mobile SDK for iOS is available through [CocoaPods](http://cocoapods.org). If you have not installed CocoaPods, install CocoaPods by running the command: - - $ gem install cocoapods - $ pod setup - - Depending on your system settings, you may have to use `sudo` for installing `cocoapods` as follows: - - $ sudo gem install cocoapods - $ pod setup - -2. In your project directory (the directory where your `*.xcodeproj` file is), create a plain text file named `Podfile` (without any file extension) and add the lines below. Replace `YourTarget` with your actual target name. - - source 'https://github.com/CocoaPods/Specs.git' - - platform :ios, '8.0' - use_frameworks! - - target :'YourTarget' do - pod 'AWSAutoScaling' - pod 'AWSCloudWatch' - pod 'AWSCognito' - pod 'AWSCognitoIdentityProvider' - pod 'AWSDynamoDB' - pod 'AWSEC2' - pod 'AWSElasticLoadBalancing' - pod 'AWSIoT' - pod 'AWSKinesis' - pod 'AWSLambda' - pod 'AWSMachineLearning' - pod 'AWSMobileAnalytics' - pod 'AWSS3' - pod 'AWSSES' - pod 'AWSSimpleDB' - pod 'AWSSNS' - pod 'AWSSQS' - end - - ![image](readme-images/cocoapods-setup-01.png?raw=true) - -3. Then run the following command: - - $ pod install - -4. Open up `*.xcworkspace` with Xcode and start using the SDK. - - ![image](readme-images/cocoapods-setup-02.png?raw=true) - - **Note**: Do **NOT** use `*.xcodeproj`. If you open up a project file instead of a workspace, you receive an error: - - ld: library not found for -lPods-AWSCore - clang: error: linker command failed with exit code 1 (use -v to see invocation) - -### Carthage - -1. Install the latest version of [Carthage](https://github.com/Carthage/Carthage#installing-carthage). - -2. Add the following to your `Cartfile`: - - github "aws/aws-sdk-ios" - -3. Then run the following command: - - $ carthage update - -4. With your project open in Xcode, select your **Target**. Under **General** tab, find **Embedded Binaries** and then click the **+** button. - -5. Click the **Add Other...** button, navigate to the `AWS<#ServiceName#>.framework` files under `Carthage` > `Build` > `iOS` and select them. Do not check the **Destination: Copy items if needed** checkbox when prompted. - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -6. Under the **Build Phases** tab in your **Target**, click the **+** button on the top left and then select **New Run Script Phase**. Then setup the build phase as follows. Make sure this phase is below the `Embed Frameworks` phase. - - Shell /bin/sh - - bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh" - - Show environment variables in build log: Checked - Run script only when installing: Not checked - - Input Files: Empty - Output Files: Empty - -> Note: Currently, the AWS SDK for iOS builds the Carthage binaries using Xcode 10.1.0. To consume the pre-built binaries your Xcode version needs to be the same, else you have to build the frameworks on your machine by passing `--no-use-binaries` flag to `carthage update` command. - -### Frameworks - -1. Download the SDK from our [AWS Mobile SDK](http://aws.amazon.com/mobile/sdk) page. The SDK is stored in a compressed file archive named `aws-ios-sdk-#.#.#` (where `#.#.#` represents the version number, so for version 2.7.0, the filename is `aws-ios-sdk-2.7.0`). - -2. With your project open in Xcode, select your **Target**. Under **General** tab, find **Embedded Binaries** and then click the **+** button. - -3. Click the **Add Other...** button, navigate to the `AWS<#ServiceName#>.framework` files and select them. Check the **Destination: Copy items if needed** checkbox when prompted. - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -4. Under the **Buid Phases** tab in your **Target**, click the **+** button on the top left and then select **New Run Script Phase**. Then setup the build phase as follows. Make sure this phase is below the `Embed Frameworks` phase. - - Shell /bin/sh - - bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh" - - Show environment variables in build log: Checked - Run script only when installing: Not checked - - Input Files: Empty - Output Files: Empty - -## Update the SDK to a Newer Version - -When we release a new version of the SDK, you can pick up the changes as described below. - -### CocoaPods - -1. Run the following command in your project directory. CocoaPods automatically picks up the new changes. - - $ pod update - - **Note**: If your pod is having an issue, you can delete `Podfile.lock` and `Pods/` then run `pod install` to cleanly install the SDK. - - ![image](readme-images/cocoapods-setup-03.png?raw=true) - -### Carthage - -1. Run the following command in your project directory. Carthage automatically picks up the new changes. - - $ carthage update - -### Frameworks - -1. In Xcode select the following frameworks in **Project Navigator** and hit **delete** on your keyboard. Then select **Move to Trash**: - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -2. Follow the installation process above to include the new version of the SDK. - -## Getting Started with Swift - -1. Import the AWSCore header in the application delegate. - - ```swift - import AWSCore - ``` - -2. Create a default service configuration by adding the following code snippet in the `application:didFinishLaunchingWithOptions:` application delegate method. - - ```swift - let credentialsProvider = AWSCognitoCredentialsProvider( - regionType: CognitoRegionType, - identityPoolId: CognitoIdentityPoolId) - let configuration = AWSServiceConfiguration( - region: DefaultServiceRegionType, - credentialsProvider: credentialsProvider) - AWSServiceManager.default().defaultServiceConfiguration = configuration - ``` - -3. In Swift file you want to use the SDK, import the appropriate headers for the services you are using. The header file import convention is `import AWSServiceName`, as in the following examples: - - ```swift - import AWSS3 - import AWSDynamoDB - import AWSSQS - import AWSSNS - import AWSCognito - ``` - -4. Make a call to the AWS services. - - ```swift - let dynamoDB = AWSDynamoDB.default() - let listTableInput = AWSDynamoDBListTablesInput() - dynamoDB.listTables(listTableInput!).continueWith { (task:AWSTask) -> Any? in - if let error = task.error as? NSError { - print("Error occurred: \(error)") - return nil - } - - let listTablesOutput = task.result - - for tableName in listTablesOutput!.tableNames! { - print("\(tableName)") - } - - return nil - } - ``` - -**Note**: Most of the service client classes have a singleton method to get a default client. The naming convention is `+ defaultSERVICENAME` (e.g. `+ defaultDynamoDB` in the above code snippet). This singleton method creates a service client with `defaultServiceConfiguration`, which you set up in step 5, and maintains a strong reference to the client. - -## Getting Started with Objective-C - -1. Import the AWSCore header in the application delegate. - - ```objective-c - @import AWSCore; - ``` - -2. Create a default service configuration by adding the following code snippet in the `application:didFinishLaunchingWithOptions:` application delegate method. - - ```objective-c - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:CognitoRegionType - identityPoolId:CognitoIdentityPoolId]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:DefaultServiceRegionType - credentialsProvider:credentialsProvider]; - AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration; - ``` - -3. Import the appropriate headers for the services you are using. The header file import convention is `@import AWSServiceName;`, as in the following examples: - - ```objective-c - @import AWSS3; - @import AWSDynamoDB; - @import AWSSQS; - @import AWSSNS; - @import AWSCognito; - ``` - -4. Make a call to the AWS services. - - ```objective-c - AWSS3TransferManager *transferManager = [AWSS3TransferManager defaultS3TransferManager]; - AWSS3TransferManagerUploadRequest *uploadRequest = [AWSS3TransferManagerUploadRequest new]; - uploadRequest.bucket = yourBucket; - uploadRequest.key = yourKey; - uploadRequest.body = yourDataURL; - uploadRequest.contentLength = [NSNumber numberWithUnsignedLongLong:fileSize]; - - [[transferManager upload:uploadRequest] continueWithBlock:^id(AWSTask *task) { - // Do something with the response - return nil; - }]; - ``` - -**Note**: Most of the service client classes have a singleton method to get a default client. The naming convention is `+ defaultSERVICENAME` (e.g. `+ defaultS3TransferManager` in the above code snippet). This singleton method creates a service client with `defaultServiceConfiguration`, which you set up in step 5, and maintains a strong reference to the client. - -## AWSTask - -With native AWSTask support in the SDK for iOS, you can chain async requests instead of nesting them. It makes the logic cleaner, while keeping the code more readable. Read [Working with AWSTask](http://docs.aws.amazon.com/mobile/sdkforios/developerguide/awstask.html) to learn how to use AWSTask. - -## Logging - -As of version 2.5.4 of this SDK, logging utilizes [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack), a flexible, fast, open source logging framework. It supports many capabilities including the ability to set logging level per output target, for instance, concise messages logged to the console and verbose messages to a log file. - -CocoaLumberjack logging levels are additive such that when the level is set to verbose, all messages from the levels below verbose are logged. It is also possible to set custom logging to meet your needs. For more information, see [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/Documentation/CustomLogLevels.md) - -### Changing Log Levels - -**Swift** - -```swift -AWSDDLog.sharedInstance.logLevel = .verbose -``` - -The following logging level options are available: - -* `.off` -* `.error` -* `.warning` -* `.info` -* `.debug` -* `.verbose` - -**Objective-C** - -```objective-c -[AWSDDLog sharedInstance].logLevel = AWSDDLogLevelVerbose; -``` - -The following logging level options are available: - -* `AWSDDLogLevelOff` -* `AWSDDLogLevelError` -* `AWSDDLogLevelWarning` -* `AWSDDLogLevelInfo` -* `AWSDDLogLevelDebug` -* `AWSDDLogLevelVerbose` - -We recommend setting the log level to `Off` before publishing to the Apple App Store. - -### Targeting Log Output - -CocoaLumberjack can direct logs to file or used as a framework that integrates with the Xcode console. - -To initialize logging to files, use the following code: - -**Swift** - -```swift -let fileLogger: AWSDDFileLogger = AWSDDFileLogger() // File Logger -fileLogger.rollingFrequency = TimeInterval(60*60*24) // 24 hours -fileLogger.logFileManager.maximumNumberOfLogFiles = 7 -AWSDDLog.add(fileLogger) -``` - -**Objective-C** - -```objective-c -AWSDDFileLogger *fileLogger = [[AWSDDFileLogger alloc] init]; // File Logger -fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling -fileLogger.logFileManager.maximumNumberOfLogFiles = 7; -[AWSDDLog addLogger:fileLogger]; -``` - -To initialize logging to your Xcode console, use the following code: - -**Swift** - -```swift -AWSDDLog.add(AWSDDTTYLogger.sharedInstance()) // TTY = Xcode console -``` - -**Objective-C** - -```objective-c -[AWSDDLog addLogger:[AWSDDTTYLogger sharedInstance]]; // TTY = Xcode console -``` - -## Install the Reference Documentation in Xcode - -The AWS Mobile SDK for iOS zip file includes documentation in the DocSets format that you can view within Xcode. The easiest way to install the documentation is to use the Mac OS X terminal. - -1. Open the Mac OS X terminal and go to the directory containing the expanded archive. For example: - - $ cd ~/Downloads/aws-ios-sdk-2.7.0 - - **Note**: Remember to replace 2.7.0 in the example above with the actual version number of the AWS SDK for iOS that you downloaded. - -2. Create a directory called `~/Library/Developer/Shared/Documentation/DocSets`: - - $ mkdir -p ~/Library/Developer/Shared/Documentation/DocSets - -3. Copy (or move) `Documentation/com.amazon.aws.ios.docset` from the SDK installation files to the directory you created in the previous step: - - $ mv Documentation/com.amazon.aws.ios.docset ~/Library/Developer/Shared/Documentation/DocSets/ - -4. If Xcode was running during this procedure, restart Xcode. To browse the documentation, go to **Help**, click **Documentation and API Reference**, and select **AWS Mobile SDK for iOS v2.7.0 Documentation** (where '2.7.0' is the appropriate version number). - -## Talk to Us - -Visit our GitHub [Issues](https://github.com/aws-amplify/aws-sdk-ios/issues) to leave feedback and to connect with other users of the SDK. - -## Author - -Amazon Web Services - -## License - -See the **LICENSE** file for more info. diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider.h deleted file mode 100644 index 0d87e7f..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -/*! - Project version number for the AWSCognitoIdentityProvider framework. - - @warning This value is deprecated and will be removed in an upcoming minor - version of the SDK. It conflicts with the umbrella header generated by - CocoaPods, and is not implemented at all in cases where this SDK is imported - as a CocoaPod static library. As this numeric value does not support - patch-level versioning, you should use AWSCognitoIdentityProviderSDKVersion instead. - @deprecated Use AWSCognitoIdentityProviderSDKVersion instead. - */ -FOUNDATION_EXPORT double AWSCognitoIdentityProviderVersionNumber DEPRECATED_MSG_ATTRIBUTE("Use AWSCognitoIdentityProviderSDKVersion instead."); - -/*! - Project version string for the AWSAutoScaling framework. - - @warning This value is deprecated and will be removed in an upcoming minor - version of the SDK. It conflicts with the umbrella header generated by - CocoaPods, and is not implemented at all in cases where this SDK is imported - as a CocoaPod static library. - @deprecated Use AWSCognitoIdentityProviderSDKVersion instead. - */ -FOUNDATION_EXPORT const unsigned char AWSCognitoIdentityProviderVersionString[] DEPRECATED_MSG_ATTRIBUTE("Use AWSCognitoIdentityProviderSDKVersion instead."); - -#import -#import "AWSCognitoIdentityProviderService.h" -#import "AWSCognitoIdentityUserPool.h" -#import "AWSCognitoIdentityUser.h" diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUser.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUser.h deleted file mode 100644 index 25889f8..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUser.h +++ /dev/null @@ -1,404 +0,0 @@ -// -// Copyright 2014-2018 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import -#import "AWSCognitoIdentityProviderService.h" - -/** - The status of the user. -
    -
  • AWSCognitoIdentityUserStatusUnknown - The user status is unknown.
  • -
  • AWSCognitoIdentityUserStatusConfirmed - The user was auto confirmed.
  • -
  • AWSCognitoIdentityUserStatusUnconfirmed - The user was not confirmed.
  • -
- */ -typedef NS_ENUM(NSInteger, AWSCognitoIdentityUserStatus) { - AWSCognitoIdentityUserStatusUnknown = 0, - AWSCognitoIdentityUserStatusConfirmed = -1000, - AWSCognitoIdentityUserStatusUnconfirmed = -2000, -}; - -@class AWSCognitoIdentityUserPool; -@class AWSCognitoIdentityUserSession; -@class AWSCognitoIdentityUserSessionToken; -@class AWSCognitoIdentityUserSettings; -@class AWSCognitoIdentityUserMFAOption; -@class AWSCognitoIdentityUserMfaType; -@class AWSCognitoIdentityUserMfaPreferences; - -@class AWSCognitoIdentityUserConfirmSignUpResponse; -@class AWSCognitoIdentityUserGetDetailsResponse; -@class AWSCognitoIdentityUserResendConfirmationCodeResponse; -@class AWSCognitoIdentityUserForgotPasswordResponse; -@class AWSCognitoIdentityUserConfirmForgotPasswordResponse; -@class AWSCognitoIdentityUserChangePasswordResponse; -@class AWSCognitoIdentityUserAttributeType; -@class AWSCognitoIdentityUserUpdateAttributesResponse; -@class AWSCognitoIdentityUserDeleteAttributesResponse; -@class AWSCognitoIdentityUserVerifyAttributeResponse; -@class AWSCognitoIdentityUserGetAttributeVerificationCodeResponse; -@class AWSCognitoIdentityUserSetUserSettingsResponse; -@class AWSCognitoIdentityUserGlobalSignOutResponse; -@class AWSCognitoIdentityUserListDevicesResponse; -@class AWSCognitoIdentityUserUpdateDeviceStatusResponse; -@class AWSCognitoIdentityUserGetDeviceResponse; -@class AWSCognitoIdentityUserSetUserMfaPreferenceResponse; -@class AWSCognitoIdentityUserAssociateSoftwareTokenResponse; -@class AWSCognitoIdentityUserVerifySoftwareTokenResponse; - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSCognitoIdentityUser : NSObject - -/** - The username of this user - */ -@property (nonatomic, readonly, nullable) NSString *username; - -/** - If this user is a result of a signup, this has the confirmation status - */ -@property (nonatomic, readonly) AWSCognitoIdentityUserStatus confirmedStatus; - -/** - Determines whether this user has an active session or not. If the refresh token is expired - the user will be prompted to authenticate when you call getSession. -*/ -@property (nonatomic, readonly, getter=isSignedIn) BOOL signedIn; - -/** - Get the device id - */ -@property (nonatomic, readonly) NSString * deviceId; - -/** - Confirm a users' sign up with the confirmation code - */ -- (AWSTask *)confirmSignUp:(NSString *)confirmationCode; - - -/** - Confirm a users' sign up with the confirmation code. If forceAliasCreation is set, if another user is aliased to the same email/phone this code was sent to, reassign alias to this user. - */ --(AWSTask *) confirmSignUp:(NSString *) confirmationCode forceAliasCreation:(BOOL)forceAliasCreation; - -/** - Resend the confirmation code sent during sign up - */ -- (AWSTask *)resendConfirmationCode; - -/** - Get a session with id, access and refresh tokens. - */ -- (AWSTask *)getSession; - -/** - Get a session with the following username and password - */ -- (AWSTask *)getSession:(NSString *)username - password:(NSString *)password - validationData:(nullable NSArray *)validationData; - -/** - Get details about this user, including user attributes - */ -- (AWSTask *)getDetails; - -/** - Send a code to this user to initiate the forgot password flow - */ -- (AWSTask *)forgotPassword; - -/** - Conclude the forgot password flow by providing the forgot password code and new password. - */ -- (AWSTask *)confirmForgotPassword:(NSString *)confirmationCode - password:(NSString *)password; - -/** - Change this user's password - */ -- (AWSTask *)changePassword:(NSString *)currentPassword - proposedPassword:(NSString *)proposedPassword; - -/** - Update this user's attributes - */ -- (AWSTask *)updateAttributes:(NSArray *)attributes; - -/** - Delete the attributes specified by attributeNames - */ -- (AWSTask *)deleteAttributes:(NSArray *)attributeNames; - - -/** - Verify a user attribute upon receiving the verification code. - */ -- (AWSTask *)verifyAttribute:(NSString *)attributeName - code:(NSString *)code; - -/** - Request a verification code to verify an attribute. - */ -- (AWSTask *)getAttributeVerificationCode:(NSString *)attributeName; - -/** - Set the user settings for this user such as MFA - */ -- (AWSTask *)setUserSettings:(AWSCognitoIdentityUserSettings *)settings; - - -/** - Set the user mfa preference supercedes SetUserSettings -*/ -- (AWSTask *)setUserMfaPreference:(AWSCognitoIdentityUserMfaPreferences *) preferences; - - -/** - Start the process of associating a software token - */ -- (AWSTask *) associateSoftwareToken; - -/** - Complete the process of associating a software token by verifying the code and setting device friendly name - */ --(AWSTask*) verifySoftwareToken: (NSString*) userCode friendlyDeviceName: (NSString* _Nullable) friendlyDeviceName; - -/** - Delete this user - */ -- (AWSTask *)deleteUser; - -/** - Remove all sessions from the keychain for this user. Last known user remains. - */ -- (void)signOut; - -/** - Invalidate any active sessions with the service. Last known user remains. - */ -- (AWSTask *) globalSignOut; - -/** - Remove all sessions from the keychain for this user and clear last known user. - */ -- (void) signOutAndClearLastKnownUser; - -/** - Remove the id and access token from the keychain, but keep the refresh token. - Use this when you have updated user attributes and want to refresh the id and access tokens. - */ -- (void) clearSession; - - -/** - List devices for this user - */ -- (AWSTask *) listDevices: (int) limit paginationToken:(NSString * _Nullable) paginationToken; - -/** - Update device remembered status for a specific device id. - */ -- (AWSTask *) updateDeviceStatus: (NSString *) deviceId remembered:(BOOL) remembered; - -/** - Convenience method to update device remembered status for this device. - */ -- (AWSTask *) updateDeviceStatus: (BOOL) remembered; - - -/** - Get device details for a specific deviceId. - */ -- (AWSTask *) getDevice: (NSString *) deviceId; - -/** - Convenience method to get device details for this device. - */ -- (AWSTask *) getDevice; - - -/** - Forget (stop tracking) a specific deviceId. - */ -- (AWSTask *) forgetDevice: (NSString *) deviceId; - -/** - Forget (stop tracking) this device. - */ -- (AWSTask *) forgetDevice; - - -@end - - -/** - A User session. Encapsulates all tokens (id, access and refresh tokens) for a user. - */ -@interface AWSCognitoIdentityUserSession : NSObject - -@property (nonatomic, readonly) AWSCognitoIdentityUserSessionToken * _Nullable idToken; -@property (nonatomic, readonly) AWSCognitoIdentityUserSessionToken * _Nullable accessToken; -@property (nonatomic, readonly) AWSCognitoIdentityUserSessionToken * _Nullable refreshToken; -@property (nonatomic, readonly) NSDate * _Nullable expirationTime; - -@end - -/** - A JWT session token. - */ -@interface AWSCognitoIdentityUserSessionToken : NSObject - -/** - The raw JWT token as a string. - **/ -@property (nonatomic, readonly) NSString * tokenString; - -/** - A NSDictionary of claims in this token. - - @deprecated This property is incorrectly typed as a [String : String], but - claim values may be of several different type. - */ -@property (nonatomic, readonly) NSDictionary * claims DEPRECATED_MSG_ATTRIBUTE("Use `tokenClaims` instead."); - -/** - A Dictionary of claims in this token - */ -@property (nonatomic, readonly) NSDictionary * tokenClaims; - -@end - -/** - User settings. Currently only mfa options. - */ -@interface AWSCognitoIdentityUserSettings : NSObject - -@property (nonatomic, copy) NSArray* _Nullable mfaOptions; - -@end - - -/** - User MFA preferences. Replaces user settings for mfa - */ -@interface AWSCognitoIdentityUserMfaPreferences : NSObject - -@property (nonatomic, strong) AWSCognitoIdentityUserMfaType* _Nullable smsMfa; -@property (nonatomic, strong) AWSCognitoIdentityUserMfaType* _Nullable softwareTokenMfa; - -@end - -/** - User settings. Currently only mfa options. - */ -@interface AWSCognitoIdentityUserMfaType : NSObject - -@property (nonatomic, assign) BOOL enabled; -@property (nonatomic, assign) BOOL preferred; - -- (instancetype) initWithEnabled:(BOOL) enabled preferred:(BOOL) preferred; - -@end - - -@interface AWSCognitoIdentityUserMFAOption : NSObject - -@property (nonatomic, strong) NSString * attributeName; -@property (nonatomic, assign) AWSCognitoIdentityProviderDeliveryMediumType deliveryMedium; - -@end - -@interface AWSCognitoIdentityUserAttributeType : AWSCognitoIdentityProviderAttributeType -- (instancetype) initWithName:(NSString *) name value:(NSString *) value; -@end - -#pragma Response wrappers -@interface AWSCognitoIdentityUserConfirmSignUpResponse : AWSCognitoIdentityProviderConfirmSignUpResponse - -@end - -@interface AWSCognitoIdentityUserResendConfirmationCodeResponse :AWSCognitoIdentityProviderResendConfirmationCodeResponse - -@end - -@interface AWSCognitoIdentityUserGetDetailsResponse : AWSCognitoIdentityProviderGetUserResponse - -@end - -@interface AWSCognitoIdentityUserForgotPasswordResponse : AWSCognitoIdentityProviderForgotPasswordResponse - -@end - -@interface AWSCognitoIdentityUserConfirmForgotPasswordResponse : AWSCognitoIdentityProviderConfirmForgotPasswordResponse - -@end - -@interface AWSCognitoIdentityUserChangePasswordResponse : AWSCognitoIdentityProviderChangePasswordResponse - -@end - -@interface AWSCognitoIdentityUserUpdateAttributesResponse : AWSCognitoIdentityProviderUpdateUserAttributesResponse - -@end - -@interface AWSCognitoIdentityUserDeleteAttributesResponse : AWSCognitoIdentityProviderDeleteUserAttributesResponse - -@end - -@interface AWSCognitoIdentityUserVerifyAttributeResponse : AWSCognitoIdentityProviderVerifyUserAttributeResponse - -@end - -@interface AWSCognitoIdentityUserGetAttributeVerificationCodeResponse : AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse - -@end - -@interface AWSCognitoIdentityUserSetUserSettingsResponse : AWSCognitoIdentityProviderSetUserSettingsResponse - -@end - -@interface AWSCognitoIdentityUserGlobalSignOutResponse : AWSCognitoIdentityProviderGlobalSignOutResponse - -@end - -@interface AWSCognitoIdentityUserListDevicesResponse : AWSCognitoIdentityProviderListDevicesResponse - -@end - -@interface AWSCognitoIdentityUserUpdateDeviceStatusResponse : AWSCognitoIdentityProviderUpdateDeviceStatusResponse - -@end - -@interface AWSCognitoIdentityUserGetDeviceResponse : AWSCognitoIdentityProviderGetDeviceResponse - -@end - -@interface AWSCognitoIdentityUserVerifySoftwareTokenResponse : AWSCognitoIdentityProviderVerifySoftwareTokenResponse - -@end - -@interface AWSCognitoIdentityUserAssociateSoftwareTokenResponse : AWSCognitoIdentityProviderAssociateSoftwareTokenResponse - -@end - -@interface AWSCognitoIdentityUserSetUserMfaPreferenceResponse : AWSCognitoIdentityProviderSetUserMFAPreferenceResponse - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUser.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUser.m deleted file mode 100644 index 80227da..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUser.m +++ /dev/null @@ -1,1644 +0,0 @@ -// -// Copyright 2014-2018 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import "AWSCognitoIdentityProvider.h" -#import "AWSCognitoIdentityUser_Internal.h" -#import "AWSCognitoIdentityUserPool_Internal.h" -#import "AWSCognitoIdentityProviderSrpHelper.h" -#import "AWSJKBigInteger.h" -#import "NSData+AWSCognitoIdentityProvider.h" -#import - -@interface AWSCognitoIdentityUserPool() - -@property (nonatomic, strong) AWSCognitoIdentityProvider *client; - -@end - -@implementation AWSCognitoIdentityUser - -static const NSString * AWSCognitoIdentityUserDerivedKeyInfo = @"Caldera Derived Key"; -static const NSString * AWSCognitoIdentityUserAccessToken = @"accessToken"; -static const NSString * AWSCognitoIdentityUserIdToken = @"idToken"; -static const NSString * AWSCognitoIdentityUserRefreshToken = @"refreshToken"; -static const NSString * AWSCognitoIdentityUserTokenExpiration = @"tokenExpiration"; -static const NSString * AWSCognitoIdentityUserDeviceId = @"device.id"; -static const NSString * AWSCognitoIdentityUserAsfDeviceId = @"asf.device.id"; -static const NSString * AWSCognitoIdentityUserDeviceSecret = @"device.secret"; -static const NSString * AWSCognitoIdentityUserDeviceGroup = @"device.group"; -static const NSString * AWSCognitoIdentityUserUserAttributePrefix = @"userAttributes."; - --(instancetype) initWithUsername: (NSString *)username pool:(AWSCognitoIdentityUserPool *)pool { - self = [super init]; - if(self != nil) { - _username = username; - _pool = pool; - _confirmedStatus = AWSCognitoIdentityUserStatusUnknown; - } - return self; -} - --(AWSTask *) confirmSignUp:(NSString *) confirmationCode { - return [self confirmSignUp:confirmationCode forceAliasCreation:NO]; -} - --(AWSTask *) confirmSignUp:(NSString *) confirmationCode forceAliasCreation:(BOOL)forceAliasCreation { - AWSCognitoIdentityProviderConfirmSignUpRequest *request = [AWSCognitoIdentityProviderConfirmSignUpRequest new]; - request.clientId = self.pool.userPoolConfiguration.clientId; - request.username = self.username; - request.secretHash = [self.pool calculateSecretHash:self.username]; - request.confirmationCode = confirmationCode; - request.forceAliasCreation = (forceAliasCreation?@(YES):@(NO)); - request.analyticsMetadata = [self.pool analyticsMetadata]; - request.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[self.pool.client confirmSignUp:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - if (task.error) { - self.confirmedStatus = AWSCognitoIdentityUserStatusUnconfirmed; - return task; - } else { - self.confirmedStatus = AWSCognitoIdentityUserStatusConfirmed; - AWSCognitoIdentityUserConfirmSignUpResponse * response = [AWSCognitoIdentityUserConfirmSignUpResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - } - }]; -} - --(AWSTask *) forgotPassword { - AWSCognitoIdentityProviderForgotPasswordRequest *request = [AWSCognitoIdentityProviderForgotPasswordRequest new]; - request.clientId = self.pool.userPoolConfiguration.clientId; - request.username = self.username; - request.secretHash = [self.pool calculateSecretHash:self.username]; - request.analyticsMetadata = [self.pool analyticsMetadata]; - request.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[self.pool.client forgotPassword:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserForgotPasswordResponse * response = [AWSCognitoIdentityUserForgotPasswordResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; - -} - --(AWSTask *) confirmForgotPassword: (NSString *)confirmationCode password:(NSString *) password { - AWSCognitoIdentityProviderConfirmForgotPasswordRequest *request = [AWSCognitoIdentityProviderConfirmForgotPasswordRequest new]; - request.clientId = self.pool.userPoolConfiguration.clientId; - request.username = self.username; - request.secretHash = [self.pool calculateSecretHash:self.username]; - request.password = password; - request.confirmationCode = confirmationCode; - request.analyticsMetadata = [self.pool analyticsMetadata]; - request.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[self.pool.client confirmForgotPassword:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserConfirmForgotPasswordResponse * response = [AWSCognitoIdentityUserConfirmForgotPasswordResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; -} - --(AWSTask *) resendConfirmationCode { - AWSCognitoIdentityProviderResendConfirmationCodeRequest *request = [AWSCognitoIdentityProviderResendConfirmationCodeRequest new]; - request.clientId = self.pool.userPoolConfiguration.clientId; - request.username = self.username; - request.secretHash = [self.pool calculateSecretHash:self.username]; - request.analyticsMetadata = [self.pool analyticsMetadata]; - request.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[self.pool.client resendConfirmationCode:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserResendConfirmationCodeResponse * response = [AWSCognitoIdentityUserResendConfirmationCodeResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; -} - --(AWSTask*) changePassword: (NSString*)currentPassword proposedPassword: (NSString *)proposedPassword { - AWSCognitoIdentityProviderChangePasswordRequest* request = [AWSCognitoIdentityProviderChangePasswordRequest new]; - request.previousPassword = currentPassword; - request.proposedPassword = proposedPassword; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - return [[self.pool.client changePassword:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderChangePasswordResponse * apiResponse = task.result; - AWSCognitoIdentityUserChangePasswordResponse *response = [AWSCognitoIdentityUserChangePasswordResponse new]; - [response aws_copyPropertiesFromObject:apiResponse]; - return [AWSTask taskWithResult:response]; - }]; - - }]; -} - --(AWSTask*) getDetails { - AWSCognitoIdentityProviderGetUserRequest* request = [AWSCognitoIdentityProviderGetUserRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - return [[self.pool.client getUser:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserGetDetailsResponse * response = [AWSCognitoIdentityUserGetDetailsResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - -/** - Get a session - */ --(AWSTask *) getSession { - - //check to see if we have valid tokens - __block NSString * keyChainNamespace = [self keyChainNamespaceClientId]; - NSString * expirationTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserTokenExpiration]; - NSString * expirationDate = self.pool.keychain[expirationTokenKey]; - - if(expirationDate){ - NSDate *expiration = [NSDate aws_dateFromString:expirationDate format:AWSDateISO8601DateFormat1]; - NSString * refreshToken = [self refreshTokenFromKeyChain:keyChainNamespace]; - - // Token exists, the user is confirmed - self.confirmedStatus = AWSCognitoIdentityUserStatusConfirmed; - - NSString * accessTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserAccessToken]; - NSString * accessToken = self.pool.keychain[accessTokenKey]; - //if the session expires > 5 minutes return it and there is at least an accessToken. - if(expiration && [expiration compare:[NSDate dateWithTimeIntervalSinceNow:5 * 60]] == NSOrderedDescending && accessToken){ - NSString * idTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserIdToken]; - AWSCognitoIdentityUserSession * session = [[AWSCognitoIdentityUserSession alloc] initWithIdToken:self.pool.keychain[idTokenKey] accessToken:accessToken refreshToken:refreshToken expirationTime:expiration]; - - session.expirationTime = expiration; - return [AWSTask taskWithResult:session]; - } - //else refresh it using the refresh token - else if(refreshToken){ - AWSCognitoIdentityProviderInitiateAuthRequest * request = [AWSCognitoIdentityProviderInitiateAuthRequest new]; - request.authFlow = AWSCognitoIdentityProviderAuthFlowTypeRefreshTokenAuth; - request.clientId = self.pool.userPoolConfiguration.clientId; - request.analyticsMetadata = [self.pool analyticsMetadata]; - request.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - NSMutableDictionary * authParameters = [[NSMutableDictionary alloc] initWithDictionary:@{@"REFRESH_TOKEN" : refreshToken}]; - - //refresh token secret hash is actually client secret for this api, set it if it is supplied - if(self.pool.userPoolConfiguration.clientSecret != nil){ - [authParameters setObject:self.pool.userPoolConfiguration.clientSecret forKey:@"SECRET_HASH"]; - } - - [self addDeviceKey:authParameters]; - - request.authParameters = authParameters; - return [[self.pool.client initiateAuth:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - if(task.error){ - //If this token is no longer valid, fall back on interactive auth. - if(task.error.code == AWSCognitoIdentityProviderErrorNotAuthorized) { - return [self interactiveAuth]; - } else { - return task; - } - } - - AWSCognitoIdentityProviderInitiateAuthResponse *response = task.result; - AWSCognitoIdentityProviderAuthenticationResultType *authResult = response.authenticationResult; - /** Check to see if refreshToken is received in the response. - If not, load it from the keychain. - */ - NSString * refreshToken = authResult.refreshToken; - if (refreshToken == nil){ - NSString * keyChainNamespace = [self keyChainNamespaceClientId]; - refreshToken = [self refreshTokenFromKeyChain:keyChainNamespace]; - } - AWSCognitoIdentityUserSession * session = [[AWSCognitoIdentityUserSession alloc] initWithIdToken: authResult.idToken accessToken:authResult.accessToken refreshToken:refreshToken expiresIn:authResult.expiresIn]; - [self updateUsernameAndPersistTokens:session]; - return [AWSTask taskWithResult:session]; - }]; - } - } - return [self setConfirmationStatus: [self interactiveAuth]]; -} - - - -/** - * Explicitly get a session without using any cached tokens/refresh tokens. - */ -- (AWSTask*) getSession:(NSString *)username password:(NSString *)password validationData:(NSArray*)validationData { - AWSTask *authenticationTask = self.pool.userPoolConfiguration.migrationEnabled ? [self migrationAuth:username password:password validationData:validationData lastChallenge:nil] : [self srpAuthInternal:username password:password validationData:validationData lastChallenge:nil isInitialCustomChallenge:NO]; - return [self setConfirmationStatus: [authenticationTask continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - return [self getSessionInternal:task]; - }]]; -} - -- (AWSTask*) setConfirmationStatus: (AWSTask*) task { - - // If the user status is unknown - if (self.confirmedStatus == AWSCognitoIdentityUserStatusUnknown) { - if (task.error) { - if (task.error.code == AWSCognitoIdentityProviderErrorUserNotConfirmed) { - self.confirmedStatus = AWSCognitoIdentityUserStatusUnconfirmed; - } - } else { - self.confirmedStatus = AWSCognitoIdentityUserStatusConfirmed; - } - } - - return task; -} - - -- (AWSTask*) getSessionInternal: (AWSTask*) task{ - return [task continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderRespondToAuthChallengeResponse * authenticateResult = task.result; - AWSCognitoIdentityProviderAuthenticationResultType * authResult = task.result.authenticationResult; - AWSCognitoIdentityProviderChallengeNameType nextChallenge = authenticateResult.challengeName; - - AWSCognitoIdentityUserSession * session = nil; - //No more challenges we have a session - if(authResult != nil){ - session = [[AWSCognitoIdentityUserSession alloc] initWithIdToken:authResult.idToken accessToken:authResult.accessToken refreshToken:authResult.refreshToken expiresIn:authResult.expiresIn]; - } - - //last step is to perform device auth if device key is supplied or we are being challenged with device auth - if(authResult.latestDeviceMetadata != nil || nextChallenge == AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth){ - return [self performDeviceAuth: task session:session]; - } - - //if mfa required, present mfa challenge - if(AWSCognitoIdentityProviderChallengeNameTypeSmsMfa == nextChallenge || AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa == nextChallenge){ - if ([self.pool.delegate respondsToSelector:@selector(startMultiFactorAuthentication)]) { - BOOL isSoftwareToken = AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa == nextChallenge; - id authenticationDelegate = [self.pool.delegate startMultiFactorAuthentication]; - NSString *deliveryMedium = isSoftwareToken ? @"SOFTWARE_TOKEN" : authenticateResult.challengeParameters[@"CODE_DELIVERY_DELIVERY_MEDIUM"]; - NSString *destination = isSoftwareToken ? authenticateResult.challengeParameters[@"FRIENDLY_DEVICE_NAME"] : authenticateResult.challengeParameters[@"CODE_DELIVERY_DESTINATION"]; - return [self mfaAuthInternal:deliveryMedium destination:destination authState:authenticateResult.session challengeName:nextChallenge authenticationDelegate:authenticationDelegate]; - - }else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"startMultiFactorAuthentication not implemented by authentication delegate"}]]; - } - }else if(AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType == nextChallenge){ - return [self startSelectMfaUI:authenticateResult]; - }else if(AWSCognitoIdentityProviderChallengeNameTypeMfaSetup == nextChallenge){ - return [self startMfaSetupRequiredUI:authenticateResult]; - }else if(AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired == nextChallenge){ - return [self startNewPasswordRequiredUI:authenticateResult]; - }else if(AWSCognitoIdentityProviderAuthFlowTypeUserSrpAuth == nextChallenge){ //if srp auth happens mid auth - return [self startPasswordAuthenticationUI:authenticateResult]; - }else if (session) { //we have a session, return it - [self updateUsernameAndPersistTokens:session]; - return [AWSTask taskWithResult:session]; - }else { //this is a custom challenge - if ([self.pool.delegate respondsToSelector:@selector(startCustomAuthentication)]) { - id authenticationDelegate = [self.pool.delegate startCustomAuthentication]; - AWSCognitoIdentityCustomAuthenticationInput *input = [AWSCognitoIdentityCustomAuthenticationInput new]; - input.challengeParameters = authenticateResult.challengeParameters; - AWSTaskCompletionSource *challengeDetails = [AWSTaskCompletionSource new]; - [authenticationDelegate getCustomChallengeDetails:input customAuthCompletionSource:challengeDetails]; - return [challengeDetails.task continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - return [[self performRespondCustomAuthChallenge:task.result session:authenticateResult.session] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - [authenticationDelegate didCompleteCustomAuthenticationStepWithError:task.error]; - return [self getSessionInternal: task]; - }]; - - }]; - - }else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"startCustomAuthentication not implemented by authentication delegate"}]]; - } - } - }]; -} - -- (AWSTask*) startPasswordAuthenticationUI:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse*) lastChallenge { - if([self.pool.delegate respondsToSelector:@selector(startPasswordAuthentication)]){ - id authenticationDelegate = [self.pool.delegate startPasswordAuthentication]; - return [self passwordAuthInternal:authenticationDelegate lastChallenge:lastChallenge isInitialCustomChallenge:lastChallenge == nil]; - }else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"startPasswordAuthentication must be implemented on your AWSCognitoIdentityInteractiveAuthenticationDelegate"}]]; - } -} - -- (AWSTask*) startNewPasswordRequiredUI:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse*) lastChallenge { - if ([self.pool.delegate respondsToSelector:@selector(startNewPasswordRequired)]) { - id newPasswordRequiredDelegate = [self.pool.delegate startNewPasswordRequired]; - NSString * userAttributes = lastChallenge.challengeParameters[@"userAttributes"]; - NSString * requiredAttributes = lastChallenge.challengeParameters[@"requiredAttributes"]; - NSMutableDictionary *userAttributesDict = [NSMutableDictionary new]; - NSMutableSet *requiredAttributesSet = [NSMutableSet new]; - - if(userAttributes){ - [userAttributesDict addEntriesFromDictionary:[NSJSONSerialization JSONObjectWithData:[userAttributes dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]]; - } - if(requiredAttributes) { - NSArray * requiredAttributesArray = [NSJSONSerialization JSONObjectWithData:[requiredAttributes dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]; - for (NSString * requiredAttribute in requiredAttributesArray) { - //strip off userAttributes. from all the attribute names - NSString *strippedKey = [requiredAttribute substringFromIndex:[AWSCognitoIdentityUserUserAttributePrefix length]]; - [requiredAttributesSet addObject:strippedKey]; - } - } - AWSCognitoIdentityNewPasswordRequiredInput *newPasswordRequiredInput = [[AWSCognitoIdentityNewPasswordRequiredInput alloc] initWithUserAttributes:userAttributesDict requiredAttributes:requiredAttributesSet]; - AWSTaskCompletionSource *newPasswordRequiredDetails = [AWSTaskCompletionSource new]; - [newPasswordRequiredDelegate getNewPasswordDetails:newPasswordRequiredInput newPasswordRequiredCompletionSource:newPasswordRequiredDetails]; - return [[newPasswordRequiredDetails.task continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - return [self performRespondToNewPasswordChallenge:task.result session:lastChallenge.session]; - }] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - [newPasswordRequiredDelegate didCompleteNewPasswordStepWithError:task.error]; - if(task.error){ - return [self startNewPasswordRequiredUI:lastChallenge]; - } - return [self getSessionInternal:task]; - }]; - - }else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"startNewPasswordRequired not implemented by authentication delegate"}]]; - } -} - -- (AWSTask*) startMfaSetupRequiredUI:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse*) lastChallenge { - NSString * availableMfas = lastChallenge.challengeParameters[@"MFAS_CAN_SETUP"]; - NSMutableSet *availableMfasSet = [NSMutableSet new]; - - if(availableMfas) { - NSArray * availableMfasArray = [NSJSONSerialization JSONObjectWithData:[availableMfas dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]; - for (NSString * availableMfa in availableMfasArray) { - [availableMfasSet addObject:availableMfa]; - } - } - - if([availableMfasSet containsObject:@"SOFTWARE_TOKEN_MFA"]){ - if ([self.pool.delegate respondsToSelector:@selector(startSoftwareMfaSetupRequired)]) { - id softwareMfaSetupRequiredDelegate = [self.pool.delegate startSoftwareMfaSetupRequired]; - AWSCognitoIdentityProviderAssociateSoftwareTokenRequest *request = [AWSCognitoIdentityProviderAssociateSoftwareTokenRequest new]; - request.session = lastChallenge.session; - return [[self.pool.client associateSoftwareToken:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentitySoftwareMfaSetupRequiredInput *softwareMfaSetupRequiredInput = [[AWSCognitoIdentitySoftwareMfaSetupRequiredInput alloc] initWithSecretCode:task.result.secretCode username:self.username]; - return [self verifyMfaSetup:task.result.session selectMfaDelegate:softwareMfaSetupRequiredDelegate input:softwareMfaSetupRequiredInput]; - }]; - } else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"startSoftwareMfaSetupRequired not implemented by authentication delegate"}]]; - } - } else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"This version of the SDK does not support setup of the MFA types necessary to authenticate"}]]; - } - -} - -- (AWSTask*) verifyMfaSetup:(NSString *) session selectMfaDelegate:(id ) softwareMfaSetupRequiredDelegate input:(AWSCognitoIdentitySoftwareMfaSetupRequiredInput *) input { - AWSTaskCompletionSource *softwareMfaSetupRequiredDetails = [AWSTaskCompletionSource new]; - [softwareMfaSetupRequiredDelegate getSoftwareMfaSetupDetails:input softwareMfaSetupRequiredCompletionSource:softwareMfaSetupRequiredDetails]; - return [[softwareMfaSetupRequiredDetails.task continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull mfaDetails) { - AWSCognitoIdentityProviderVerifySoftwareTokenRequest *verifyRequest = [AWSCognitoIdentityProviderVerifySoftwareTokenRequest new]; - verifyRequest.session = session; - verifyRequest.friendlyDeviceName = mfaDetails.result.friendlyDeviceName; - verifyRequest.userCode = mfaDetails.result.userCode; - return [self.pool.client verifySoftwareToken:verifyRequest]; - }] continueWithBlock:^id _Nullable(AWSTask *_Nonnull verifySoftwareToken) { - [softwareMfaSetupRequiredDelegate didCompleteMfaSetupStepWithError:verifySoftwareToken.error]; - if(verifySoftwareToken.error){ - return [self verifyMfaSetup:session selectMfaDelegate:softwareMfaSetupRequiredDelegate input:input]; - } - - NSMutableDictionary *challengeResponses = [NSMutableDictionary new]; - - return [self getSessionInternal:[self performRespondToAuthChallenge:challengeResponses challengeName:AWSCognitoIdentityProviderChallengeNameTypeMfaSetup session:verifySoftwareToken.result.session]]; - }]; -} - -- (AWSTask*) startSelectMfaUI:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse*) lastChallenge { - if ([self.pool.delegate respondsToSelector:@selector(startSelectMfa)]) { - id selectMfaDelegate = [self.pool.delegate startSelectMfa]; - NSString * availableMfas = lastChallenge.challengeParameters[@"MFAS_CAN_CHOOSE"]; - NSMutableDictionary *availableMfasDict = [NSMutableDictionary new]; - - if(availableMfas) { - NSArray * availableMfasArray = [NSJSONSerialization JSONObjectWithData:[availableMfas dataUsingEncoding:NSUTF8StringEncoding] options:NSJSONReadingAllowFragments error:nil]; - for (NSString * availableMfa in availableMfasArray) { - NSString *value = nil; - if([@"SOFTWARE_TOKEN_MFA" isEqualToString:availableMfa]){ - value = lastChallenge.challengeParameters[@"FRIENDLY_DEVICE_NAME"]; - }else if([@"SMS_MFA" isEqualToString:availableMfa]){ - value = lastChallenge.challengeParameters[@"CODE_DELIVERY_DESTINATION"]; - } - if(value == nil){ - value = @"unknown"; - } - [availableMfasDict setObject:value forKey:availableMfa]; - } - } - AWSCognitoIdentitySelectMfaInput *selectMfaInput = [[AWSCognitoIdentitySelectMfaInput alloc] initWithAvailableMfas:availableMfasDict]; - AWSTaskCompletionSource *selectMfaDetails = [AWSTaskCompletionSource new]; - [selectMfaDelegate getSelectMfaDetails:selectMfaInput selectMfaCompletionSource:selectMfaDetails]; - return [[selectMfaDetails.task continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - return [self performRespondToSelectMfaChallenge:task.result session:lastChallenge.session]; - }] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - [selectMfaDelegate didCompleteSelectMfaStepWithError:task.error]; - if(task.error){ - return [self startSelectMfaUI:lastChallenge]; - } - return [self getSessionInternal:task]; - }]; - }else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"startSelectMfa not implemented by authentication delegate"}]]; - } -} - -- (AWSTask*) performDeviceAuth:(AWSTask*) lastChallengeResponse session: (AWSCognitoIdentityUserSession *) session { - if(session){ - [self updateUsernameAndPersistTokens:session]; - } - if(lastChallengeResponse.result.challengeName == AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth){ - return [[self deviceAuthInternal:lastChallengeResponse] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - if(task.cancelled || task.error) { - return task; - }else { - AWSCognitoIdentityProviderRespondToAuthChallengeResponse *response = task.result; - AWSCognitoIdentityUserSession * session = [[AWSCognitoIdentityUserSession alloc] initWithIdToken:response.authenticationResult.idToken accessToken:response.authenticationResult.accessToken refreshToken:response.authenticationResult.refreshToken expiresIn:response.authenticationResult.expiresIn]; - [self updateUsernameAndPersistTokens:session]; - return [AWSTask taskWithResult:session]; - } - }]; - }else { - return [[self confirmDeviceInternal:lastChallengeResponse.result.authenticationResult] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - if(task.error || task.isCancelled){ - return task; - }else { - return [AWSTask taskWithResult:session]; - } - }]; - } -} - -/** - * Generates a device password, calls service to exchange the password verifier and prompts user to remember the device as required. - */ -- (AWSTask*) confirmDeviceInternal:(AWSCognitoIdentityProviderAuthenticationResultType *) authResult { - if(authResult.latestDeviceMetadata != nil){ - NSString * deviceKey = authResult.latestDeviceMetadata.deviceKey; - NSString * deviceGroup = authResult.latestDeviceMetadata.deviceGroupKey; - if(deviceKey != nil){ - NSString *secret = [[NSUUID UUID] UUIDString]; - AWSCognitoIdentityProviderConfirmDeviceRequest * request = [AWSCognitoIdentityProviderConfirmDeviceRequest new]; - request.accessToken = authResult.accessToken; - request.deviceKey = deviceKey; - request.deviceName = [[UIDevice currentDevice] name]; - - AWSCognitoIdentityProviderSrpHelper * srpHelper = [[AWSCognitoIdentityProviderSrpHelper alloc] initWithPoolName:deviceGroup userName:deviceKey password:secret]; - request.deviceSecretVerifierConfig = [AWSCognitoIdentityProviderDeviceSecretVerifierConfigType new]; - request.deviceSecretVerifierConfig.salt = [[NSData aws_dataWithSignedBigInteger:srpHelper.salt] base64EncodedStringWithOptions:0]; - request.deviceSecretVerifierConfig.passwordVerifier = [[NSData aws_dataWithSignedBigInteger:srpHelper.v] base64EncodedStringWithOptions:0]; - return [[self.pool.client confirmDevice:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - [self persistDevice:deviceKey deviceSecret:secret deviceGroup:deviceGroup]; - AWSCognitoIdentityProviderConfirmDeviceResponse *confirmDeviceResponse = task.result; - if([confirmDeviceResponse.userConfirmationNecessary boolValue]) { - if ([self.pool.delegate respondsToSelector:@selector(startRememberDevice)]) { - id rememberDeviceStep = [self.pool.delegate startRememberDevice]; - AWSTaskCompletionSource *rememberDevice = [[AWSTaskCompletionSource alloc] init]; - [rememberDeviceStep getRememberDevice:rememberDevice]; - return [rememberDevice.task continueWithBlock:^id _Nullable(AWSTask * _Nonnull rememberDeviceTask) { - if(rememberDeviceTask.isCancelled || rememberDeviceTask.error){ - [rememberDeviceStep didCompleteRememberDeviceStepWithError:rememberDeviceTask.error]; - return rememberDeviceStep; - }else if ([rememberDeviceTask.result boolValue]){ - AWSCognitoIdentityProviderUpdateDeviceStatusRequest * request = [AWSCognitoIdentityProviderUpdateDeviceStatusRequest new]; - request.accessToken = authResult.accessToken; - request.deviceKey = deviceKey; - request.deviceRememberedStatus = AWSCognitoIdentityProviderDeviceRememberedStatusTypeRemembered; - return [[self.pool.client updateDeviceStatus:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull updateDeviceStatusTask) { - [rememberDeviceStep didCompleteRememberDeviceStepWithError:rememberDeviceTask.error]; - return updateDeviceStatusTask; - }]; - } - return task; - }]; - - - }else { - AWSDDLogWarn(@"startRememberDevice is not implemented by authentication delegate, defaulting to not remembered."); - } - } - return task; - }]; - } - } - return [AWSTask taskWithResult:nil]; -} - -/** - * Kick off interactive auth to prompt developer to challenge end user for credentials - */ -- (AWSTask*) interactiveAuth { - if(self.pool.delegate != nil){ - if([self.pool.delegate respondsToSelector:@selector(startCustomAuthentication)] && !self.pool.userPoolConfiguration.migrationEnabled) { - id authenticationDelegate = [self.pool.delegate startCustomAuthentication]; - return [self customAuthInternal:authenticationDelegate]; - }else if([self.pool.delegate respondsToSelector:@selector(startPasswordAuthentication)]){ - id authenticationDelegate = [self.pool.delegate startPasswordAuthentication]; - return [self passwordAuthInternal:authenticationDelegate lastChallenge:nil isInitialCustomChallenge:NO]; - }else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"Either startCustomAuthentication or startPasswordAuthentication must be implemented on your AWSCognitoIdentityInteractiveAuthenticationDelegate"}]]; - } - } else { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate userInfo:@{NSLocalizedDescriptionKey: @"Authentication delegate not set"}]]; - }; -} - -/** - * Prompt developer to obtain username/password and do SRP auth - */ -- (AWSTask*) passwordAuthInternal: (id) authenticationDelegate lastChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse*) lastChallenge isInitialCustomChallenge:(BOOL) isInitialCustomChallenge { - AWSCognitoIdentityPasswordAuthenticationInput * input = [[AWSCognitoIdentityPasswordAuthenticationInput alloc] initWithLastKnownUsername:[self.pool currentUsername]]; - AWSTaskCompletionSource*passwordAuthenticationDetails = [AWSTaskCompletionSource new]; - [authenticationDelegate getPasswordAuthenticationDetails:input passwordAuthenticationCompletionSource:passwordAuthenticationDetails]; - return [passwordAuthenticationDetails.task continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityPasswordAuthenticationDetails * authDetails = task.result; - - if(self.pool.userPoolConfiguration.migrationEnabled){ - return [[self migrationAuth:authDetails.username password:authDetails.password validationData:authDetails.validationData lastChallenge:lastChallenge] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - [authenticationDelegate didCompletePasswordAuthenticationStepWithError:task.error]; - if(task.isCancelled){ - return task; - } - if(task.error){ - //retry password auth on error - return [self passwordAuthInternal:authenticationDelegate lastChallenge:lastChallenge isInitialCustomChallenge:NO]; - }else { - //morph this initiate auth response into a respond to auth challenge response so it works as input to getSessionInternal - AWSCognitoIdentityProviderRespondToAuthChallengeResponse * response = [AWSCognitoIdentityProviderRespondToAuthChallengeResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [self getSessionInternal:[AWSTask taskWithResult:response]]; - } - }]; - } else { - return [[self srpAuthInternal:authDetails.username password:authDetails.password validationData:authDetails.validationData lastChallenge:lastChallenge isInitialCustomChallenge:isInitialCustomChallenge] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - [authenticationDelegate didCompletePasswordAuthenticationStepWithError:task.error]; - if(task.isCancelled){ - return task; - } - if(task.error){ - //retry password auth on error - return [self passwordAuthInternal:authenticationDelegate lastChallenge:lastChallenge isInitialCustomChallenge:isInitialCustomChallenge]; - }else { - return [self getSessionInternal:task]; - } - }]; - } - }]; -} - -/** - * Pass username and password in plaintext so developer can validate login and migrate as appropriate. - **/ -- (AWSTask*) migrationAuth:(NSString *)username password:(NSString *)password validationData:(NSArray*)validationData lastChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse*) lastChallenge { - self.username = username; - NSMutableDictionary *challengeResponses = [NSMutableDictionary new]; - [self addSecretHashDeviceKeyAndUsername:challengeResponses]; - [challengeResponses setObject:password forKey:@"PASSWORD"]; - - if(lastChallenge){ - AWSCognitoIdentityProviderRespondToAuthChallengeRequest *input = [AWSCognitoIdentityProviderRespondToAuthChallengeRequest new]; - input.challengeName = lastChallenge.challengeName; - input.challengeResponses = challengeResponses; - input.session = lastChallenge.session; - input.analyticsMetadata = [self.pool analyticsMetadata]; - input.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[self.pool.client respondToAuthChallenge:input] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - return [self forgetDeviceOnRespondDeviceNotFoundError:task retryContinuation:^AWSTask *{ - return [self migrationAuth:username password:password validationData:validationData lastChallenge:lastChallenge]; - }]; - }]; - } - else{ - AWSCognitoIdentityProviderInitiateAuthRequest *input = [AWSCognitoIdentityProviderInitiateAuthRequest new]; - input.clientId = self.pool.userPoolConfiguration.clientId; - input.clientMetadata = [self.pool getValidationData:validationData]; - input.analyticsMetadata = [self.pool analyticsMetadata]; - input.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - input.authFlow = AWSCognitoIdentityProviderAuthFlowTypeUserPasswordAuth; - input.authParameters = challengeResponses; - - return [[self.pool.client initiateAuth:input] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - //if there was an error, it may be due to the device being forgotten, reset the device and retry if that is the case - return [self forgetDeviceOnInitiateDeviceNotFoundError:task retryContinuation:^AWSTask *{ - return [self migrationAuth:username password:password validationData:validationData lastChallenge:lastChallenge]; - }]; - }]; - } -} - - -/** - * Prompt developer to obtain custom challenge details - */ -- (AWSTask*) customAuthInternal: (id) authenticationDelegate { - AWSTaskCompletionSource *customAuthenticationDetails = [AWSTaskCompletionSource new]; - AWSCognitoIdentityCustomAuthenticationInput *input = [[AWSCognitoIdentityCustomAuthenticationInput alloc] initWithChallengeParameters: [NSDictionary new]]; - [authenticationDelegate getCustomChallengeDetails:input customAuthCompletionSource:customAuthenticationDetails]; - return [[customAuthenticationDetails.task continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - - //if first challenge is SRP auth - if([self isFirstCustomStepSRP:task.result]){ - return [self startPasswordAuthenticationUI:nil]; - }else { - return [[self performInitiateCustomAuthChallenge:task.result] - continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - [authenticationDelegate didCompleteCustomAuthenticationStepWithError:task.error]; - if(task.isCancelled){ - return task; - } - if(task.error){ - //retry auth on error - return [self customAuthInternal:authenticationDelegate]; - }else { - //morph this initiate auth response into a respond to auth challenge response so it works as input to getSessionInternal - AWSCognitoIdentityProviderRespondToAuthChallengeResponse * response = [AWSCognitoIdentityProviderRespondToAuthChallengeResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [self getSessionInternal:[AWSTask taskWithResult:response]]; - } - }]; - } - }] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - if(task.error){ - //retry auth on error - return [self customAuthInternal:authenticationDelegate]; - }else { - return task; - } - }]; -} - -- (BOOL) isFirstCustomStepSRP: (AWSCognitoIdentityCustomChallengeDetails *) customAuthenticationDetails { - return customAuthenticationDetails.initialChallengeName != nil && [@"SRP_A" isEqualToString: customAuthenticationDetails.initialChallengeName]; -} - - -/** - * Run initiate auth on challenge responses from end user for custom auth - */ -- (AWSTask*) performInitiateCustomAuthChallenge: (AWSCognitoIdentityCustomChallengeDetails *) challengeDetails { - AWSCognitoIdentityProviderInitiateAuthRequest *input = [AWSCognitoIdentityProviderInitiateAuthRequest new]; - input.clientId = self.pool.userPoolConfiguration.clientId; - input.clientMetadata = [self.pool getValidationData:challengeDetails.validationData]; - input.analyticsMetadata = [self.pool analyticsMetadata]; - input.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - - NSMutableDictionary * authParameters = [[NSMutableDictionary alloc] initWithDictionary:challengeDetails.challengeResponses]; - [self addSecretHashDeviceKeyAndUsername:authParameters]; - - if(challengeDetails.initialChallengeName != nil){ - [authParameters setObject:challengeDetails.initialChallengeName forKey:@"CHALLENGE_NAME"]; - } - - input.authFlow = AWSCognitoIdentityProviderAuthFlowTypeCustomAuth; - input.authParameters = authParameters; - - return [[self.pool.client initiateAuth:input] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - //if there was an error, it may be due to the device being forgotten, reset the device and retry if that is the case - return [self forgetDeviceOnInitiateDeviceNotFoundError:task retryContinuation:^AWSTask *{ - return [self performInitiateCustomAuthChallenge:challengeDetails]; - }]; - }]; -} - - -/** - * Run respond to auth challenges on challenge responses from end user for custom auth - */ -- (AWSTask*) performRespondCustomAuthChallenge: (AWSCognitoIdentityCustomChallengeDetails *) challengeDetails session: (NSString *) session{ - NSMutableDictionary *challengeResponses = [NSMutableDictionary new]; - [challengeResponses addEntriesFromDictionary:challengeDetails.challengeResponses]; - - if([challengeResponses objectForKey:@"USERNAME"] != nil){ - self.username = [challengeResponses objectForKey:@"USERNAME"]; - } - return [[self performRespondToAuthChallenge:challengeResponses challengeName:AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge session:session] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - //if there was an error, it may be due to the device being forgotten, reset the device and retry if that is the case - return [self forgetDeviceOnRespondDeviceNotFoundError:task retryContinuation:^AWSTask *{ - return [self performRespondCustomAuthChallenge:challengeDetails session:session]; - }]; - }]; -} - - -/** - * Run respond to auth challenges on new password required responses from end user - */ -- (AWSTask*) performRespondToNewPasswordChallenge: (AWSCognitoIdentityNewPasswordRequiredDetails *) details session: (NSString *) session{ - NSMutableDictionary *challengeResponses = [NSMutableDictionary new]; - [challengeResponses setObject:details.proposedPassword forKey:@"NEW_PASSWORD"]; - - for(AWSCognitoIdentityUserAttributeType *userAttribute in details.userAttributes){ - [challengeResponses setObject:userAttribute.value forKey: [NSString stringWithFormat:@"%@%@", AWSCognitoIdentityUserUserAttributePrefix, userAttribute.name]]; - } - - return [self performRespondToAuthChallenge:challengeResponses challengeName:AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired session:session]; -} - - -/** - * Run respond to auth challenges on select mfa responses from end user - */ -- (AWSTask*) performRespondToSelectMfaChallenge: (AWSCognitoIdentitySelectMfaDetails *) details session: (NSString *) session{ - NSMutableDictionary *challengeResponses = [NSMutableDictionary new]; - [challengeResponses setObject:details.selectedMfa forKey:@"ANSWER"]; - return [self performRespondToAuthChallenge:challengeResponses challengeName:AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType session:session]; -} - - -/** - * Run respond to auth challenges - */ -- (AWSTask*) performRespondToAuthChallenge: (NSMutableDictionary *) challengeResponses challengeName: (AWSCognitoIdentityProviderChallengeNameType) challengeName session: (NSString *) session{ - AWSCognitoIdentityProviderRespondToAuthChallengeRequest *request = [AWSCognitoIdentityProviderRespondToAuthChallengeRequest new]; - request.session = session; - request.clientId = self.pool.userPoolConfiguration.clientId; - request.challengeName = challengeName; - request.analyticsMetadata = [self.pool analyticsMetadata]; - request.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - [self addSecretHashDeviceKeyAndUsername:challengeResponses]; - request.challengeResponses = challengeResponses; - - return [self.pool.client respondToAuthChallenge:request]; -} - -/** - * Perform SRP based authentication (initiateAuth(SRP_AUTH) and respondToAuthChallenge) given a username and password. If lastChallenge is supplied it starts with respondToAuthChallenge instead of initiate. - */ -- (AWSTask*) srpAuthInternal:(NSString *)username password:(NSString *)password validationData:(NSArray*)validationData lastChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse*) lastChallenge isInitialCustomChallenge:(BOOL) isInitialCustomChallenge { - self.username = username; - AWSCognitoIdentityProviderSrpHelper *srpHelper = [AWSCognitoIdentityProviderSrpHelper beginUserAuthentication:self.username password:password]; - NSMutableDictionary * challengeResponses = [[NSMutableDictionary alloc] initWithDictionary:@{@"SRP_A" : [srpHelper.clientState.publicA stringValueWithRadix:16]}]; - [self addSecretHashDeviceKeyAndUsername:challengeResponses]; - - if(lastChallenge){ - AWSCognitoIdentityProviderRespondToAuthChallengeRequest *input = [AWSCognitoIdentityProviderRespondToAuthChallengeRequest new]; - input.clientId = self.pool.userPoolConfiguration.clientId; - input.challengeName = lastChallenge.challengeName; - input.challengeResponses = challengeResponses; - input.session = lastChallenge.session; - input.analyticsMetadata = [self.pool analyticsMetadata]; - input.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[self.pool.client respondToAuthChallenge:input] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - //if there was an error, it may be due to the device being forgotten, reset the device and retry if that is the case - return [[self forgetDeviceOnRespondDeviceNotFoundError:task retryContinuation:^AWSTask *{ - return [self srpAuthInternal:username password:password validationData:validationData lastChallenge:lastChallenge isInitialCustomChallenge:isInitialCustomChallenge]; - }] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - //morph this initiate auth response into a respond to auth challenge response so it works as input to srpAuthInternalStep2 - AWSCognitoIdentityProviderRespondToAuthChallengeResponse * response = [AWSCognitoIdentityProviderRespondToAuthChallengeResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - //continue with second step of SRP auth - return [self srpAuthInternalStep2:[AWSTask taskWithResult:response] srpHelper:srpHelper]; - }]; - }]; - }else{ - AWSCognitoIdentityProviderInitiateAuthRequest *input = [AWSCognitoIdentityProviderInitiateAuthRequest new]; - input.clientId = self.pool.userPoolConfiguration.clientId; - input.clientMetadata = [self.pool getValidationData:validationData]; - input.analyticsMetadata = [self.pool analyticsMetadata]; - input.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - //based on whether this is custom auth or not set the auth flow - if(isInitialCustomChallenge){ - input.authFlow = AWSCognitoIdentityProviderAuthFlowTypeCustomAuth; - //set challenge name parameter to SRP_A - [challengeResponses setObject:@"SRP_A" forKey:@"CHALLENGE_NAME"]; - }else { - input.authFlow = AWSCognitoIdentityProviderAuthFlowTypeUserSrpAuth; - } - - - input.authParameters = challengeResponses; - - return [[self.pool.client initiateAuth:input] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - //if there was an error, it may be due to the device being forgotten, reset the device and retry if that is the case - return [[self forgetDeviceOnInitiateDeviceNotFoundError:task retryContinuation:^AWSTask *{ - return [self srpAuthInternal:username password:password validationData:validationData lastChallenge:lastChallenge isInitialCustomChallenge:isInitialCustomChallenge]; - }] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - //morph this initiate auth response into a respond to auth challenge response so it works as input to getSessionInternal - AWSCognitoIdentityProviderRespondToAuthChallengeResponse * response = [AWSCognitoIdentityProviderRespondToAuthChallengeResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - //continue with second step of SRP auth - return [self srpAuthInternalStep2:[AWSTask taskWithResult:response] srpHelper:srpHelper]; - }]; - }]; - } -} - -- (AWSTask *) srpAuthInternalStep2: (AWSTask *) task srpHelper:(AWSCognitoIdentityProviderSrpHelper *) srpHelper { - AWSCognitoIdentityProviderRespondToAuthChallengeResponse *authDetails = task.result; - AWSCognitoIdentityProviderSrpServerState *serverState = - [AWSCognitoIdentityProviderSrpServerState - serverStateForPoolName:[self.pool strippedPoolId] - publicBHexString:authDetails.challengeParameters[@"SRP_B"] - saltHexString:authDetails.challengeParameters[@"SALT"] - derivedKeyInfo:AWSCognitoIdentityUserDerivedKeyInfo - derivedKeySize:16 - serviceSecretBlock:[[NSData alloc] initWithBase64EncodedString:authDetails.challengeParameters[@"SECRET_BLOCK"] options:0]]; - - self.username = authDetails.challengeParameters[@"USERNAME"]; - self.userIdForSRP = authDetails.challengeParameters[@"USER_ID_FOR_SRP"]; - srpHelper.clientState.userName = self.userIdForSRP; - - AWSCognitoIdentityProviderRespondToAuthChallengeRequest *authInput = [AWSCognitoIdentityProviderRespondToAuthChallengeRequest new]; - authInput.session = authDetails.session; - authInput.challengeName = authDetails.challengeName; - authInput.analyticsMetadata = [self.pool analyticsMetadata]; - authInput.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - - NSMutableDictionary * authParameters = [[NSMutableDictionary alloc] initWithDictionary:@{@"TIMESTAMP": [AWSCognitoIdentityProviderSrpHelper generateDateString:srpHelper.clientState.timestamp], - @"PASSWORD_CLAIM_SECRET_BLOCK" : authDetails.challengeParameters[@"SECRET_BLOCK"], - @"PASSWORD_CLAIM_SIGNATURE" : [[srpHelper completeAuthentication:serverState] base64EncodedStringWithOptions:0] - }]; - - [self addSecretHashDeviceKeyAndUsername:authParameters]; - - authInput.challengeResponses = authParameters; - authInput.clientId = self.pool.userPoolConfiguration.clientId; - return [[self.pool.client respondToAuthChallenge:authInput] continueWithBlock:^id _Nullable(AWSTask * _Nonnull responseTask) { - return [self forgetDeviceOnRespondDeviceNotFoundError:responseTask retryContinuation:^AWSTask *{ - return [self srpAuthInternalStep2:task srpHelper:srpHelper]; - }]; - }]; -} - - -//Determine whether the error (if any) on the initiateAuth is a device not found error and if so forget the device and retry -- (AWSTask*) forgetDeviceOnInitiateDeviceNotFoundError:(AWSTask * _Nonnull) task retryContinuation: (AWSTask* (^_Nonnull)(void)) retryContinuation { - if([self isDeviceNotFoundError:task.error]){ - [self forgetDeviceInternal]; - return retryContinuation(); - } - return task; -} - -//Determine whether the error (if any) on the respondToAuthChallenge is a device not found error and if so forget the device and retry -- (AWSTask*) forgetDeviceOnRespondDeviceNotFoundError:(AWSTask * _Nonnull) task retryContinuation: (AWSTask* (^_Nonnull)(void)) retryContinuation { - if([self isDeviceNotFoundError:task.error]){ - [self forgetDeviceInternal]; - return retryContinuation(); - } - return task; -} - -- (BOOL) isDeviceNotFoundError: (NSError *) error { - return error != nil && error.code == AWSCognitoIdentityProviderErrorResourceNotFound && [@"Device does not exist." isEqualToString:error.userInfo[@"message"]]; -} - -/** - * Perform SRP based authentication (initiateAuth(SRP_AUTH) and respondToAuthChallenge) given a username and password - */ -- (AWSTask*) deviceAuthInternal:(AWSTask*) deviceChallengeResponse { - AWSCognitoIdentityProviderRespondToAuthChallengeRequest *input = [AWSCognitoIdentityProviderRespondToAuthChallengeRequest new]; - input.clientId = self.pool.userPoolConfiguration.clientId; - AWSCognitoIdentityUserDeviceCredentials *deviceCredentials = [self getDeviceCredentials]; - AWSCognitoIdentityProviderRespondToAuthChallengeResponse * deviceChallenge = deviceChallengeResponse.result; - - - AWSCognitoIdentityProviderSrpHelper *srpHelper = [AWSCognitoIdentityProviderSrpHelper beginUserAuthentication:deviceCredentials.deviceId password:deviceCredentials.deviceSecret]; - NSMutableDictionary * challengeResponses = [[NSMutableDictionary alloc] initWithDictionary:@{@"SRP_A" : [srpHelper.clientState.publicA stringValueWithRadix:16]}]; - [self addSecretHashDeviceKeyAndUsername:challengeResponses]; - - input.challengeName = deviceChallenge.challengeName; - input.session = deviceChallenge.session; - input.challengeResponses = challengeResponses; - input.analyticsMetadata = [self.pool analyticsMetadata]; - input.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[self.pool.client respondToAuthChallenge:input] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - - AWSCognitoIdentityProviderRespondToAuthChallengeResponse *authDetails = task.result; - AWSCognitoIdentityProviderSrpServerState *serverState = - [AWSCognitoIdentityProviderSrpServerState - - serverStateForPoolName:deviceCredentials.deviceGroup - publicBHexString:authDetails.challengeParameters[@"SRP_B"] - saltHexString:authDetails.challengeParameters[@"SALT"] - derivedKeyInfo:AWSCognitoIdentityUserDerivedKeyInfo - derivedKeySize:16 - serviceSecretBlock:[[NSData alloc] initWithBase64EncodedString:authDetails.challengeParameters[@"SECRET_BLOCK"] options:0]]; - - AWSCognitoIdentityProviderRespondToAuthChallengeRequest *authInput = [AWSCognitoIdentityProviderRespondToAuthChallengeRequest new]; - authInput.session = authDetails.session; - authInput.challengeName = authDetails.challengeName; - authInput.analyticsMetadata = [self.pool analyticsMetadata]; - authInput.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - NSMutableDictionary * authParameters = [[NSMutableDictionary alloc] initWithDictionary:@{@"TIMESTAMP": [AWSCognitoIdentityProviderSrpHelper generateDateString:srpHelper.clientState.timestamp], - @"PASSWORD_CLAIM_SECRET_BLOCK" : authDetails.challengeParameters[@"SECRET_BLOCK"], - @"PASSWORD_CLAIM_SIGNATURE" : [[srpHelper completeAuthentication:serverState] base64EncodedStringWithOptions:0] - }]; - [self addSecretHashDeviceKeyAndUsername:authParameters]; - - authInput.challengeResponses = authParameters; - authInput.clientId = self.pool.userPoolConfiguration.clientId; - return [self.pool.client respondToAuthChallenge:authInput]; - - }]; -} - -/** - * Adds a device key to the authParameters dictionary if it is known for this username - */ --(void) addDeviceKey:(NSMutableDictionary *) authParameters { - AWSCognitoIdentityUserDeviceCredentials *deviceCredentials = [self getDeviceCredentials]; - if(deviceCredentials != nil){ - [authParameters setObject:deviceCredentials.deviceId forKey:@"DEVICE_KEY"]; - } -} - -/** - * Adds a SECRET_HASH and USERNAME and DEVICE_KEY to the authParameters dictionary. - */ --(void) addSecretHashDeviceKeyAndUsername:(NSMutableDictionary *) authParameters { - if(self.username == nil) { - self.username = authParameters[@"USERNAME"]; - } - - [authParameters setObject:self.username forKey:@"USERNAME"]; - NSString* secretHash = [self.pool calculateSecretHash:self.username]; - - if(secretHash != nil){ - [authParameters setObject:secretHash forKey:@"SECRET_HASH"]; - } - [self addDeviceKey:authParameters]; -} - -/** - * Invoke developer's ui to prompt user for mfa code and call enhanceAuth - */ --(AWSTask*) mfaAuthInternal: (NSString *) deliveryMedium destination:(NSString *) destination authState:(NSString *) authState challengeName: (AWSCognitoIdentityProviderChallengeNameType) challengeName authenticationDelegate:(id)authenticationDelegate{ - AWSTaskCompletionSource *mfaCode = [[AWSTaskCompletionSource alloc] init]; - AWSCognitoIdentityMultifactorAuthenticationInput* authenticationInput = [[AWSCognitoIdentityMultifactorAuthenticationInput alloc] initWithDeliveryMedium:deliveryMedium destination:destination]; - [authenticationDelegate getMultiFactorAuthenticationCode:authenticationInput mfaCodeCompletionSource:mfaCode]; - return [mfaCode.task - continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderRespondToAuthChallengeRequest *mfaChallenge = [AWSCognitoIdentityProviderRespondToAuthChallengeRequest new]; - mfaChallenge.session = authState; - mfaChallenge.challengeName = challengeName; - mfaChallenge.clientId = self.pool.userPoolConfiguration.clientId; - - NSString * responseKey = @"SMS_MFA_CODE"; - if(AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa == challengeName){ - responseKey = @"SOFTWARE_TOKEN_MFA_CODE"; - } - NSMutableDictionary * challengeResponses = [[NSMutableDictionary alloc] initWithDictionary:@{responseKey: mfaCode.task.result}]; - [self addSecretHashDeviceKeyAndUsername:challengeResponses]; - mfaChallenge.challengeResponses = challengeResponses; - mfaChallenge.analyticsMetadata = [self.pool analyticsMetadata]; - mfaChallenge.userContextData = [self.pool userContextData:self.username deviceId: [self asfDeviceId]]; - - return [[[self.pool.client respondToAuthChallenge:mfaChallenge] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderRespondToAuthChallengeResponse *response = task.result; - AWSCognitoIdentityProviderAuthenticationResultType * authResult = response.authenticationResult; - AWSCognitoIdentityUserSession * session = [[AWSCognitoIdentityUserSession alloc] initWithIdToken:authResult.idToken accessToken:authResult.accessToken refreshToken:authResult.refreshToken expiresIn:authResult.expiresIn]; - //last step is to perform device auth if device key is supplied or we are being challenged with device auth - if(authResult.latestDeviceMetadata != nil || response.challengeName == AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth){ - return [self performDeviceAuth: task session:session]; - }else{ - [self updateUsernameAndPersistTokens:session]; - return [AWSTask taskWithResult:session]; - } - }] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - [authenticationDelegate didCompleteMultifactorAuthenticationStepWithError:task.error]; - if([task isCancelled]){ - return task; - } - if(task.error){ - //retry on error - return [self mfaAuthInternal:deliveryMedium destination:destination authState:authState challengeName: challengeName authenticationDelegate:authenticationDelegate]; - }else { - return task; - } - }]; - }]; -} - -/** - * Update this user's attributes - */ --(AWSTask*) updateAttributes: (NSArray*) attributes { - AWSCognitoIdentityProviderUpdateUserAttributesRequest *request = [AWSCognitoIdentityProviderUpdateUserAttributesRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - NSMutableArray *userAttributes = [NSMutableArray new]; - request.userAttributes = userAttributes; - for (AWSCognitoIdentityUserAttributeType * attribute in attributes) { - AWSCognitoIdentityProviderAttributeType *apiAttribute = [AWSCognitoIdentityProviderAttributeType new]; - apiAttribute.name = attribute.name; - apiAttribute.value = attribute.value; - [userAttributes addObject: apiAttribute]; - } - return [[self.pool.client updateUserAttributes:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserUpdateAttributesResponse * response = [AWSCognitoIdentityUserUpdateAttributesResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - // drop id and access token to force a refresh - [self clearSession]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - -/** - * Delete the attributes specified by attributeNames - */ --(AWSTask*) deleteAttributes: (NSArray*) attributeNames { - AWSCognitoIdentityProviderDeleteUserAttributesRequest *request = [AWSCognitoIdentityProviderDeleteUserAttributesRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - request.userAttributeNames = attributeNames; - return [[self.pool.client deleteUserAttributes:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserDeleteAttributesResponse * response = [AWSCognitoIdentityUserDeleteAttributesResponse new]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - - -/** - * Verify a user attribute upon receiving the verification code. - */ --(AWSTask*) verifyAttribute: (NSString *) attributeName code: (NSString *) code { - AWSCognitoIdentityProviderVerifyUserAttributeRequest *request = [AWSCognitoIdentityProviderVerifyUserAttributeRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - request.attributeName = attributeName; - request.code = code; - return [[self.pool.client verifyUserAttribute:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserVerifyAttributeResponse * response = [AWSCognitoIdentityUserVerifyAttributeResponse new]; - return [AWSTask taskWithResult:response]; - }]; - }]; - -} - -/** - * Request a verification code to verify an attribute. - */ --(AWSTask*) getAttributeVerificationCode: (NSString *) attributeName { - AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest *request = [AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - request.attributeName = attributeName; - return [[self.pool.client getUserAttributeVerificationCode:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserGetAttributeVerificationCodeResponse * response = [AWSCognitoIdentityUserGetAttributeVerificationCodeResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - -/** - * Set the user settings for this user such as MFA - */ --(AWSTask*) setUserSettings: (AWSCognitoIdentityUserSettings *) settings; { - - AWSCognitoIdentityProviderSetUserSettingsRequest *request = [AWSCognitoIdentityProviderSetUserSettingsRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - NSMutableArray * mfaOptions = [NSMutableArray new]; - for(AWSCognitoIdentityUserMFAOption* mfaOption in settings.mfaOptions){ - [mfaOptions addObject:[mfaOption mfaOptionTypeValue]]; - } - request.MFAOptions = mfaOptions; - return [[self.pool.client setUserSettings:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserSetUserSettingsResponse * response = [AWSCognitoIdentityUserSetUserSettingsResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - - -/** - * Set the user settings for this user such as MFA - */ --(AWSTask*) setUserMfaPreference: (AWSCognitoIdentityUserMfaPreferences*) settings; { - - AWSCognitoIdentityProviderSetUserMFAPreferenceRequest *request = [AWSCognitoIdentityProviderSetUserMFAPreferenceRequest new]; - if(settings.smsMfa != nil){ - AWSCognitoIdentityProviderSMSMfaSettingsType* smsMfaSettings = [AWSCognitoIdentityProviderSMSMfaSettingsType new]; - smsMfaSettings.enabled = [NSNumber numberWithBool:settings.smsMfa.enabled]; - smsMfaSettings.preferredMfa = [NSNumber numberWithBool:settings.smsMfa.preferred]; - request.SMSMfaSettings = smsMfaSettings; - } - if(settings.softwareTokenMfa != nil){ - AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType* softwareTokenMfaSettings = [AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType new]; - softwareTokenMfaSettings.enabled = [NSNumber numberWithBool:settings.softwareTokenMfa.enabled]; - softwareTokenMfaSettings.preferredMfa = [NSNumber numberWithBool:settings.softwareTokenMfa.preferred]; - request.softwareTokenMfaSettings = softwareTokenMfaSettings; - } - - return [[[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - return [self.pool.client setUserMFAPreference:request]; - }] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserSetUserMfaPreferenceResponse * response = [AWSCognitoIdentityUserSetUserMfaPreferenceResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; -} - - -/** - * Start the process of associating a software token - */ --(AWSTask*) associateSoftwareToken { - AWSCognitoIdentityProviderAssociateSoftwareTokenRequest * request = [AWSCognitoIdentityProviderAssociateSoftwareTokenRequest new]; - return [[[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - return [self.pool.client associateSoftwareToken:request]; - }] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserAssociateSoftwareTokenResponse * response = [AWSCognitoIdentityUserAssociateSoftwareTokenResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; -} - - -/** - * Complete the process of associating a software token by verifying the code and setting device friendly name - */ --(AWSTask*) verifySoftwareToken: (NSString*) userCode friendlyDeviceName: (NSString* _Nullable) friendlyDeviceName { - - AWSCognitoIdentityProviderVerifySoftwareTokenRequest *request = [AWSCognitoIdentityProviderVerifySoftwareTokenRequest new]; - request.friendlyDeviceName = friendlyDeviceName; - request.userCode = userCode; - return [[[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - return [self.pool.client verifySoftwareToken:request]; - }] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserVerifySoftwareTokenResponse * response = [AWSCognitoIdentityUserVerifySoftwareTokenResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; -} - -/** - * Delete this user - */ --(AWSTask*) deleteUser { - AWSCognitoIdentityProviderDeleteUserRequest *request = [AWSCognitoIdentityProviderDeleteUserRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - return [self.pool.client deleteUser:request]; - }]; - -} - --(void) signOut { - if(self.username){ - NSArray *keys = self.pool.keychain.allKeys; - NSString *keyChainPrefix = [[self keyChainNamespaceClientId] stringByAppendingString:@"."]; - for (NSString *key in keys) { - //clear tokens associated with this user - if([key hasPrefix:keyChainPrefix]){ - [self.pool.keychain removeItemForKey:key]; - } - } - } -} - --(void) signOutAndClearLastKnownUser{ - [self signOut]; - [self.pool clearLastKnownUser]; -} - --(void) clearSession{ - if(self.username){ - NSString * keyChainNamespace = [self keyChainNamespaceClientId]; - NSString * idTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserIdToken]; - NSString * accessTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserAccessToken]; - [self.pool.keychain removeItemForKey:idTokenKey]; - [self.pool.keychain removeItemForKey:accessTokenKey]; - } -} - -- (NSString *) refreshTokenFromKeyChain: (NSString *) keyChainNamespace { - NSString * refreshTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserRefreshToken]; - NSString * refreshToken = self.pool.keychain[refreshTokenKey]; - return refreshToken; -} - --(BOOL) isSignedIn { - if(self.username == nil){ - return NO; - } - - NSString * keyChainNamespace = [self keyChainNamespaceClientId]; - NSString * refreshToken = [self refreshTokenFromKeyChain:keyChainNamespace]; - return refreshToken != nil; -} - -- (AWSTask *) globalSignOut { - AWSCognitoIdentityProviderGlobalSignOutRequest *request = [AWSCognitoIdentityProviderGlobalSignOutRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - return [[self.pool.client globalSignOut:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - [self signOut]; - return task; - }]; - }]; -} - -- (AWSTask *) listDevices:(int) limit paginationToken:(NSString * _Nullable) paginationToken { - AWSCognitoIdentityProviderListDevicesRequest *request = [AWSCognitoIdentityProviderListDevicesRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - request.paginationToken = paginationToken; - request.limit = [NSNumber numberWithInt:limit]; - return [[self.pool.client listDevices:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserListDevicesResponse * response = [AWSCognitoIdentityUserListDevicesResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - -- (AWSTask *) updateDeviceStatus: (NSString *) deviceId remembered:(BOOL) remembered { - AWSCognitoIdentityProviderUpdateDeviceStatusRequest *request = [AWSCognitoIdentityProviderUpdateDeviceStatusRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - request.deviceKey = deviceId; - request.deviceRememberedStatus = remembered ? AWSCognitoIdentityProviderDeviceRememberedStatusTypeRemembered : AWSCognitoIdentityProviderDeviceRememberedStatusTypeNotRemembered; - return [[self.pool.client updateDeviceStatus:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserUpdateDeviceStatusResponse * response = [AWSCognitoIdentityUserUpdateDeviceStatusResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - - -- (AWSTask *) updateDeviceStatus: (BOOL) remembered { - AWSCognitoIdentityUserDeviceCredentials * credentials = [self getDeviceCredentials]; - if(credentials){ - return [self updateDeviceStatus:[self getDeviceCredentials].deviceId remembered:remembered]; - }else{ - return [self deviceNotTrackedError]; - } -} - - -- (AWSTask *) getDevice: (NSString *) deviceId { - AWSCognitoIdentityProviderGetDeviceRequest *request = [AWSCognitoIdentityProviderGetDeviceRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - request.deviceKey = deviceId; - return [[self.pool.client getDevice:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUserGetDeviceResponse * response = [AWSCognitoIdentityUserGetDeviceResponse new]; - [response aws_copyPropertiesFromObject:task.result]; - return [AWSTask taskWithResult:response]; - }]; - }]; -} - -- (AWSTask *) getDevice { - AWSCognitoIdentityUserDeviceCredentials * credentials = [self getDeviceCredentials]; - if(credentials){ - return [self getDevice:credentials.deviceId]; - }else{ - return [self deviceNotTrackedError]; - } -} - -- (AWSTask *) forgetDevice { - AWSCognitoIdentityUserDeviceCredentials * credentials = [self getDeviceCredentials]; - if(credentials){ - return [self forgetDevice:credentials.deviceId]; - }else{ - return [self deviceNotTrackedError]; - } -} - -- (AWSTask *) deviceNotTrackedError { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain code:AWSCognitoIdentityProviderClientErrorDeviceNotTracked userInfo:@{NSLocalizedDescriptionKey: @"This device does not have an id, either it was never tracked or previously forgotten."}]]; -} - - -- (AWSTask *) forgetDevice: (NSString *) deviceId { - AWSCognitoIdentityProviderForgetDeviceRequest * request = [AWSCognitoIdentityProviderForgetDeviceRequest new]; - return [[self getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - request.accessToken = task.result.accessToken.tokenString; - request.deviceKey = deviceId; - return [[self.pool.client forgetDevice:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - - AWSCognitoIdentityUserDeviceCredentials * credentials = [self getDeviceCredentials]; - //if it was this device that was forgotten and call was successful, clear cached device. - if(credentials && credentials.deviceId && [credentials.deviceId isEqualToString:deviceId]){ - [self forgetDeviceInternal]; - } - return task; - }]; - }]; -} - -- (void) updateUsernameAndPersistTokens: (AWSCognitoIdentityUserSession *) session { - [self.pool setCurrentUser:self.username]; - NSString * keyChainNamespace = [self keyChainNamespaceClientId]; - if(session.idToken){ - NSString * idTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserIdToken]; - self.pool.keychain[idTokenKey] = session.idToken.tokenString; - } - if(session.accessToken){ - NSString * accessTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserAccessToken]; - self.pool.keychain[accessTokenKey] = session.accessToken.tokenString; - } - if(session.refreshToken){ - NSString * refreshTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserRefreshToken]; - self.pool.keychain[refreshTokenKey] = session.refreshToken.tokenString; - } - if(session.expirationTime){ - NSString * expirationTokenKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserTokenExpiration]; - self.pool.keychain[expirationTokenKey] = [session.expirationTime aws_stringValue:AWSDateISO8601DateFormat1]; - } -} - -- (void) persistDevice:(NSString *) deviceKey deviceSecret: (NSString *) deviceSecret deviceGroup: (NSString *) deviceGroup { - NSString * keyChainNamespace = [self keyChainNamespacePoolId]; - if(deviceKey){ - NSString * deviceIdKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceId]; - self.pool.keychain[deviceIdKey] = deviceKey; - } - if(deviceSecret){ - NSString * deviceSecretKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceSecret]; - self.pool.keychain[deviceSecretKey] = deviceSecret; - } - - if(deviceGroup){ - NSString * deviceGroupKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceGroup]; - self.pool.keychain[deviceGroupKey] = deviceGroup; - } -} - -- (void) forgetDeviceInternal { - NSString * keyChainNamespace = [self keyChainNamespacePoolId]; - NSString * deviceIdKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceId]; - self.pool.keychain[deviceIdKey] = nil; - NSString * deviceSecretKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceSecret]; - self.pool.keychain[deviceSecretKey] = nil; - NSString * deviceGroupKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceGroup]; - self.pool.keychain[deviceGroupKey] = nil; -} - -- (AWSCognitoIdentityUserDeviceCredentials *) getDeviceCredentials { - AWSCognitoIdentityUserDeviceCredentials *deviceCredentials = [[AWSCognitoIdentityUserDeviceCredentials alloc] initWithUser:self]; - if(deviceCredentials.deviceId && deviceCredentials.deviceSecret){ - return deviceCredentials; - }else { - return nil; - } -} - -- (NSString *) keyChainNamespaceClientId { - return [NSString stringWithFormat:@"%@.%@", self.pool.userPoolConfiguration.clientId, self.username]; -} - -- (NSString *) keyChainNamespacePoolId { - return [NSString stringWithFormat:@"%@.%@", self.pool.userPoolConfiguration.poolId, self.username]; -} - -- (NSString *) asfDeviceId { - NSString *asfDeviceId = [self getDeviceCredentials].deviceId; - if(asfDeviceId == nil){ - NSString * keyChainNamespace = [self keyChainNamespacePoolId]; - NSString * asfDeviceIdKey = [self keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserAsfDeviceId]; - asfDeviceId = self.pool.keychain[asfDeviceIdKey]; - if(asfDeviceId == nil){ - asfDeviceId = [[[NSUUID UUID] UUIDString] lowercaseString]; - self.pool.keychain[asfDeviceIdKey] = asfDeviceId; - } - } - return asfDeviceId; -} - -/** - * Get a namespaced keychain key given a namespace and key - */ -- (NSString *) keyChainKey: (NSString *) namespace key:(const NSString *) key { - return [NSString stringWithFormat:@"%@.%@", namespace, key]; -} - -- (NSString*) strippedPoolName { - return [self.pool.userPoolConfiguration.poolId substringFromIndex:[self.pool.userPoolConfiguration.poolId rangeOfString:@"_" ].location+1]; -} - -- (NSString*) deviceId { - AWSCognitoIdentityUserDeviceCredentials *deviceCredentials = [self getDeviceCredentials]; - return deviceCredentials?deviceCredentials.deviceId:nil; -} - -@end - -@implementation AWSCognitoIdentityUserSession - --(instancetype) initWithIdToken:(NSString *)idToken accessToken:(NSString *)accessToken refreshToken:(NSString *)refreshToken expiresIn:(NSNumber *) expiresIn { - self = [self initWithIdToken:idToken accessToken:accessToken refreshToken:refreshToken expirationTime:[NSDate dateWithTimeIntervalSinceNow:expiresIn.doubleValue]]; - return self; -} - --(instancetype) initWithIdToken:(NSString *)idToken accessToken:(NSString *)accessToken refreshToken:(NSString *)refreshToken expirationTime:(NSDate *) expirationTime { - self = [super init]; - if(self != nil) { - self.idToken = [[AWSCognitoIdentityUserSessionToken alloc] initWithToken:idToken]; - self.accessToken = [[AWSCognitoIdentityUserSessionToken alloc] initWithToken:accessToken]; - self.refreshToken = [[AWSCognitoIdentityUserSessionToken alloc] initWithToken:refreshToken]; - self.expirationTime = expirationTime; - } - return self; -} -@end - -@implementation AWSCognitoIdentityUserSessionToken - --(instancetype) initWithToken:(NSString *)token { - if(token == nil){ - return nil; - } - self = [super init]; - if(self != nil) { - self.tokenString = token; - } - return self; -} - --(NSDictionary *) claims { - return [self tokenClaims]; -} - --(NSDictionary *) tokenClaims { - NSDictionary * result = nil; - NSArray *pieces = [self.tokenString componentsSeparatedByString:@"."]; - if(pieces.count > 2){ - NSString * claims = pieces[1]; - //JWT is not padded with =, pad it if necessary - NSUInteger paddedLength = claims.length + (4 - (claims.length % 4)) % 4;; - claims = [claims stringByPaddingToLength:paddedLength withString:@"=" startingAtIndex:0]; - - NSData * claimsData = [[NSData alloc] initWithBase64EncodedString:claims options:NSDataBase64DecodingIgnoreUnknownCharacters]; - NSError *error = nil; - if(claimsData != nil){ - result = [NSJSONSerialization JSONObjectWithData:claimsData options:kNilOptions error:&error]; - if(error) { - AWSDDLogError(@"Unable to deserialize token claims: %@", error); - } - } else { - AWSDDLogError(@"Token is not valid base64"); - } - } - return result; -} - -@end - -@implementation AWSCognitoIdentityUserSettings - -@end - - -@implementation AWSCognitoIdentityUserMfaPreferences - -@end - -@implementation AWSCognitoIdentityUserMfaType -- (instancetype) initWithEnabled:(BOOL) enabled preferred:(BOOL) preferred { - if(self = [super init]){ - self.enabled = enabled; - self.preferred = preferred; - } - return self; -} -@end - -@implementation AWSCognitoIdentityUserMFAOption - -- (AWSCognitoIdentityProviderMFAOptionType *) mfaOptionTypeValue{ - AWSCognitoIdentityProviderMFAOptionType *result = [AWSCognitoIdentityProviderMFAOptionType new]; - [result aws_copyPropertiesFromObject:self]; - return result; -} -@end - -@implementation AWSCognitoIdentityUserAttributeType -- (instancetype) initWithName: (NSString *) name value: (NSString *) value{ - if(self = [super init]){ - self.name = name; - self.value = value; - } - return self; -} -@end - -@implementation AWSCognitoIdentityUserConfirmSignUpResponse - -@end - -@implementation AWSCognitoIdentityUserResendConfirmationCodeResponse - -@end - -@implementation AWSCognitoIdentityUserGetDetailsResponse - -@end - -@implementation AWSCognitoIdentityUserForgotPasswordResponse - -@end - -@implementation AWSCognitoIdentityUserConfirmForgotPasswordResponse - -@end - -@implementation AWSCognitoIdentityUserChangePasswordResponse - -@end - -@implementation AWSCognitoIdentityUserUpdateAttributesResponse - -@end - -@implementation AWSCognitoIdentityUserDeleteAttributesResponse - -@end - -@implementation AWSCognitoIdentityUserVerifyAttributeResponse - -@end - -@implementation AWSCognitoIdentityUserGetAttributeVerificationCodeResponse - -@end - -@implementation AWSCognitoIdentityUserSetUserSettingsResponse - -@end - -@implementation AWSCognitoIdentityUserListDevicesResponse - -@end - -@implementation AWSCognitoIdentityUserUpdateDeviceStatusResponse - -@end - -@implementation AWSCognitoIdentityUserGlobalSignOutResponse - -@end - -@implementation AWSCognitoIdentityUserGetDeviceResponse - -@end - -@implementation AWSCognitoIdentityUserAssociateSoftwareTokenResponse - -@end - -@implementation AWSCognitoIdentityUserVerifySoftwareTokenResponse - -@end - -@implementation AWSCognitoIdentityUserSetUserMfaPreferenceResponse - -@end - -@implementation AWSCognitoIdentityUserDeviceCredentials -- (instancetype) initWithUser:(AWSCognitoIdentityUser *) user { - if(self = [super init]){ - _user = user; - } - return self; -} - -- (NSString *) deviceId { - NSString * keyChainNamespace = [self.user keyChainNamespacePoolId]; - NSString * deviceIdKey = [self.user keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceId]; - return self.user.pool.keychain[deviceIdKey]; -} - -- (NSString *) deviceSecret { - NSString * keyChainNamespace = [self.user keyChainNamespacePoolId]; - NSString * deviceSecretKey = [self.user keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceSecret]; - return self.user.pool.keychain[deviceSecretKey]; -} - -- (NSString *) deviceGroup { - NSString * keyChainNamespace = [self.user keyChainNamespacePoolId]; - NSString * deviceGroupKey = [self.user keyChainKey:keyChainNamespace key:AWSCognitoIdentityUserDeviceGroup]; - return self.user.pool.keychain[deviceGroupKey]; -} -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUserPool.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUserPool.h deleted file mode 100644 index 9704198..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUserPool.h +++ /dev/null @@ -1,481 +0,0 @@ -// -// Copyright 2014-2017 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import -#import "AWSCognitoIdentityProviderService.h" - -@class AWSCognitoIdentityUser; -@class AWSCognitoIdentityUserAttributeType; -@class AWSCognitoIdentityPasswordAuthenticationInput; -@class AWSCognitoIdentityMultifactorAuthenticationInput; -@class AWSCognitoIdentityPasswordAuthenticationDetails; -@class AWSCognitoIdentityCustomChallengeDetails; -@class AWSCognitoIdentityUserPoolConfiguration; -@class AWSCognitoIdentityUserPoolSignUpResponse; -@class AWSCognitoIdentityNewPasswordRequiredDetails; -@class AWSCognitoIdentitySoftwareMfaSetupRequiredDetails; -@class AWSCognitoIdentitySelectMfaDetails; - -@protocol AWSCognitoIdentityInteractiveAuthenticationDelegate; -@protocol AWSCognitoIdentityPasswordAuthentication; -@protocol AWSCognitoIdentityMultiFactorAuthentication; -@protocol AWSCognitoIdentityCustomAuthentication; -@protocol AWSCognitoIdentityRememberDevice; -@protocol AWSCognitoIdentityNewPasswordRequired; -@protocol AWSCognitoIdentitySoftwareMfaSetupRequired; -@protocol AWSCognitoIdentitySelectMfa; - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSCognitoIdentityUserPool : NSObject - -@property (nonatomic, readonly) AWSServiceConfiguration *configuration; -@property (nonatomic, readonly) AWSCognitoIdentityUserPoolConfiguration *userPoolConfiguration; -@property (nonatomic, readonly) NSString *identityProviderName; - -/** - Set this delegate to interactively prompt users for authentication challenges when necessary - */ -@property (nonatomic, strong) id delegate; - -/** - * Fetches the Cognito User Pool instance configured in the `info.plist` under `CognitoUserPool` - * - * @return the default instance for Cognito User Pool - */ -+ (instancetype)defaultCognitoIdentityUserPool; - -+ (void)registerCognitoIdentityUserPoolWithUserPoolConfiguration:(AWSCognitoIdentityUserPoolConfiguration *)userPoolConfiguration - forKey:(NSString *)key; - -+ (void)registerCognitoIdentityUserPoolWithConfiguration:(nullable AWSServiceConfiguration *)configuration - userPoolConfiguration:(AWSCognitoIdentityUserPoolConfiguration *)userPoolConfiguration - forKey:(NSString *)key; - -+ (instancetype)CognitoIdentityUserPoolForKey:(NSString *)key; - -+ (void)removeCognitoIdentityUserPoolForKey:(NSString *)key; - -/** - Sign up a new user - */ -- (AWSTask *)signUp:(NSString *)username - password:(NSString *)password - userAttributes:(nullable NSArray *)userAttributes - validationData:(nullable NSArray *)validationData; - -/** - Return the user who last authenticated. Username may be nil if current user is unknown. - @return The last authenticated user - */ -- (nullable AWSCognitoIdentityUser *)currentUser; - -/** - Return the user without a username, when username is unknown. - */ -- (AWSCognitoIdentityUser *)getUser; - -/** - Return the user with a specific username - */ -- (AWSCognitoIdentityUser *)getUser:(NSString *)username; - -/** - Clear the last known user only without signing out of their user session - */ -- (void) clearLastKnownUser; - -/** - Clear everything from keychain, including last known user and user sessions for all users. - */ -- (void) clearAll; - -@end - -@interface AWSCognitoIdentityUserPoolConfiguration : NSObject - -@property (nonatomic, readonly) NSString *clientId; -@property (nonatomic, readonly, nullable) NSString *clientSecret; -@property (nonatomic, readonly) NSString *poolId; -@property (nonatomic, readonly) NSString *pinpointAppId; -@property (nonatomic, readonly) BOOL shouldProvideCognitoValidationData; -@property (nonatomic, readonly) BOOL migrationEnabled; - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId; - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId -shouldProvideCognitoValidationData:(BOOL)shouldProvideCognitoValidationData; - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId -shouldProvideCognitoValidationData:(BOOL)shouldProvideCognitoValidationData - pinpointAppId:(nullable NSString *)pinpointAppId; - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId -shouldProvideCognitoValidationData:(BOOL)shouldProvideCognitoValidationData - pinpointAppId:(nullable NSString *)pinpointAppId - migrationEnabled:(BOOL) migrationEnabled; - -@end - -/** - When interactive sign in is initiated, this encapsulates the last known username - */ -@interface AWSCognitoIdentityPasswordAuthenticationInput : NSObject - -@property(nonatomic, readonly, nullable) NSString *lastKnownUsername; - -@end - - - -/** - When interactive auth requires a multifactor authentication code, this encapsulates the - destination and delivery medium - */ -@interface AWSCognitoIdentityMultifactorAuthenticationInput : NSObject - -@property(nonatomic, readonly, nullable) NSString *destination; -@property(nonatomic, assign, readonly) AWSCognitoIdentityProviderDeliveryMediumType deliveryMedium; -@end - -/** - When responding to an interactive sign in, this encapsulates the end users' username and password - */ -@interface AWSCognitoIdentityPasswordAuthenticationDetails : NSObject - -@property(nonatomic, strong) NSString *username; -@property(nonatomic, strong) NSString *password; -@property(nonatomic, strong, nullable) NSArray *validationData; - -- (nullable instancetype)initWithUsername:(NSString *)username - password:(NSString *)password; -@end - - -/** - When responding to a custom sign in, this encapsulates the end users challenge responses - */ -@interface AWSCognitoIdentityCustomChallengeDetails : NSObject - -/** - Optional developer provided validation data to add to the initate auth call - */ -@property(nonatomic, strong, nullable) NSArray *validationData; - -/** - If you know your initial challenge, set this property to the challenge name - */ -@property(nonatomic, strong, nullable) NSString *initialChallengeName; - -/** - The end user challenge responses for this challenge - */ -@property(nonatomic, strong) NSDictionary* challengeResponses; - --(instancetype) initWithChallengeResponses: (NSDictionary *) challengeResponses; - -@end - - -/** - When responding to a new password required challenge this encapsulates the end users' new password and required attributes - */ -@interface AWSCognitoIdentityNewPasswordRequiredDetails : NSObject -/** - The end user's new password - */ -@property(nonatomic, strong, nonnull) NSString *proposedPassword; -/** - Any attribute the end user is setting. Values must be present for all - required attributes. Any other attributes are optional. - */ -@property(nonatomic, strong, nullable) NSArray *userAttributes; - -/** - Initializer given a new password and map of user attributes to set - **/ --(instancetype) initWithProposedPassword: (NSString *) proposedPassword userAttributes:(NSDictionary *) userAttributes; - -@end - -/** - When responding to a custom sign in, this encapsulates the challenge parameters that define the challenge - */ -@interface AWSCognitoIdentityCustomAuthenticationInput : NSObject - -@property(nonatomic, strong) NSDictionary* challengeParameters; - --(instancetype) initWithChallengeParameters: (NSDictionary *) challengeParameters; - -@end - -/** - When responding to new password required, this encapsulates the existing user attributes and the required user attributes. - */ -@interface AWSCognitoIdentityNewPasswordRequiredInput : NSObject - -@property(nonatomic, strong) NSDictionary* userAttributes; - -@property(nonatomic, strong) NSSet* requiredAttributes; - --(instancetype) initWithUserAttributes: (NSDictionary *) userAttributes requiredAttributes: (NSSet*) requiredAttributes; - -@end - -/** - When responding to software mfa setup required, this encapsulates the secret code the end user must provide to their software mfa. - */ -@interface AWSCognitoIdentitySoftwareMfaSetupRequiredInput : NSObject - -@property(nonatomic, strong) NSString *secretCode; -@property(nonatomic, strong) NSString *username; - --(instancetype) initWithSecretCode: (NSString *) secretCode username: (NSString *) username; - -@end - -/** - When responding to a software mfa setup required challenge this encapsulates the end user's user code and friendly name for their TOTP - */ -@interface AWSCognitoIdentitySoftwareMfaSetupRequiredDetails : NSObject -/** - The end user's code from their software mfa - */ -@property(nonatomic, strong, nonnull) NSString *userCode; -/** - The friendly device name that will be specified when this software mfa is requested. - */ -@property(nonatomic, strong, nullable) NSString *friendlyDeviceName; - -/** - Initializer given the software tokens' code and friendly device name - **/ --(instancetype) initWithUserCode: (NSString *) userCode friendlyDeviceName:(NSString* _Nullable) friendlyDeviceName; - -@end - -/** - When responding to a select mfa challenge, this encapsulates the available mfas the end user can choose from - */ -@interface AWSCognitoIdentitySelectMfaInput : NSObject - -@property(nonatomic, strong) NSDictionary* availableMfas; - --(instancetype) initWithAvailableMfas: (NSDictionary*) availableMfas; - -@end - - -/** - When responding to a select mfa challenge this encapsulates the end users mfa choice - */ -@interface AWSCognitoIdentitySelectMfaDetails : NSObject -/** - The mfa the end user selected - */ -@property(nonatomic, strong, nonnull) NSString *selectedMfa; -/** - Initializer given the mfa selected by the end user - **/ --(instancetype) initWithSelectedMfa:(NSString*) selectedMfa; - -@end - - - - -/** - The error domain for AWSCognitoIdentityProvider errors. -
    -
  • AWSCognitoIdentityProviderClientErrorUnknown - Unknown error.
  • -
  • AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate - Necessary authentication delegate isn't set.
  • -
  • AWSCognitoIdentityProviderClientErrorCustomAuthenticationNotSupported - Custom authentication is not supported by this SDK.
  • -
  • AWSCognitoIdentityProviderClientErrorDeviceNotTracked - This device does not have an id, either it was never tracked or previously forgotten.
  • -
- */ -typedef NS_ENUM(NSInteger, AWSCognitoIdentityClientErrorType) { - AWSCognitoIdentityProviderClientErrorUnknown = 0, - AWSCognitoIdentityProviderClientErrorInvalidAuthenticationDelegate = -1000, - AWSCognitoIdentityProviderClientErrorCustomAuthenticationNotSupported = -2000, - AWSCognitoIdentityProviderClientErrorDeviceNotTracked = -3000, -}; - -@interface AWSCognitoIdentityUserPoolSignUpResponse : AWSCognitoIdentityProviderSignUpResponse -@property (nonatomic, readonly) AWSCognitoIdentityUser* user; -@end - -@protocol AWSCognitoIdentityInteractiveAuthenticationDelegate -@optional -/** - Initialize ui to prompt end user for username and password - */ --(id) startPasswordAuthentication; - -/** - Initialize ui to prompt end user for multifactor authentication code - */ --(id) startMultiFactorAuthentication; - -/** - Initialize ui to prompt end user to remember this device - */ --(id) startRememberDevice; - -/** - Initialize ui to prompt end user to set a new password and specify profile information as part of sign in - */ --(id) startNewPasswordRequired; - -/** - Initialize ui to prompt end user for custom authentication flow - */ --(id) startCustomAuthentication; - -/** - Initialize ui to prompt end user to setup a software mfa token */ --(id) startSoftwareMfaSetupRequired; - -/** - Initialize ui to prompt end user to pick desired mfa */ --(id) startSelectMfa; - -@end - -@protocol AWSCognitoIdentityPasswordAuthentication -/** - Obtain username and password from end user. - @param authenticationInput input details including last known username - @param passwordAuthenticationCompletionSource set passwordAuthenticationCompletionSource.result - with the username and password received from the end user. - */ --(void) getPasswordAuthenticationDetails: (AWSCognitoIdentityPasswordAuthenticationInput *) authenticationInput passwordAuthenticationCompletionSource: (AWSTaskCompletionSource *) passwordAuthenticationCompletionSource; -/** - This step completed, usually either display an error to the end user or dismiss ui - @param error the error if any that occured - */ --(void) didCompletePasswordAuthenticationStepWithError:(NSError* _Nullable) error; -@end - -@protocol AWSCognitoIdentityMultiFactorAuthentication -/** - Obtain mfa code from the end user - @param authenticationInput details about the deliveryMedium and masked destination for where the code was sent - @param mfaCodeCompletionSource set mfaCodeCompletionSource.result with the mfa code from end user - */ --(void) getMultiFactorAuthenticationCode: (AWSCognitoIdentityMultifactorAuthenticationInput *) authenticationInput mfaCodeCompletionSource: (AWSTaskCompletionSource *) mfaCodeCompletionSource; -/** - This step completed, usually either display an error to the end user or dismiss ui - @param error the error if any that occured - */ --(void) didCompleteMultifactorAuthenticationStepWithError:(NSError* _Nullable) error; -@end - - -@protocol AWSCognitoIdentityCustomAuthentication - - -/** - Obtain input for a custom challenge from the end user - @param authenticationInput details the challenge including the challenge name and inputs - @param customAuthCompletionSource set customAuthCompletionSource.result with the challenge answers from the end user - */ --(void) getCustomChallengeDetails: (AWSCognitoIdentityCustomAuthenticationInput *) authenticationInput customAuthCompletionSource: (AWSTaskCompletionSource *) customAuthCompletionSource; -/** - This step completed, usually either display an error to the end user or dismiss ui - @param error the error if any that occured - */ --(void) didCompleteCustomAuthenticationStepWithError:(NSError* _Nullable) error; - - -@end - -@protocol AWSCognitoIdentityRememberDevice - -/** - Obtain whether to remember this device or not - @param rememberDeviceCompletionSource set customAuthCompletionSource.result with YES or NO answer from the end user - */ --(void) getRememberDevice: (AWSTaskCompletionSource *) rememberDeviceCompletionSource; -/** - This step completed, usually either display an error to the end user or dismiss ui - @param error the error if any that occured - */ --(void) didCompleteRememberDeviceStepWithError:(NSError* _Nullable) error; -@end - - -@protocol AWSCognitoIdentityNewPasswordRequired - -/** - Obtain a new password and specify profile information as part of sign in from the end user - @param newPasswordRequiredInput user profile and required attributes of the end user - @param newPasswordRequiredCompletionSource set newPasswordRequiredCompletionSource.result with the new password and any attribute updates from the end user - */ --(void) getNewPasswordDetails: (AWSCognitoIdentityNewPasswordRequiredInput *) newPasswordRequiredInput newPasswordRequiredCompletionSource: (AWSTaskCompletionSource *) newPasswordRequiredCompletionSource; -/** - This step completed, usually either display an error to the end user or dismiss ui - @param error the error if any that occured - */ --(void) didCompleteNewPasswordStepWithError:(NSError* _Nullable) error; - - -@end - - -@protocol AWSCognitoIdentitySoftwareMfaSetupRequired - -/** - Obtain information about end user's software mfa - @param softwareMfaSetupInput contains secret code necessary for end user to configure their software mfa - @param softwareMfaSetupRequiredCompletionSource set softwareMfaSetupRequiredCompletionSource.result with the secret code and device name from the end user - */ --(void) getSoftwareMfaSetupDetails: (AWSCognitoIdentitySoftwareMfaSetupRequiredInput *) softwareMfaSetupInput softwareMfaSetupRequiredCompletionSource: (AWSTaskCompletionSource *) softwareMfaSetupRequiredCompletionSource; -/** - This step completed, usually either display an error to the end user or dismiss ui - @param error the error if any that occured - */ --(void) didCompleteMfaSetupStepWithError:(NSError* _Nullable) error; - - -@end - -@protocol AWSCognitoIdentitySelectMfa - -/** - Obtain which mfa end user wants to provide - @param selectMfaInput contains which mfas are available - @param selectMfaCompletionSource set selectMfaCompletionSource.result with the mfa end user picked - */ --(void) getSelectMfaDetails: (AWSCognitoIdentitySelectMfaInput *) selectMfaInput selectMfaCompletionSource: (AWSTaskCompletionSource *) selectMfaCompletionSource; -/** - This step completed, usually either display an error to the end user or dismiss ui - @param error the error if any that occured - */ --(void) didCompleteSelectMfaStepWithError:(NSError* _Nullable) error; - - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUserPool.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUserPool.m deleted file mode 100644 index 1400e0f..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/AWSCognitoIdentityUserPool.m +++ /dev/null @@ -1,576 +0,0 @@ -// -// Copyright 2014-2017 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import "AWSCognitoIdentityProvider.h" -#import "AWSCognitoIdentityUser_Internal.h" -#import "AWSCognitoIdentityUserPool_Internal.h" -#import "AWSUICKeyChainStore.h" -#import -#import "NSData+AWSCognitoIdentityProvider.h" -#import "AWSCognitoIdentityProviderModel.h" -#import "AWSCognitoIdentityProviderASF.h" - -static const NSString * AWSCognitoIdentityUserPoolCurrentUser = @"currentUser"; - -@interface AWSCognitoIdentityUserPool() - -@property (nonatomic, strong) AWSCognitoIdentityProvider *client; -@property (nonatomic, strong) AWSServiceConfiguration *configuration; -@property (nonatomic, strong) AWSCognitoIdentityUserPoolConfiguration *userPoolConfiguration; -@property (nonatomic, strong) NSString * pinpointEndpointId; -@end - -@interface AWSCognitoIdentityProvider() - -- (instancetype)initWithConfiguration:(AWSServiceConfiguration *)configuration; - -@end - -@implementation AWSCognitoIdentityUserPool - -static AWSSynchronizedMutableDictionary *_serviceClients = nil; -static NSString *const AWSInfoCognitoUserPool = @"CognitoUserPool"; -static NSString *const AWSCognitoUserPoolIdLegacy = @"CognitoUserPoolId"; -static NSString *const AWSCognitoUserPoolAppClientIdLegacy = @"CognitoUserPoolAppClientId"; -static NSString *const AWSCognitoUserPoolAppClientSecretLegacy = @"CognitoUserPoolAppClientSecret"; -static NSString *const AWSCognitoUserPoolId = @"PoolId"; -static NSString *const AWSCognitoUserPoolAppClientId = @"AppClientId"; -static NSString *const AWSCognitoUserPoolAppClientSecret = @"AppClientSecret"; -static NSString *const AWSCognitoUserPoolPinpointAppId = @"PinpointAppId"; -static NSString *const AWSCognitoUserPoolMigrationEnabled = @"MigrationEnabled"; - -static NSString *const AWSPinpointContextKeychainService = @"com.amazonaws.AWSPinpointContext"; -static NSString *const AWSPinpointContextKeychainUniqueIdKey = @"com.amazonaws.AWSPinpointContextKeychainUniqueIdKey"; - -+ (void)loadCategories { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - awsbigint_loadBigInt(); - }); -} - -+ (instancetype)defaultCognitoIdentityUserPool { - static AWSCognitoIdentityUserPool *_defaultUserPool = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - AWSServiceConfiguration *serviceConfiguration = nil; - AWSServiceInfo *serviceInfo = [[AWSInfo defaultAWSInfo] defaultServiceInfo:AWSInfoCognitoUserPool]; - - if (serviceInfo) { - serviceConfiguration = [[AWSServiceConfiguration alloc] initWithRegion:serviceInfo.region - credentialsProvider:nil]; - } - - NSString *poolId = [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolId] ?: [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolIdLegacy]; - NSString *clientId = [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolAppClientId] ?: [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolAppClientIdLegacy]; - NSString *clientSecret = [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolAppClientSecret] ?: [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolAppClientSecretLegacy]; - NSString *pinpointAppId = [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolPinpointAppId]; - NSNumber *migrationEnabled = [serviceInfo.infoDictionary objectForKey:AWSCognitoUserPoolMigrationEnabled]; - BOOL migrationEnabledBoolean = NO; - if (migrationEnabled != nil) { - migrationEnabledBoolean = [migrationEnabled boolValue]; - } - - if (poolId && clientId) { - AWSCognitoIdentityUserPoolConfiguration *configuration = [[AWSCognitoIdentityUserPoolConfiguration alloc] initWithClientId:clientId - clientSecret:clientSecret - poolId:poolId - shouldProvideCognitoValidationData:YES - pinpointAppId:pinpointAppId - migrationEnabled:migrationEnabledBoolean ]; - _defaultUserPool = [[AWSCognitoIdentityUserPool alloc] initWithConfiguration:serviceConfiguration - userPoolConfiguration:configuration]; - } else { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"The service configuration is `nil`. You need to configure `Info.plist` before using this method." - userInfo:nil]; - } - }); - - return _defaultUserPool; -} - -+ (void)registerCognitoIdentityUserPoolWithUserPoolConfiguration:(AWSCognitoIdentityUserPoolConfiguration *)userPoolConfiguration - forKey:(NSString *)key { - if (![AWSServiceManager defaultServiceManager].defaultServiceConfiguration) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"`defaultServiceConfiguration` is `nil`. You need to set it before using this method." - userInfo:nil]; - } - - [self registerCognitoIdentityUserPoolWithConfiguration:[AWSServiceManager defaultServiceManager].defaultServiceConfiguration - userPoolConfiguration:userPoolConfiguration - forKey:key]; -} - -+ (void)registerCognitoIdentityUserPoolWithConfiguration:(AWSServiceConfiguration *)configuration - userPoolConfiguration:(AWSCognitoIdentityUserPoolConfiguration *)userPoolConfiguration - forKey:(NSString *)key { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _serviceClients = [AWSSynchronizedMutableDictionary new]; - }); - AWSCognitoIdentityUserPool *identityProvider = [[AWSCognitoIdentityUserPool alloc] initWithConfiguration:configuration - userPoolConfiguration:userPoolConfiguration]; - [_serviceClients setObject:identityProvider - forKey:key]; -} - -+ (instancetype)CognitoIdentityUserPoolForKey:(NSString *)key { - return [_serviceClients objectForKey:key]; -} - -+ (void)removeCognitoIdentityUserPoolForKey:(NSString *)key { - [_serviceClients removeObjectForKey:key]; -} - -- (instancetype)init { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"`- init` is not a valid initializer. Use `+ defaultCognitoIdentityProvider` or `+ CognitoIdentityProviderForKey:` instead." - userInfo:nil]; - return nil; -} - -// Internal init method -- (instancetype)initWithConfiguration:(AWSServiceConfiguration *)configuration - userPoolConfiguration:(AWSCognitoIdentityUserPoolConfiguration *)userPoolConfiguration; { - if (self = [super init]) { - if (configuration) { - _configuration = [configuration copy]; - } else { - if (![AWSServiceManager defaultServiceManager].defaultServiceConfiguration) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"`defaultServiceConfiguration` is `nil`. You need to set it before using this method." - userInfo:nil]; - } - _configuration = [[AWSServiceManager defaultServiceManager].defaultServiceConfiguration copy]; - } - - _userPoolConfiguration = [userPoolConfiguration copy]; - - _client = [[AWSCognitoIdentityProvider alloc] initWithConfiguration:_configuration]; - _userPoolConfiguration = userPoolConfiguration; - - _keychain = [AWSUICKeyChainStore keyChainStoreWithService:[NSString stringWithFormat:@"%@.%@", [NSBundle mainBundle].bundleIdentifier, [AWSCognitoIdentityUserPool class]]]; - - - //If Pinpoint is setup, get the endpoint or create one. - if(userPoolConfiguration.pinpointAppId) { - - AWSUICKeyChainStore *pinpointKeychain = [AWSUICKeyChainStore keyChainStoreWithService:AWSPinpointContextKeychainService]; - - _pinpointEndpointId = [pinpointKeychain stringForKey:AWSPinpointContextKeychainUniqueIdKey]; - - //if there is no endpoint in the keychain, create a new one in the location Pinpoint looks for it - if(_pinpointEndpointId == nil) { - _pinpointEndpointId = [[[NSUUID UUID] UUIDString] lowercaseString]; - pinpointKeychain[AWSPinpointContextKeychainUniqueIdKey] = _pinpointEndpointId; - } - } - - - } - return self; -} - -- (void) dealloc { - _delegate = nil; -} - -- (AWSTask*) signUp: (NSString*) username - password: (NSString*) password - userAttributes: (NSArray *) userAttributes - validationData: (NSArray *) validationData { - AWSCognitoIdentityProviderSignUpRequest* request = [AWSCognitoIdentityProviderSignUpRequest new]; - request.clientId = self.userPoolConfiguration.clientId; - request.username = username; - request.password = password; - request.userAttributes = userAttributes; - request.validationData = [self getValidationDataAsArray:validationData]; - request.secretHash = [self calculateSecretHash:username]; - request.analyticsMetadata = [self analyticsMetadata]; - AWSCognitoIdentityUser *contextUser = [[AWSCognitoIdentityUser alloc] initWithUsername:username pool:self]; - request.userContextData = [self userContextData:username deviceId:[contextUser asfDeviceId]]; - - return [[self.client signUp:request] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityUser * user = [[AWSCognitoIdentityUser alloc] initWithUsername:username pool:self]; - if([task.result.userConfirmed intValue] == AWSCognitoIdentityProviderUserStatusTypeConfirmed){ - user.confirmedStatus = AWSCognitoIdentityUserStatusConfirmed; - }else if([task.result.userConfirmed intValue] == AWSCognitoIdentityProviderUserStatusTypeUnconfirmed) { - user.confirmedStatus = AWSCognitoIdentityUserStatusUnconfirmed; - } - AWSCognitoIdentityUserPoolSignUpResponse *signupResponse = [AWSCognitoIdentityUserPoolSignUpResponse new]; - [signupResponse aws_copyPropertiesFromObject:task.result]; - signupResponse.user = user; - return [AWSTask taskWithResult:signupResponse]; - }]; -} - -- (AWSCognitoIdentityUser*) currentUser { - return [[AWSCognitoIdentityUser alloc] initWithUsername:[self currentUsername] pool: self]; -} - -- (NSString*) currentUsername { - return self.keychain[[self currentUserKey]]; -} - -- (NSString *) currentUserKey { - return [NSString stringWithFormat:@"%@.%@", self.userPoolConfiguration.clientId, AWSCognitoIdentityUserPoolCurrentUser]; -} - -- (void) setCurrentUser:(NSString *) username { - self.keychain[[self currentUserKey]] = username; -} - -- (AWSCognitoIdentityUser*) getUser { - return [[AWSCognitoIdentityUser alloc] initWithUsername:nil pool:self]; -} - -- (AWSCognitoIdentityUser*) getUser:(NSString *) username { - return [[AWSCognitoIdentityUser alloc] initWithUsername:username pool:self]; -} - -- (AWSCognitoIdentityProviderAnalyticsMetadataType *) analyticsMetadata { - if(self.pinpointEndpointId){ - AWSCognitoIdentityProviderAnalyticsMetadataType *metadata = [AWSCognitoIdentityProviderAnalyticsMetadataType new]; - metadata.analyticsEndpointId = self.pinpointEndpointId; - return metadata; - } - return nil; -} - -- (AWSCognitoIdentityProviderUserContextDataType *) userContextData: (NSString * _Nonnull) username deviceId:(NSString * _Nullable) deviceId { - AWSCognitoIdentityProviderUserContextDataType *userContextData = [AWSCognitoIdentityProviderUserContextDataType new]; - userContextData.encodedData = [AWSCognitoIdentityProviderASF userContextData:self.userPoolConfiguration.poolId username:username deviceId:deviceId userPoolClientId:self.userPoolConfiguration.clientId]; - return userContextData; -} - -- (void) clearLastKnownUser { - NSString * currentUserKey = [self currentUserKey]; - if(currentUserKey){ - [self.keychain removeItemForKey:[self currentUserKey]]; - } -} - -- (void) clearAll { - NSArray *keys = self.keychain.allKeys; - NSString *keyChainPrefix = [NSString stringWithFormat:@"%@.", self.userPoolConfiguration.clientId]; - for (NSString *key in keys) { - if([key hasPrefix:keyChainPrefix]){ - [self.keychain removeItemForKey:key]; - } - } -} - -#pragma mark identity provider -- (NSString *) identityProviderName { - return [NSString stringWithFormat:@"%@/%@", self.client.configuration.endpoint.hostName, self.userPoolConfiguration.poolId]; -} - -- (AWSTask*) token { - return [[[self currentUser] getSession] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - return [AWSTask taskWithResult:task.result.idToken.tokenString]; - }]; -} - -- (AWSTask *> *)logins { - return [self.token continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - return [AWSTask taskWithResult:@{self.identityProviderName:task.result}]; - }]; -} - -#pragma mark internal - -- (NSString *) calculateSecretHash: (NSString*) userName; -{ - if(self.userPoolConfiguration.clientSecret == nil) - return nil; - - const char *cKey = [self.userPoolConfiguration.clientSecret cStringUsingEncoding:NSASCIIStringEncoding]; - const char *cData = [[userName stringByAppendingString:self.userPoolConfiguration.clientId] cStringUsingEncoding:NSUTF8StringEncoding]; - - unsigned char cHMAC[CC_SHA256_DIGEST_LENGTH]; - - CCHmac(kCCHmacAlgSHA256, cKey, strlen(cKey), cData, strlen(cData), cHMAC); - - NSData *HMAC = [[NSData alloc] initWithBytes:cHMAC - length:CC_SHA256_DIGEST_LENGTH]; - - return [HMAC base64EncodedStringWithOptions:kNilOptions]; -} - -AWSCognitoIdentityUserAttributeType* attribute(NSString *name, NSString *value) { - AWSCognitoIdentityUserAttributeType *attr = [AWSCognitoIdentityUserAttributeType new]; - attr.name = name; - attr.value = value; - return attr; -} - -- (NSDictionary*)cognitoValidationData { - UIDevice *device = [UIDevice currentDevice]; - NSBundle *bundle = [NSBundle mainBundle]; - NSString *bundleVersion = [bundle objectForInfoDictionaryKey:(NSString*)kCFBundleVersionKey]; - NSString *bundleShortVersion = [bundle objectForInfoDictionaryKey:@"CFBundleShortVersionString"]; - NSMutableDictionary * result = [NSMutableDictionary new]; - - NSArray * atts = @[ - attribute(@"cognito:iOSVersion", device.systemVersion), - attribute(@"cognito:systemName", device.systemName), - attribute(@"cognito:deviceName", device.name), - attribute(@"cognito:model", device.model), - attribute(@"cognito:idForVendor", device.identifierForVendor.UUIDString), - attribute(@"cognito:bundleId", bundle.bundleIdentifier), - attribute(@"cognito:bundleVersion", bundleVersion), - attribute(@"cognito:bundleShortV", bundleShortVersion) - ]; - for (AWSCognitoIdentityUserAttributeType *att in atts) { - if(att.value != nil) { - [result setObject:att.value forKey: att.name]; - } - } - return result; -} - -- (NSDictionary*) getValidationData:(NSArray*)devProvidedValidationData { - NSMutableDictionary *result = [NSMutableDictionary new]; - if (self.userPoolConfiguration.shouldProvideCognitoValidationData) { - [result addEntriesFromDictionary:[self cognitoValidationData]]; - } - if (devProvidedValidationData != nil) { - for (AWSCognitoIdentityUserAttributeType * att in devProvidedValidationData) { - [result setObject:att.value forKey: att.name]; - } - } - return result; -} - -- (NSArray*) getValidationDataAsArray:(NSArray*)devProvidedValidationData { - NSDictionary * dictionary = [self getValidationData:devProvidedValidationData]; - NSMutableArray * result = [NSMutableArray new]; - [dictionary enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL* stop) { - [result addObject:attribute(key,value)]; - }]; - return result; -} - -- (NSString*) strippedPoolId { - return [self.userPoolConfiguration.poolId substringFromIndex:[self.userPoolConfiguration.poolId rangeOfString:@"_" ].location+1]; -} - -@end - -@implementation AWSCognitoIdentityUserPoolConfiguration - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId { - return [self initWithClientId:clientId clientSecret:clientSecret poolId:poolId shouldProvideCognitoValidationData:YES]; -} - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId -shouldProvideCognitoValidationData:(BOOL)shouldProvideCognitoValidationData { - return [self initWithClientId:clientId clientSecret:clientSecret poolId:poolId shouldProvideCognitoValidationData:shouldProvideCognitoValidationData pinpointAppId:nil]; -} - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId -shouldProvideCognitoValidationData:(BOOL)shouldProvideCognitoValidationData - pinpointAppId:(nullable NSString *)pinpointAppId -{ - return [self initWithClientId:clientId clientSecret:clientSecret poolId:poolId shouldProvideCognitoValidationData:shouldProvideCognitoValidationData pinpointAppId:pinpointAppId migrationEnabled:NO]; -} - -- (instancetype)initWithClientId:(NSString *)clientId - clientSecret:(nullable NSString *)clientSecret - poolId:(NSString *)poolId -shouldProvideCognitoValidationData:(BOOL)shouldProvideCognitoValidationData - pinpointAppId:(nullable NSString *)pinpointAppId - migrationEnabled:(BOOL)migrationEnabled -{ - if (self = [super init]) { - _clientId = clientId; - _clientSecret = clientSecret; - _poolId = poolId; - _shouldProvideCognitoValidationData = shouldProvideCognitoValidationData; - _pinpointAppId = pinpointAppId; - _migrationEnabled = migrationEnabled; - } - - return self; -} - -- (id)copyWithZone:(NSZone *)zone { - AWSCognitoIdentityUserPoolConfiguration *configuration = [[[self class] allocWithZone:zone] initWithClientId:self.clientId - clientSecret:self.clientSecret - poolId:self.poolId - shouldProvideCognitoValidationData:self.shouldProvideCognitoValidationData - pinpointAppId:self.pinpointAppId - migrationEnabled:self.migrationEnabled]; - return configuration; -} - -@end - -@implementation AWSCognitoIdentityPasswordAuthenticationInput --(instancetype) initWithLastKnownUsername: (NSString *) lastKnownUsername { - self = [super init]; - if(nil != self){ - _lastKnownUsername = lastKnownUsername; - } - return self; -} -@end - -@implementation AWSCognitoIdentityMultifactorAuthenticationInput --(instancetype) initWithDeliveryMedium: (NSString*) deliveryMedium destination:(NSString *) destination { - self = [super init]; - if(nil != self){ - if ([deliveryMedium isEqualToString:@"SMS"]) { - _deliveryMedium = AWSCognitoIdentityProviderDeliveryMediumTypeSms; - }else if ([deliveryMedium isEqualToString:@"EMAIL"]) { - _deliveryMedium = AWSCognitoIdentityProviderDeliveryMediumTypeEmail; - }else { - _deliveryMedium = AWSCognitoIdentityProviderDeliveryMediumTypeUnknown; - } - _destination = destination; - } - return self; -} -@end - -@implementation AWSCognitoIdentityPasswordAuthenticationDetails --(instancetype) initWithUsername: (NSString *) username - password: (NSString *) password { - self = [super init]; - if(nil != self){ - _username = username; - _password = password; - } - return self; -} -@end - - -@implementation AWSCognitoIdentityCustomAuthenticationInput --(instancetype) initWithChallengeParameters: (NSDictionary *) challengeParameters { - self = [super init]; - if(nil != self){ - _challengeParameters = challengeParameters; - } - return self; -} -@end - - -@implementation AWSCognitoIdentityCustomChallengeDetails --(instancetype) initWithChallengeResponses:(NSDictionary *)challengeResponses { - self = [super init]; - if(nil != self){ - _challengeResponses = challengeResponses; - } - return self; -} -@end - - -@implementation AWSCognitoIdentityNewPasswordRequiredInput --(instancetype) initWithUserAttributes: (NSDictionary *) userAttributes requiredAttributes: (NSSet*) requiredAttributes { - self = [super init]; - if(nil != self){ - _userAttributes = userAttributes; - _requiredAttributes = requiredAttributes; - } - return self; -} -@end - -@implementation AWSCognitoIdentityNewPasswordRequiredDetails --(instancetype) initWithProposedPassword: (NSString *) proposedPassword userAttributes:(NSDictionary *) userAttributes { - NSMutableArray *userAttributesArray = [NSMutableArray new]; - if(userAttributes){ - [userAttributes enumerateKeysAndObjectsUsingBlock:^(id key, id value, BOOL* stop) { - AWSCognitoIdentityUserAttributeType * att = [[AWSCognitoIdentityUserAttributeType alloc] initWithName: key value: value]; - [userAttributesArray addObject:att]; - }]; - } - return [self initWithProposedPassword:proposedPassword userAttributesArray:userAttributesArray]; -} - --(instancetype) initWithProposedPassword: (NSString *) proposedPassword userAttributesArray:(NSArray *) userAttributesArray { - self = [super init]; - if(nil != self){ - _userAttributes = userAttributesArray; - _proposedPassword = proposedPassword; - } - return self; -} - -@end - -@implementation AWSCognitoIdentityUserPoolSignUpResponse - -@end - - -@implementation AWSCognitoIdentitySoftwareMfaSetupRequiredInput --(instancetype) initWithSecretCode:(NSString *)secretCode username:(NSString *) username{ - self = [super init]; - if(nil != self){ - _secretCode = secretCode; - _username = username; - } - return self; -} -@end - - -@implementation AWSCognitoIdentitySoftwareMfaSetupRequiredDetails --(instancetype) initWithUserCode:(NSString *)userCode friendlyDeviceName:(NSString *)friendlyDeviceName { - self = [super init]; - if(nil != self){ - _userCode = userCode; - _friendlyDeviceName = friendlyDeviceName; - } - return self; -} - -@end - - -@implementation AWSCognitoIdentitySelectMfaInput --(instancetype) initWithAvailableMfas:(NSDictionary *)availableMfas { - self = [super init]; - if(nil != self){ - _availableMfas = availableMfas; - } - return self; -} -@end - -@implementation AWSCognitoIdentitySelectMfaDetails --(instancetype) initWithSelectedMfa:(NSString *)selectedMfa { - self = [super init]; - if(nil != self){ - _selectedMfa = selectedMfa; - } - return self; -} - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderModel.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderModel.h deleted file mode 100644 index e7e4638..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderModel.h +++ /dev/null @@ -1,6085 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -FOUNDATION_EXPORT NSString *const AWSCognitoIdentityProviderErrorDomain; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderErrorType) { - AWSCognitoIdentityProviderErrorUnknown, - AWSCognitoIdentityProviderErrorAliasExists, - AWSCognitoIdentityProviderErrorCodeDeliveryFailure, - AWSCognitoIdentityProviderErrorCodeMismatch, - AWSCognitoIdentityProviderErrorConcurrentModification, - AWSCognitoIdentityProviderErrorDuplicateProvider, - AWSCognitoIdentityProviderErrorEnableSoftwareTokenMFA, - AWSCognitoIdentityProviderErrorExpiredCode, - AWSCognitoIdentityProviderErrorGroupExists, - AWSCognitoIdentityProviderErrorInternalError, - AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy, - AWSCognitoIdentityProviderErrorInvalidLambdaResponse, - AWSCognitoIdentityProviderErrorInvalidOAuthFlow, - AWSCognitoIdentityProviderErrorInvalidParameter, - AWSCognitoIdentityProviderErrorInvalidPassword, - AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy, - AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship, - AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration, - AWSCognitoIdentityProviderErrorLimitExceeded, - AWSCognitoIdentityProviderErrorMFAMethodNotFound, - AWSCognitoIdentityProviderErrorNotAuthorized, - AWSCognitoIdentityProviderErrorPasswordResetRequired, - AWSCognitoIdentityProviderErrorPreconditionNotMet, - AWSCognitoIdentityProviderErrorResourceNotFound, - AWSCognitoIdentityProviderErrorScopeDoesNotExist, - AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound, - AWSCognitoIdentityProviderErrorTooManyFailedAttempts, - AWSCognitoIdentityProviderErrorTooManyRequests, - AWSCognitoIdentityProviderErrorUnexpectedLambda, - AWSCognitoIdentityProviderErrorUnsupportedIdentityProvider, - AWSCognitoIdentityProviderErrorUnsupportedUserState, - AWSCognitoIdentityProviderErrorUserImportInProgress, - AWSCognitoIdentityProviderErrorUserLambdaValidation, - AWSCognitoIdentityProviderErrorUserNotConfirmed, - AWSCognitoIdentityProviderErrorUserNotFound, - AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled, - AWSCognitoIdentityProviderErrorUserPoolTagging, - AWSCognitoIdentityProviderErrorUsernameExists, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderAccountTakeoverEventActionType) { - AWSCognitoIdentityProviderAccountTakeoverEventActionTypeUnknown, - AWSCognitoIdentityProviderAccountTakeoverEventActionTypeBlock, - AWSCognitoIdentityProviderAccountTakeoverEventActionTypeMfaIfConfigured, - AWSCognitoIdentityProviderAccountTakeoverEventActionTypeMfaRequired, - AWSCognitoIdentityProviderAccountTakeoverEventActionTypeNoAction, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderAdvancedSecurityModeType) { - AWSCognitoIdentityProviderAdvancedSecurityModeTypeUnknown, - AWSCognitoIdentityProviderAdvancedSecurityModeTypeOff, - AWSCognitoIdentityProviderAdvancedSecurityModeTypeAudit, - AWSCognitoIdentityProviderAdvancedSecurityModeTypeEnforced, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderAliasAttributeType) { - AWSCognitoIdentityProviderAliasAttributeTypeUnknown, - AWSCognitoIdentityProviderAliasAttributeTypePhoneNumber, - AWSCognitoIdentityProviderAliasAttributeTypeEmail, - AWSCognitoIdentityProviderAliasAttributeTypePreferredUsername, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderAttributeDataType) { - AWSCognitoIdentityProviderAttributeDataTypeUnknown, - AWSCognitoIdentityProviderAttributeDataTypeString, - AWSCognitoIdentityProviderAttributeDataTypeNumber, - AWSCognitoIdentityProviderAttributeDataTypeDateTime, - AWSCognitoIdentityProviderAttributeDataTypeBoolean, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderAuthFlowType) { - AWSCognitoIdentityProviderAuthFlowTypeUnknown, - AWSCognitoIdentityProviderAuthFlowTypeUserSrpAuth, - AWSCognitoIdentityProviderAuthFlowTypeRefreshTokenAuth, - AWSCognitoIdentityProviderAuthFlowTypeRefreshToken, - AWSCognitoIdentityProviderAuthFlowTypeCustomAuth, - AWSCognitoIdentityProviderAuthFlowTypeAdminNoSrpAuth, - AWSCognitoIdentityProviderAuthFlowTypeUserPasswordAuth, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderChallengeName) { - AWSCognitoIdentityProviderChallengeNameUnknown, - AWSCognitoIdentityProviderChallengeNamePassword, - AWSCognitoIdentityProviderChallengeNameMfa, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderChallengeNameType) { - AWSCognitoIdentityProviderChallengeNameTypeUnknown, - AWSCognitoIdentityProviderChallengeNameTypeSmsMfa, - AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa, - AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType, - AWSCognitoIdentityProviderChallengeNameTypeMfaSetup, - AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier, - AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge, - AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth, - AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier, - AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth, - AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderChallengeResponse) { - AWSCognitoIdentityProviderChallengeResponseUnknown, - AWSCognitoIdentityProviderChallengeResponseSuccess, - AWSCognitoIdentityProviderChallengeResponseFailure, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderCompromisedCredentialsEventActionType) { - AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeUnknown, - AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeBlock, - AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeNoAction, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderDefaultEmailOptionType) { - AWSCognitoIdentityProviderDefaultEmailOptionTypeUnknown, - AWSCognitoIdentityProviderDefaultEmailOptionTypeConfirmWithLink, - AWSCognitoIdentityProviderDefaultEmailOptionTypeConfirmWithCode, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderDeliveryMediumType) { - AWSCognitoIdentityProviderDeliveryMediumTypeUnknown, - AWSCognitoIdentityProviderDeliveryMediumTypeSms, - AWSCognitoIdentityProviderDeliveryMediumTypeEmail, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderDeviceRememberedStatusType) { - AWSCognitoIdentityProviderDeviceRememberedStatusTypeUnknown, - AWSCognitoIdentityProviderDeviceRememberedStatusTypeRemembered, - AWSCognitoIdentityProviderDeviceRememberedStatusTypeNotRemembered, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderDomainStatusType) { - AWSCognitoIdentityProviderDomainStatusTypeUnknown, - AWSCognitoIdentityProviderDomainStatusTypeCreating, - AWSCognitoIdentityProviderDomainStatusTypeDeleting, - AWSCognitoIdentityProviderDomainStatusTypeUpdating, - AWSCognitoIdentityProviderDomainStatusTypeActive, - AWSCognitoIdentityProviderDomainStatusTypeFailed, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderEventFilterType) { - AWSCognitoIdentityProviderEventFilterTypeUnknown, - AWSCognitoIdentityProviderEventFilterTypeSignIn, - AWSCognitoIdentityProviderEventFilterTypePasswordChange, - AWSCognitoIdentityProviderEventFilterTypeSignUp, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderEventResponseType) { - AWSCognitoIdentityProviderEventResponseTypeUnknown, - AWSCognitoIdentityProviderEventResponseTypeSuccess, - AWSCognitoIdentityProviderEventResponseTypeFailure, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderEventType) { - AWSCognitoIdentityProviderEventTypeUnknown, - AWSCognitoIdentityProviderEventTypeSignIn, - AWSCognitoIdentityProviderEventTypeSignUp, - AWSCognitoIdentityProviderEventTypeForgotPassword, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderExplicitAuthFlowsType) { - AWSCognitoIdentityProviderExplicitAuthFlowsTypeUnknown, - AWSCognitoIdentityProviderExplicitAuthFlowsTypeAdminNoSrpAuth, - AWSCognitoIdentityProviderExplicitAuthFlowsTypeCustomAuthFlowOnly, - AWSCognitoIdentityProviderExplicitAuthFlowsTypeUserPasswordAuth, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderFeedbackValueType) { - AWSCognitoIdentityProviderFeedbackValueTypeUnknown, - AWSCognitoIdentityProviderFeedbackValueTypeValid, - AWSCognitoIdentityProviderFeedbackValueTypeInvalid, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderIdentityProviderTypeType) { - AWSCognitoIdentityProviderIdentityProviderTypeTypeUnknown, - AWSCognitoIdentityProviderIdentityProviderTypeTypeSaml, - AWSCognitoIdentityProviderIdentityProviderTypeTypeFacebook, - AWSCognitoIdentityProviderIdentityProviderTypeTypeGoogle, - AWSCognitoIdentityProviderIdentityProviderTypeTypeLoginWithAmazon, - AWSCognitoIdentityProviderIdentityProviderTypeTypeOidc, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderMessageActionType) { - AWSCognitoIdentityProviderMessageActionTypeUnknown, - AWSCognitoIdentityProviderMessageActionTypeResend, - AWSCognitoIdentityProviderMessageActionTypeSuppress, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderOAuthFlowType) { - AWSCognitoIdentityProviderOAuthFlowTypeUnknown, - AWSCognitoIdentityProviderOAuthFlowTypeCode, - AWSCognitoIdentityProviderOAuthFlowTypeImplicit, - AWSCognitoIdentityProviderOAuthFlowTypeClientCredentials, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderRiskDecisionType) { - AWSCognitoIdentityProviderRiskDecisionTypeUnknown, - AWSCognitoIdentityProviderRiskDecisionTypeNoRisk, - AWSCognitoIdentityProviderRiskDecisionTypeAccountTakeover, - AWSCognitoIdentityProviderRiskDecisionTypeBlock, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderRiskLevelType) { - AWSCognitoIdentityProviderRiskLevelTypeUnknown, - AWSCognitoIdentityProviderRiskLevelTypeLow, - AWSCognitoIdentityProviderRiskLevelTypeMedium, - AWSCognitoIdentityProviderRiskLevelTypeHigh, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderStatusType) { - AWSCognitoIdentityProviderStatusTypeUnknown, - AWSCognitoIdentityProviderStatusTypeEnabled, - AWSCognitoIdentityProviderStatusTypeDisabled, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderUserImportJobStatusType) { - AWSCognitoIdentityProviderUserImportJobStatusTypeUnknown, - AWSCognitoIdentityProviderUserImportJobStatusTypeCreated, - AWSCognitoIdentityProviderUserImportJobStatusTypePending, - AWSCognitoIdentityProviderUserImportJobStatusTypeInProgress, - AWSCognitoIdentityProviderUserImportJobStatusTypeStopping, - AWSCognitoIdentityProviderUserImportJobStatusTypeExpired, - AWSCognitoIdentityProviderUserImportJobStatusTypeStopped, - AWSCognitoIdentityProviderUserImportJobStatusTypeFailed, - AWSCognitoIdentityProviderUserImportJobStatusTypeSucceeded, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderUserPoolMfaType) { - AWSCognitoIdentityProviderUserPoolMfaTypeUnknown, - AWSCognitoIdentityProviderUserPoolMfaTypeOff, - AWSCognitoIdentityProviderUserPoolMfaTypeOn, - AWSCognitoIdentityProviderUserPoolMfaTypeOptional, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderUserStatusType) { - AWSCognitoIdentityProviderUserStatusTypeUnknown, - AWSCognitoIdentityProviderUserStatusTypeUnconfirmed, - AWSCognitoIdentityProviderUserStatusTypeConfirmed, - AWSCognitoIdentityProviderUserStatusTypeArchived, - AWSCognitoIdentityProviderUserStatusTypeCompromised, - AWSCognitoIdentityProviderUserStatusTypeResetRequired, - AWSCognitoIdentityProviderUserStatusTypeForceChangePassword, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderUsernameAttributeType) { - AWSCognitoIdentityProviderUsernameAttributeTypeUnknown, - AWSCognitoIdentityProviderUsernameAttributeTypePhoneNumber, - AWSCognitoIdentityProviderUsernameAttributeTypeEmail, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderVerifiedAttributeType) { - AWSCognitoIdentityProviderVerifiedAttributeTypeUnknown, - AWSCognitoIdentityProviderVerifiedAttributeTypePhoneNumber, - AWSCognitoIdentityProviderVerifiedAttributeTypeEmail, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityProviderVerifySoftwareTokenResponseType) { - AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeUnknown, - AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeSuccess, - AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeError, -}; - -@class AWSCognitoIdentityProviderAccountTakeoverActionType; -@class AWSCognitoIdentityProviderAccountTakeoverActionsType; -@class AWSCognitoIdentityProviderAccountTakeoverRiskConfigurationType; -@class AWSCognitoIdentityProviderAddCustomAttributesRequest; -@class AWSCognitoIdentityProviderAddCustomAttributesResponse; -@class AWSCognitoIdentityProviderAdminAddUserToGroupRequest; -@class AWSCognitoIdentityProviderAdminConfirmSignUpRequest; -@class AWSCognitoIdentityProviderAdminConfirmSignUpResponse; -@class AWSCognitoIdentityProviderAdminCreateUserConfigType; -@class AWSCognitoIdentityProviderAdminCreateUserRequest; -@class AWSCognitoIdentityProviderAdminCreateUserResponse; -@class AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest; -@class AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse; -@class AWSCognitoIdentityProviderAdminDeleteUserRequest; -@class AWSCognitoIdentityProviderAdminDisableProviderForUserRequest; -@class AWSCognitoIdentityProviderAdminDisableProviderForUserResponse; -@class AWSCognitoIdentityProviderAdminDisableUserRequest; -@class AWSCognitoIdentityProviderAdminDisableUserResponse; -@class AWSCognitoIdentityProviderAdminEnableUserRequest; -@class AWSCognitoIdentityProviderAdminEnableUserResponse; -@class AWSCognitoIdentityProviderAdminForgetDeviceRequest; -@class AWSCognitoIdentityProviderAdminGetDeviceRequest; -@class AWSCognitoIdentityProviderAdminGetDeviceResponse; -@class AWSCognitoIdentityProviderAdminGetUserRequest; -@class AWSCognitoIdentityProviderAdminGetUserResponse; -@class AWSCognitoIdentityProviderAdminInitiateAuthRequest; -@class AWSCognitoIdentityProviderAdminInitiateAuthResponse; -@class AWSCognitoIdentityProviderAdminLinkProviderForUserRequest; -@class AWSCognitoIdentityProviderAdminLinkProviderForUserResponse; -@class AWSCognitoIdentityProviderAdminListDevicesRequest; -@class AWSCognitoIdentityProviderAdminListDevicesResponse; -@class AWSCognitoIdentityProviderAdminListGroupsForUserRequest; -@class AWSCognitoIdentityProviderAdminListGroupsForUserResponse; -@class AWSCognitoIdentityProviderAdminListUserAuthEventsRequest; -@class AWSCognitoIdentityProviderAdminListUserAuthEventsResponse; -@class AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest; -@class AWSCognitoIdentityProviderAdminResetUserPasswordRequest; -@class AWSCognitoIdentityProviderAdminResetUserPasswordResponse; -@class AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest; -@class AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse; -@class AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest; -@class AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse; -@class AWSCognitoIdentityProviderAdminSetUserSettingsRequest; -@class AWSCognitoIdentityProviderAdminSetUserSettingsResponse; -@class AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest; -@class AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse; -@class AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest; -@class AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse; -@class AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest; -@class AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse; -@class AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest; -@class AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse; -@class AWSCognitoIdentityProviderAnalyticsConfigurationType; -@class AWSCognitoIdentityProviderAnalyticsMetadataType; -@class AWSCognitoIdentityProviderAssociateSoftwareTokenRequest; -@class AWSCognitoIdentityProviderAssociateSoftwareTokenResponse; -@class AWSCognitoIdentityProviderAttributeType; -@class AWSCognitoIdentityProviderAuthEventType; -@class AWSCognitoIdentityProviderAuthenticationResultType; -@class AWSCognitoIdentityProviderChallengeResponseType; -@class AWSCognitoIdentityProviderChangePasswordRequest; -@class AWSCognitoIdentityProviderChangePasswordResponse; -@class AWSCognitoIdentityProviderCodeDeliveryDetailsType; -@class AWSCognitoIdentityProviderCompromisedCredentialsActionsType; -@class AWSCognitoIdentityProviderCompromisedCredentialsRiskConfigurationType; -@class AWSCognitoIdentityProviderConfirmDeviceRequest; -@class AWSCognitoIdentityProviderConfirmDeviceResponse; -@class AWSCognitoIdentityProviderConfirmForgotPasswordRequest; -@class AWSCognitoIdentityProviderConfirmForgotPasswordResponse; -@class AWSCognitoIdentityProviderConfirmSignUpRequest; -@class AWSCognitoIdentityProviderConfirmSignUpResponse; -@class AWSCognitoIdentityProviderContextDataType; -@class AWSCognitoIdentityProviderCreateGroupRequest; -@class AWSCognitoIdentityProviderCreateGroupResponse; -@class AWSCognitoIdentityProviderCreateIdentityProviderRequest; -@class AWSCognitoIdentityProviderCreateIdentityProviderResponse; -@class AWSCognitoIdentityProviderCreateResourceServerRequest; -@class AWSCognitoIdentityProviderCreateResourceServerResponse; -@class AWSCognitoIdentityProviderCreateUserImportJobRequest; -@class AWSCognitoIdentityProviderCreateUserImportJobResponse; -@class AWSCognitoIdentityProviderCreateUserPoolClientRequest; -@class AWSCognitoIdentityProviderCreateUserPoolClientResponse; -@class AWSCognitoIdentityProviderCreateUserPoolDomainRequest; -@class AWSCognitoIdentityProviderCreateUserPoolDomainResponse; -@class AWSCognitoIdentityProviderCreateUserPoolRequest; -@class AWSCognitoIdentityProviderCreateUserPoolResponse; -@class AWSCognitoIdentityProviderCustomDomainConfigType; -@class AWSCognitoIdentityProviderDeleteGroupRequest; -@class AWSCognitoIdentityProviderDeleteIdentityProviderRequest; -@class AWSCognitoIdentityProviderDeleteResourceServerRequest; -@class AWSCognitoIdentityProviderDeleteUserAttributesRequest; -@class AWSCognitoIdentityProviderDeleteUserAttributesResponse; -@class AWSCognitoIdentityProviderDeleteUserPoolClientRequest; -@class AWSCognitoIdentityProviderDeleteUserPoolDomainRequest; -@class AWSCognitoIdentityProviderDeleteUserPoolDomainResponse; -@class AWSCognitoIdentityProviderDeleteUserPoolRequest; -@class AWSCognitoIdentityProviderDeleteUserRequest; -@class AWSCognitoIdentityProviderDescribeIdentityProviderRequest; -@class AWSCognitoIdentityProviderDescribeIdentityProviderResponse; -@class AWSCognitoIdentityProviderDescribeResourceServerRequest; -@class AWSCognitoIdentityProviderDescribeResourceServerResponse; -@class AWSCognitoIdentityProviderDescribeRiskConfigurationRequest; -@class AWSCognitoIdentityProviderDescribeRiskConfigurationResponse; -@class AWSCognitoIdentityProviderDescribeUserImportJobRequest; -@class AWSCognitoIdentityProviderDescribeUserImportJobResponse; -@class AWSCognitoIdentityProviderDescribeUserPoolClientRequest; -@class AWSCognitoIdentityProviderDescribeUserPoolClientResponse; -@class AWSCognitoIdentityProviderDescribeUserPoolDomainRequest; -@class AWSCognitoIdentityProviderDescribeUserPoolDomainResponse; -@class AWSCognitoIdentityProviderDescribeUserPoolRequest; -@class AWSCognitoIdentityProviderDescribeUserPoolResponse; -@class AWSCognitoIdentityProviderDeviceConfigurationType; -@class AWSCognitoIdentityProviderDeviceSecretVerifierConfigType; -@class AWSCognitoIdentityProviderDeviceType; -@class AWSCognitoIdentityProviderDomainDescriptionType; -@class AWSCognitoIdentityProviderEmailConfigurationType; -@class AWSCognitoIdentityProviderEventContextDataType; -@class AWSCognitoIdentityProviderEventFeedbackType; -@class AWSCognitoIdentityProviderEventRiskType; -@class AWSCognitoIdentityProviderForgetDeviceRequest; -@class AWSCognitoIdentityProviderForgotPasswordRequest; -@class AWSCognitoIdentityProviderForgotPasswordResponse; -@class AWSCognitoIdentityProviderGetCSVHeaderRequest; -@class AWSCognitoIdentityProviderGetCSVHeaderResponse; -@class AWSCognitoIdentityProviderGetDeviceRequest; -@class AWSCognitoIdentityProviderGetDeviceResponse; -@class AWSCognitoIdentityProviderGetGroupRequest; -@class AWSCognitoIdentityProviderGetGroupResponse; -@class AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest; -@class AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse; -@class AWSCognitoIdentityProviderGetSigningCertificateRequest; -@class AWSCognitoIdentityProviderGetSigningCertificateResponse; -@class AWSCognitoIdentityProviderGetUICustomizationRequest; -@class AWSCognitoIdentityProviderGetUICustomizationResponse; -@class AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest; -@class AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse; -@class AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest; -@class AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse; -@class AWSCognitoIdentityProviderGetUserRequest; -@class AWSCognitoIdentityProviderGetUserResponse; -@class AWSCognitoIdentityProviderGlobalSignOutRequest; -@class AWSCognitoIdentityProviderGlobalSignOutResponse; -@class AWSCognitoIdentityProviderGroupType; -@class AWSCognitoIdentityProviderHttpHeader; -@class AWSCognitoIdentityProviderIdentityProviderType; -@class AWSCognitoIdentityProviderInitiateAuthRequest; -@class AWSCognitoIdentityProviderInitiateAuthResponse; -@class AWSCognitoIdentityProviderLambdaConfigType; -@class AWSCognitoIdentityProviderListDevicesRequest; -@class AWSCognitoIdentityProviderListDevicesResponse; -@class AWSCognitoIdentityProviderListGroupsRequest; -@class AWSCognitoIdentityProviderListGroupsResponse; -@class AWSCognitoIdentityProviderListIdentityProvidersRequest; -@class AWSCognitoIdentityProviderListIdentityProvidersResponse; -@class AWSCognitoIdentityProviderListResourceServersRequest; -@class AWSCognitoIdentityProviderListResourceServersResponse; -@class AWSCognitoIdentityProviderListUserImportJobsRequest; -@class AWSCognitoIdentityProviderListUserImportJobsResponse; -@class AWSCognitoIdentityProviderListUserPoolClientsRequest; -@class AWSCognitoIdentityProviderListUserPoolClientsResponse; -@class AWSCognitoIdentityProviderListUserPoolsRequest; -@class AWSCognitoIdentityProviderListUserPoolsResponse; -@class AWSCognitoIdentityProviderListUsersInGroupRequest; -@class AWSCognitoIdentityProviderListUsersInGroupResponse; -@class AWSCognitoIdentityProviderListUsersRequest; -@class AWSCognitoIdentityProviderListUsersResponse; -@class AWSCognitoIdentityProviderMFAOptionType; -@class AWSCognitoIdentityProviderMessageTemplateType; -@class AWSCognitoIdentityProviderLatestDeviceMetadataType; -@class AWSCognitoIdentityProviderNotifyConfigurationType; -@class AWSCognitoIdentityProviderNotifyEmailType; -@class AWSCognitoIdentityProviderNumberAttributeConstraintsType; -@class AWSCognitoIdentityProviderPasswordPolicyType; -@class AWSCognitoIdentityProviderProviderDescription; -@class AWSCognitoIdentityProviderProviderUserIdentifierType; -@class AWSCognitoIdentityProviderResendConfirmationCodeRequest; -@class AWSCognitoIdentityProviderResendConfirmationCodeResponse; -@class AWSCognitoIdentityProviderResourceServerScopeType; -@class AWSCognitoIdentityProviderResourceServerType; -@class AWSCognitoIdentityProviderRespondToAuthChallengeRequest; -@class AWSCognitoIdentityProviderRespondToAuthChallengeResponse; -@class AWSCognitoIdentityProviderRiskConfigurationType; -@class AWSCognitoIdentityProviderRiskExceptionConfigurationType; -@class AWSCognitoIdentityProviderSMSMfaSettingsType; -@class AWSCognitoIdentityProviderSchemaAttributeType; -@class AWSCognitoIdentityProviderSetRiskConfigurationRequest; -@class AWSCognitoIdentityProviderSetRiskConfigurationResponse; -@class AWSCognitoIdentityProviderSetUICustomizationRequest; -@class AWSCognitoIdentityProviderSetUICustomizationResponse; -@class AWSCognitoIdentityProviderSetUserMFAPreferenceRequest; -@class AWSCognitoIdentityProviderSetUserMFAPreferenceResponse; -@class AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest; -@class AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse; -@class AWSCognitoIdentityProviderSetUserSettingsRequest; -@class AWSCognitoIdentityProviderSetUserSettingsResponse; -@class AWSCognitoIdentityProviderSignUpRequest; -@class AWSCognitoIdentityProviderSignUpResponse; -@class AWSCognitoIdentityProviderSmsConfigurationType; -@class AWSCognitoIdentityProviderSmsMfaConfigType; -@class AWSCognitoIdentityProviderSoftwareTokenMfaConfigType; -@class AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType; -@class AWSCognitoIdentityProviderStartUserImportJobRequest; -@class AWSCognitoIdentityProviderStartUserImportJobResponse; -@class AWSCognitoIdentityProviderStopUserImportJobRequest; -@class AWSCognitoIdentityProviderStopUserImportJobResponse; -@class AWSCognitoIdentityProviderStringAttributeConstraintsType; -@class AWSCognitoIdentityProviderUICustomizationType; -@class AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest; -@class AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse; -@class AWSCognitoIdentityProviderUpdateDeviceStatusRequest; -@class AWSCognitoIdentityProviderUpdateDeviceStatusResponse; -@class AWSCognitoIdentityProviderUpdateGroupRequest; -@class AWSCognitoIdentityProviderUpdateGroupResponse; -@class AWSCognitoIdentityProviderUpdateIdentityProviderRequest; -@class AWSCognitoIdentityProviderUpdateIdentityProviderResponse; -@class AWSCognitoIdentityProviderUpdateResourceServerRequest; -@class AWSCognitoIdentityProviderUpdateResourceServerResponse; -@class AWSCognitoIdentityProviderUpdateUserAttributesRequest; -@class AWSCognitoIdentityProviderUpdateUserAttributesResponse; -@class AWSCognitoIdentityProviderUpdateUserPoolClientRequest; -@class AWSCognitoIdentityProviderUpdateUserPoolClientResponse; -@class AWSCognitoIdentityProviderUpdateUserPoolDomainRequest; -@class AWSCognitoIdentityProviderUpdateUserPoolDomainResponse; -@class AWSCognitoIdentityProviderUpdateUserPoolRequest; -@class AWSCognitoIdentityProviderUpdateUserPoolResponse; -@class AWSCognitoIdentityProviderUserContextDataType; -@class AWSCognitoIdentityProviderUserImportJobType; -@class AWSCognitoIdentityProviderUserPoolAddOnsType; -@class AWSCognitoIdentityProviderUserPoolClientDescription; -@class AWSCognitoIdentityProviderUserPoolClientType; -@class AWSCognitoIdentityProviderUserPoolDescriptionType; -@class AWSCognitoIdentityProviderUserPoolPolicyType; -@class AWSCognitoIdentityProviderUserPoolType; -@class AWSCognitoIdentityProviderUserType; -@class AWSCognitoIdentityProviderVerificationMessageTemplateType; -@class AWSCognitoIdentityProviderVerifySoftwareTokenRequest; -@class AWSCognitoIdentityProviderVerifySoftwareTokenResponse; -@class AWSCognitoIdentityProviderVerifyUserAttributeRequest; -@class AWSCognitoIdentityProviderVerifyUserAttributeResponse; - -/** -

Account takeover action type.

- Required parameters: [Notify, EventAction] - */ -@interface AWSCognitoIdentityProviderAccountTakeoverActionType : AWSModel - - -/** -

The event action.

  • BLOCK Choosing this action will block the request.

  • MFA_IF_CONFIGURED Throw MFA challenge if user has configured it, else allow the request.

  • MFA_REQUIRED Throw MFA challenge if user has configured it, else block the request.

  • NO_ACTION Allow the user sign-in.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderAccountTakeoverEventActionType eventAction; - -/** -

Flag specifying whether to send a notification.

- */ -@property (nonatomic, strong) NSNumber * _Nullable notify; - -@end - -/** -

Account takeover actions type.

- */ -@interface AWSCognitoIdentityProviderAccountTakeoverActionsType : AWSModel - - -/** -

Action to take for a high risk.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAccountTakeoverActionType * _Nullable highAction; - -/** -

Action to take for a low risk.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAccountTakeoverActionType * _Nullable lowAction; - -/** -

Action to take for a medium risk.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAccountTakeoverActionType * _Nullable mediumAction; - -@end - -/** -

Configuration for mitigation actions and notification for different levels of risk detected for a potential account takeover.

- Required parameters: [Actions] - */ -@interface AWSCognitoIdentityProviderAccountTakeoverRiskConfigurationType : AWSModel - - -/** -

Account takeover risk configuration actions

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAccountTakeoverActionsType * _Nullable actions; - -/** -

The notify configuration used to construct email notifications.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderNotifyConfigurationType * _Nullable notifyConfiguration; - -@end - -/** -

Represents the request to add custom attributes.

- Required parameters: [UserPoolId, CustomAttributes] - */ -@interface AWSCognitoIdentityProviderAddCustomAttributesRequest : AWSRequest - - -/** -

An array of custom attributes, such as Mutable and Name.

- */ -@property (nonatomic, strong) NSArray * _Nullable customAttributes; - -/** -

The user pool ID for the user pool where you want to add custom attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server for the request to add custom attributes.

- */ -@interface AWSCognitoIdentityProviderAddCustomAttributesResponse : AWSModel - - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminAddUserToGroupRequest : AWSRequest - - -/** -

The group name.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The username for the user.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the request to confirm user registration.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminConfirmSignUpRequest : AWSRequest - - -/** -

The user pool ID for which you want to confirm user registration.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name for which you want to confirm user registration.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response from the server for the request to confirm registration.

- */ -@interface AWSCognitoIdentityProviderAdminConfirmSignUpResponse : AWSModel - - -@end - -/** -

The configuration for creating a new user profile.

- */ -@interface AWSCognitoIdentityProviderAdminCreateUserConfigType : AWSModel - - -/** -

Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

- */ -@property (nonatomic, strong) NSNumber * _Nullable allowAdminCreateUserOnly; - -/** -

The message template to be used for the welcome message to new users.

See also Customizing User Invitation Messages.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderMessageTemplateType * _Nullable inviteMessageTemplate; - -/** -

The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter. The default value for this parameter is 7.

- */ -@property (nonatomic, strong) NSNumber * _Nullable unusedAccountValidityDays; - -@end - -/** -

Represents the request to create a user in the specified user pool.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminCreateUserRequest : AWSRequest - - -/** -

Specify "EMAIL" if email will be used to send the welcome message. Specify "SMS" if the phone number will be used. The default value is "SMS". More than one value can be specified.

- */ -@property (nonatomic, strong) NSArray * _Nullable desiredDeliveryMediums; - -/** -

This parameter is only used if the phone_number_verified or email_verified attribute is set to True. Otherwise, it is ignored.

If this parameter is set to True and the phone number or email address specified in the UserAttributes parameter already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias.

If this parameter is set to False, the API throws an AliasExistsException error if the alias already exists. The default value is False.

- */ -@property (nonatomic, strong) NSNumber * _Nullable forceAliasCreation; - -/** -

Set to "RESEND" to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to "SUPPRESS" to suppress sending the message. Only one value can be specified.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderMessageActionType messageAction; - -/** -

The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.

The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page along with a new password to be used in all future sign-ins.

This parameter is not required. If you do not specify a value, Amazon Cognito generates one for you.

The temporary password can only be used until the user account expiration limit that you specified when you created the user pool. To reset the account after that time limit, you must call AdminCreateUser again, specifying "RESEND" for the MessageAction parameter.

- */ -@property (nonatomic, strong) NSString * _Nullable temporaryPassword; - -/** -

An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than Username. However, any attributes that you specify as required (in or in the Attributes tab of the console) must be supplied either by you (in your call to AdminCreateUser) or by the user (when he or she signs up in response to your welcome message).

For custom attributes, you must prepend the custom: prefix to the attribute name.

To send a message inviting the user to sign up, you must specify the user's email address or phone number. This can be done in your call to AdminCreateUser or in the Users tab of the Amazon Cognito console for managing your user pools.

In your call to AdminCreateUser, you can set the email_verified attribute to True, and you can set the phone_number_verified attribute to True. (You can also do this by calling .)

  • email: The email address of the user to whom the message that contains the code and username will be sent. Required if the email_verified attribute is set to True, or if "EMAIL" is specified in the DesiredDeliveryMediums parameter.

  • phone_number: The phone number of the user to whom the message that contains the code and username will be sent. Required if the phone_number_verified attribute is set to True, or if "SMS" is specified in the DesiredDeliveryMediums parameter.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributes; - -/** -

The user pool ID for the user pool where the user will be created.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -/** -

The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. For example, you might choose to allow or disallow user sign-up based on the user's domain.

To configure custom validation, you must create a Pre Sign-up Lambda trigger for the user pool as described in the Amazon Cognito Developer Guide. The Lambda trigger receives the validation data and uses it in the validation process.

The user's validation data is not persisted.

- */ -@property (nonatomic, strong) NSArray * _Nullable validationData; - -@end - -/** -

Represents the response from the server to the request to create the user.

- */ -@interface AWSCognitoIdentityProviderAdminCreateUserResponse : AWSModel - - -/** -

The newly created user.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserType * _Nullable user; - -@end - -/** -

Represents the request to delete user attributes as an administrator.

- Required parameters: [UserPoolId, Username, UserAttributeNames] - */ -@interface AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest : AWSRequest - - -/** -

An array of strings representing the user attribute names you wish to delete.

For custom attributes, you must prepend the custom: prefix to the attribute name.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributeNames; - -/** -

The user pool ID for the user pool where you want to delete user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user from which you would like to delete attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response received from the server for a request to delete user attributes.

- */ -@interface AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse : AWSModel - - -@end - -/** -

Represents the request to delete a user as an administrator.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminDeleteUserRequest : AWSRequest - - -/** -

The user pool ID for the user pool where you want to delete the user.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user you wish to delete.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminDisableProviderForUserRequest : AWSRequest - - -/** -

The user to be disabled.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderProviderUserIdentifierType * _Nullable user; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminDisableProviderForUserResponse : AWSModel - - -@end - -/** -

Represents the request to disable any user as an administrator.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminDisableUserRequest : AWSRequest - - -/** -

The user pool ID for the user pool where you want to disable the user.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user you wish to disable.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response received from the server to disable the user as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminDisableUserResponse : AWSModel - - -@end - -/** -

Represents the request that enables the user as an administrator.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminEnableUserRequest : AWSRequest - - -/** -

The user pool ID for the user pool where you want to enable the user.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user you wish to enable.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response from the server for the request to enable a user as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminEnableUserResponse : AWSModel - - -@end - -/** -

Sends the forgot device request, as an administrator.

- Required parameters: [UserPoolId, Username, DeviceKey] - */ -@interface AWSCognitoIdentityProviderAdminForgetDeviceRequest : AWSRequest - - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the request to get the device, as an administrator.

- Required parameters: [DeviceKey, UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminGetDeviceRequest : AWSRequest - - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Gets the device response, as an administrator.

- Required parameters: [Device] - */ -@interface AWSCognitoIdentityProviderAdminGetDeviceResponse : AWSModel - - -/** -

The device.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderDeviceType * _Nullable device; - -@end - -/** -

Represents the request to get the specified user as an administrator.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminGetUserRequest : AWSRequest - - -/** -

The user pool ID for the user pool where you want to get information about the user.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user you wish to retrieve.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response from the server from the request to get the specified user as an administrator.

- Required parameters: [Username] - */ -@interface AWSCognitoIdentityProviderAdminGetUserResponse : AWSModel - - -/** -

Indicates that the status is enabled.

- */ -@property (nonatomic, strong) NSNumber * _Nullable enabled; - -/** -

Specifies the options for MFA (e.g., email or phone number).

- */ -@property (nonatomic, strong) NSArray * _Nullable MFAOptions; - -/** -

The user's preferred MFA setting.

- */ -@property (nonatomic, strong) NSString * _Nullable preferredMfaSetting; - -/** -

An array of name-value pairs representing user attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributes; - -/** -

The date the user was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable userCreateDate; - -/** -

The date the user was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable userLastModifiedDate; - -/** -

The list of the user's MFA settings.

- */ -@property (nonatomic, strong) NSArray * _Nullable userMFASettingList; - -/** -

The user status. Can be one of the following:

  • UNCONFIRMED - User has been created but not confirmed.

  • CONFIRMED - User has been confirmed.

  • ARCHIVED - User is no longer active.

  • COMPROMISED - User is disabled due to a potential security threat.

  • UNKNOWN - User status is not known.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserStatusType userStatus; - -/** -

The user name of the user about whom you are receiving information.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Initiates the authorization request, as an administrator.

- Required parameters: [UserPoolId, ClientId, AuthFlow] - */ -@interface AWSCognitoIdentityProviderAdminInitiateAuthRequest : AWSRequest - - -/** -

The analytics metadata for collecting Amazon Pinpoint metrics for AdminInitiateAuth calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The authentication flow for this call to execute. The API action will depend on this value. For example:

  • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

  • USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.

  • USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

Valid values include:

  • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

  • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

  • CUSTOM_AUTH: Custom authentication flow.

  • ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the USERNAME and PASSWORD directly if the flow is enabled for calling the app client.

  • USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderAuthFlowType authFlow; - -/** -

The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:

  • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), PASSWORD (required), DEVICE_KEY

  • For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY

- */ -@property (nonatomic, strong) NSDictionary * _Nullable authParameters; - -/** -

The app client ID.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

This is a random key-value pair map which can contain any key and will be passed to your PreAuthentication Lambda trigger as-is. It can be used to implement additional validations around authentication.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable clientMetadata; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderContextDataType * _Nullable contextData; - -/** -

The ID of the Amazon Cognito user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Initiates the authentication response, as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminInitiateAuthResponse : AWSModel - - -/** -

The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAuthenticationResultType * _Nullable authenticationResult; - -/** -

The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge.

  • MFA_SETUP: If MFA is required, users who do not have at least one of the MFA methods set up are presented with an MFA_SETUP challenge. The user must set up at least one MFA type to continue to authenticate.

  • SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are SMS_MFA for text SMS MFA, and SOFTWARE_TOKEN_MFA for TOTP software token MFA.

  • SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.

  • PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.

  • CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.

  • DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.

  • DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.

  • ADMIN_NO_SRP_AUTH: This is returned if you need to authenticate with USERNAME and PASSWORD directly. An app client must be enabled to use this flow.

  • NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeNameType challengeName; - -/** -

The challenge parameters. These are returned to you in the AdminInitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (AdminRespondToAuthChallenge).

All challenges require USERNAME and SECRET_HASH (if applicable).

The value of the USER_ID_FOR_SRP attribute will be the user's actual username, not an alias (such as email address or phone number), even if you specified an alias in your call to AdminInitiateAuth. This is because, in the AdminRespondToAuthChallenge API ChallengeResponses, the USERNAME attribute cannot be an alias.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable challengeParameters; - -/** -

The session which should be passed both ways in challenge-response calls to the service. If AdminInitiateAuth or AdminRespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next AdminRespondToAuthChallenge API call.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminLinkProviderForUserRequest : AWSRequest - - -/** -

The existing user in the user pool to be linked to the external identity provider user account. Can be a native (Username + Password) Cognito User Pools user or a federated user (for example, a SAML or Facebook user). If the user doesn't exist, an exception is thrown. This is the user that is returned when the new user (with the linked identity provider attribute) signs in.

For a native username + password user, the ProviderAttributeValue for the DestinationUser should be the username in the user pool. For a federated user, it should be the provider-specific user_id.

The ProviderAttributeName of the DestinationUser is ignored.

The ProviderName should be set to Cognito for users in Cognito user pools.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderProviderUserIdentifierType * _Nullable destinationUser; - -/** -

An external identity provider account for a user who does not currently exist yet in the user pool. This user must be a federated user (for example, a SAML or Facebook user), not another native user.

If the SourceUser is a federated social identity provider user (Facebook, Google, or Login with Amazon), you must set the ProviderAttributeName to Cognito_Subject. For social identity providers, the ProviderName will be Facebook, Google, or LoginWithAmazon, and Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, respectively. The ProviderAttributeValue for the user must be the same value as the id, sub, or user_id value found in the social identity provider token.

For SAML, the ProviderAttributeName can be any value that matches a claim in the SAML assertion. If you wish to link SAML users based on the subject of the SAML assertion, you should map the subject to a claim through the SAML identity provider and submit that claim name as the ProviderAttributeName. If you set ProviderAttributeName to Cognito_Subject, Cognito will automatically parse the default unique identifier found in the subject from the SAML token.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderProviderUserIdentifierType * _Nullable sourceUser; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminLinkProviderForUserResponse : AWSModel - - -@end - -/** -

Represents the request to list devices, as an administrator.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminListDevicesRequest : AWSRequest - - -/** -

The limit of the devices request.

- */ -@property (nonatomic, strong) NSNumber * _Nullable limit; - -/** -

The pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Lists the device's response, as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminListDevicesResponse : AWSModel - - -/** -

The devices in the list of devices response.

- */ -@property (nonatomic, strong) NSArray * _Nullable devices; - -/** -

The pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminListGroupsForUserRequest : AWSRequest - - -/** -

The limit of the request to list groups.

- */ -@property (nonatomic, strong) NSNumber * _Nullable limit; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The username for the user.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminListGroupsForUserResponse : AWSModel - - -/** -

The groups that the user belongs to.

- */ -@property (nonatomic, strong) NSArray * _Nullable groups; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminListUserAuthEventsRequest : AWSRequest - - -/** -

The maximum number of authentication events to return.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user pool username or an alias.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminListUserAuthEventsResponse : AWSModel - - -/** -

The response object. It includes the EventID, EventType, CreationDate, EventRisk, and EventResponse.

- */ -@property (nonatomic, strong) NSArray * _Nullable authEvents; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest : AWSRequest - - -/** -

The group name.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The username for the user.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the request to reset a user's password as an administrator.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminResetUserPasswordRequest : AWSRequest - - -/** -

The user pool ID for the user pool where you want to reset the user's password.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user whose password you wish to reset.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response from the server to reset a user password as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminResetUserPasswordResponse : AWSModel - - -@end - -/** -

The request to respond to the authentication challenge, as an administrator.

- Required parameters: [UserPoolId, ClientId, ChallengeName] - */ -@interface AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest : AWSRequest - - -/** -

The analytics metadata for collecting Amazon Pinpoint metrics for AdminRespondToAuthChallenge calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The challenge name. For more information, see .

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeNameType challengeName; - -/** -

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

  • SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • ADMIN_NO_SRP_AUTH: PASSWORD, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME, SECRET_HASH (if app client is configured with client secret).

The value of the USERNAME attribute must be the user's actual username, not an alias (such as email address or phone number). To make this easier, the AdminInitiateAuth response includes the actual username value in the USERNAMEUSER_ID_FOR_SRP attribute, even if you specified an alias in your call to AdminInitiateAuth.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable challengeResponses; - -/** -

The app client ID.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderContextDataType * _Nullable contextData; - -/** -

The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -/** -

The ID of the Amazon Cognito user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Responds to the authentication challenge, as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse : AWSModel - - -/** -

The result returned by the server in response to the authentication request.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAuthenticationResultType * _Nullable authenticationResult; - -/** -

The name of the challenge. For more information, see .

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeNameType challengeName; - -/** -

The challenge parameters. For more information, see .

- */ -@property (nonatomic, strong) NSDictionary * _Nullable challengeParameters; - -/** -

The session which should be passed both ways in challenge-response calls to the service. If the or API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest : AWSRequest - - -/** -

The SMS text message MFA settings.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSMSMfaSettingsType * _Nullable SMSMfaSettings; - -/** -

The time-based one-time password software token MFA settings.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType * _Nullable softwareTokenMfaSettings; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user pool username or alias.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse : AWSModel - - -@end - -/** -

Represents the request to set user settings as an administrator.

- Required parameters: [UserPoolId, Username, MFAOptions] - */ -@interface AWSCognitoIdentityProviderAdminSetUserSettingsRequest : AWSRequest - - -/** -

Specifies the options for MFA (e.g., email or phone number).

- */ -@property (nonatomic, strong) NSArray * _Nullable MFAOptions; - -/** -

The user pool ID for the user pool where you want to set the user's settings, such as MFA options.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user for whom you wish to set user settings.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response from the server to set user settings as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminSetUserSettingsResponse : AWSModel - - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest : AWSRequest - - -/** -

The authentication event ID.

- */ -@property (nonatomic, strong) NSString * _Nullable eventId; - -/** -

The authentication event feedback value.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderFeedbackValueType feedbackValue; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user pool username.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse : AWSModel - - -@end - -/** -

The request to update the device status, as an administrator.

- Required parameters: [UserPoolId, Username, DeviceKey] - */ -@interface AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest : AWSRequest - - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -/** -

The status indicating whether a device has been remembered or not.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderDeviceRememberedStatusType deviceRememberedStatus; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

The status response from the request to update the device, as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse : AWSModel - - -@end - -/** -

Represents the request to update the user's attributes as an administrator.

- Required parameters: [UserPoolId, Username, UserAttributes] - */ -@interface AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest : AWSRequest - - -/** -

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributes; - -/** -

The user pool ID for the user pool where you want to update user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name of the user for whom you want to update user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response from the server for the request to update user attributes as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse : AWSModel - - -@end - -/** -

The request to sign out of all devices, as an administrator.

- Required parameters: [UserPoolId, Username] - */ -@interface AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest : AWSRequest - - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user name.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

The global sign-out response, as an administrator.

- */ -@interface AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse : AWSModel - - -@end - -/** -

The Amazon Pinpoint analytics configuration for collecting metrics for a user pool.

- Required parameters: [ApplicationId, RoleArn, ExternalId] - */ -@interface AWSCognitoIdentityProviderAnalyticsConfigurationType : AWSModel - - -/** -

The application ID for an Amazon Pinpoint application.

- */ -@property (nonatomic, strong) NSString * _Nullable applicationId; - -/** -

The external ID.

- */ -@property (nonatomic, strong) NSString * _Nullable externalId; - -/** -

The ARN of an IAM role that authorizes Amazon Cognito to publish events to Amazon Pinpoint analytics.

- */ -@property (nonatomic, strong) NSString * _Nullable roleArn; - -/** -

If UserDataShared is true, Amazon Cognito will include user data in the events it publishes to Amazon Pinpoint analytics.

- */ -@property (nonatomic, strong) NSNumber * _Nullable userDataShared; - -@end - -/** -

An Amazon Pinpoint analytics endpoint.

An endpoint uniquely identifies a mobile device, email address, or phone number that can receive messages from Amazon Pinpoint analytics.

- */ -@interface AWSCognitoIdentityProviderAnalyticsMetadataType : AWSModel - - -/** -

The endpoint ID.

- */ -@property (nonatomic, strong) NSString * _Nullable analyticsEndpointId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAssociateSoftwareTokenRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderAssociateSoftwareTokenResponse : AWSModel - - -/** -

A unique generated shared secret code that is used in the TOTP algorithm to generate a one time code.

- */ -@property (nonatomic, strong) NSString * _Nullable secretCode; - -/** -

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -@end - -/** -

Specifies whether the attribute is standard or custom.

- Required parameters: [Name] - */ -@interface AWSCognitoIdentityProviderAttributeType : AWSModel - - -/** -

The name of the attribute.

- */ -@property (nonatomic, strong) NSString * _Nullable name; - -/** -

The value of the attribute.

- */ -@property (nonatomic, strong) NSString * _Nullable value; - -@end - -/** -

The authentication event type.

- */ -@interface AWSCognitoIdentityProviderAuthEventType : AWSModel - - -/** -

The challenge responses.

- */ -@property (nonatomic, strong) NSArray * _Nullable challengeResponses; - -/** -

The creation date

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

The user context data captured at the time of an event request. It provides additional information about the client from which event the request is received.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderEventContextDataType * _Nullable eventContextData; - -/** -

A flag specifying the user feedback captured at the time of an event request is good or bad.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderEventFeedbackType * _Nullable eventFeedback; - -/** -

The event ID.

- */ -@property (nonatomic, strong) NSString * _Nullable eventId; - -/** -

The event response.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderEventResponseType eventResponse; - -/** -

The event risk.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderEventRiskType * _Nullable eventRisk; - -/** -

The event type.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderEventType eventType; - -@end - -/** -

The authentication result.

- */ -@interface AWSCognitoIdentityProviderAuthenticationResultType : AWSModel - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The expiration period of the authentication result in seconds.

- */ -@property (nonatomic, strong) NSNumber * _Nullable expiresIn; - -/** -

The ID token.

- */ -@property (nonatomic, strong) NSString * _Nullable idToken; - -/** -

The new device metadata from an authentication result.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderLatestDeviceMetadataType * _Nullable latestDeviceMetadata; - -/** -

The refresh token.

- */ -@property (nonatomic, strong) NSString * _Nullable refreshToken; - -/** -

The token type.

- */ -@property (nonatomic, strong) NSString * _Nullable tokenType; - -@end - -/** -

The challenge response type.

- */ -@interface AWSCognitoIdentityProviderChallengeResponseType : AWSModel - - -/** -

The challenge name

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeName challengeName; - -/** -

The challenge response.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeResponse challengeResponse; - -@end - -/** -

Represents the request to change a user password.

- Required parameters: [PreviousPassword, ProposedPassword, AccessToken] - */ -@interface AWSCognitoIdentityProviderChangePasswordRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The old password.

- */ -@property (nonatomic, strong) NSString * _Nullable previousPassword; - -/** -

The new password.

- */ -@property (nonatomic, strong) NSString * _Nullable proposedPassword; - -@end - -/** -

The response from the server to the change password request.

- */ -@interface AWSCognitoIdentityProviderChangePasswordResponse : AWSModel - - -@end - -/** -

The code delivery details being returned from the server.

- */ -@interface AWSCognitoIdentityProviderCodeDeliveryDetailsType : AWSModel - - -/** -

The attribute name.

- */ -@property (nonatomic, strong) NSString * _Nullable attributeName; - -/** -

The delivery medium (email message or phone number).

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderDeliveryMediumType deliveryMedium; - -/** -

The destination for the code delivery details.

- */ -@property (nonatomic, strong) NSString * _Nullable destination; - -@end - -/** -

The compromised credentials actions type

- Required parameters: [EventAction] - */ -@interface AWSCognitoIdentityProviderCompromisedCredentialsActionsType : AWSModel - - -/** -

The event action.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderCompromisedCredentialsEventActionType eventAction; - -@end - -/** -

The compromised credentials risk configuration type.

- Required parameters: [Actions] - */ -@interface AWSCognitoIdentityProviderCompromisedCredentialsRiskConfigurationType : AWSModel - - -/** -

The compromised credentials risk configuration actions.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCompromisedCredentialsActionsType * _Nullable actions; - -/** -

Perform the action for these events. The default is to perform all events if no event filter is specified.

- */ -@property (nonatomic, strong) NSArray * _Nullable eventFilter; - -@end - -/** -

Confirms the device request.

- Required parameters: [AccessToken, DeviceKey] - */ -@interface AWSCognitoIdentityProviderConfirmDeviceRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -/** -

The device name.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceName; - -/** -

The configuration of the device secret verifier.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderDeviceSecretVerifierConfigType * _Nullable deviceSecretVerifierConfig; - -@end - -/** -

Confirms the device response.

- */ -@interface AWSCognitoIdentityProviderConfirmDeviceResponse : AWSModel - - -/** -

Indicates whether the user confirmation is necessary to confirm the device response.

- */ -@property (nonatomic, strong) NSNumber * _Nullable userConfirmationNecessary; - -@end - -/** -

The request representing the confirmation for a password reset.

- Required parameters: [ClientId, Username, ConfirmationCode, Password] - */ -@interface AWSCognitoIdentityProviderConfirmForgotPasswordRequest : AWSRequest - - -/** -

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmForgotPassword calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The app client ID of the app associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The confirmation code sent by a user's request to retrieve a forgotten password. For more information, see

- */ -@property (nonatomic, strong) NSString * _Nullable confirmationCode; - -/** -

The password sent by a user's request to retrieve a forgotten password.

- */ -@property (nonatomic, strong) NSString * _Nullable password; - -/** -

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

- */ -@property (nonatomic, strong) NSString * _Nullable secretHash; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserContextDataType * _Nullable userContextData; - -/** -

The user name of the user for whom you want to enter a code to retrieve a forgotten password.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

The response from the server that results from a user's request to retrieve a forgotten password.

- */ -@interface AWSCognitoIdentityProviderConfirmForgotPasswordResponse : AWSModel - - -@end - -/** -

Represents the request to confirm registration of a user.

- Required parameters: [ClientId, Username, ConfirmationCode] - */ -@interface AWSCognitoIdentityProviderConfirmSignUpRequest : AWSRequest - - -/** -

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmSignUp calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The ID of the app client associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The confirmation code sent by a user's request to confirm registration.

- */ -@property (nonatomic, strong) NSString * _Nullable confirmationCode; - -/** -

Boolean to be specified to force user confirmation irrespective of existing alias. By default set to False. If this parameter is set to True and the phone number/email used for sign up confirmation already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user being confirmed. If set to False, the API will throw an AliasExistsException error.

- */ -@property (nonatomic, strong) NSNumber * _Nullable forceAliasCreation; - -/** -

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

- */ -@property (nonatomic, strong) NSString * _Nullable secretHash; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserContextDataType * _Nullable userContextData; - -/** -

The user name of the user whose registration you wish to confirm.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the response from the server for the registration confirmation.

- */ -@interface AWSCognitoIdentityProviderConfirmSignUpResponse : AWSModel - - -@end - -/** -

Contextual user data type used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- Required parameters: [IpAddress, ServerName, ServerPath, HttpHeaders] - */ -@interface AWSCognitoIdentityProviderContextDataType : AWSModel - - -/** -

Encoded data containing device fingerprinting details, collected using the Amazon Cognito context data collection library.

- */ -@property (nonatomic, strong) NSString * _Nullable encodedData; - -/** -

HttpHeaders received on your server in same order.

- */ -@property (nonatomic, strong) NSArray * _Nullable httpHeaders; - -/** -

Source IP address of your user.

- */ -@property (nonatomic, strong) NSString * _Nullable ipAddress; - -/** -

Your server endpoint where this API is invoked.

- */ -@property (nonatomic, strong) NSString * _Nullable serverName; - -/** -

Your server path where this API is invoked.

- */ -@property (nonatomic, strong) NSString * _Nullable serverPath; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateGroupRequest : AWSRequest - - -/** -

A string containing the description of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable detail; - -/** -

The name of the group. Must be unique.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens.

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens.

The default Precedence value is null.

- */ -@property (nonatomic, strong) NSNumber * _Nullable precedence; - -/** -

The role ARN for the group.

- */ -@property (nonatomic, strong) NSString * _Nullable roleArn; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateGroupResponse : AWSModel - - -/** -

The group object for the group.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderGroupType * _Nullable group; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateIdentityProviderRequest : AWSRequest - - -/** -

A mapping of identity provider attributes to standard and custom user pool attributes.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable attributeMapping; - -/** -

A list of identity provider identifiers.

- */ -@property (nonatomic, strong) NSArray * _Nullable idpIdentifiers; - -/** -

The identity provider details, such as MetadataURL and MetadataFile.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable providerDetails; - -/** -

The identity provider name.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -/** -

The identity provider type.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderIdentityProviderTypeType providerType; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateIdentityProviderResponse : AWSModel - - -/** -

The newly created identity provider object.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderIdentityProviderType * _Nullable identityProvider; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateResourceServerRequest : AWSRequest - - -/** -

A unique resource server identifier for the resource server. This could be an HTTPS endpoint where the resource server is located. For example, https://my-weather-api.example.com.

- */ -@property (nonatomic, strong) NSString * _Nullable identifier; - -/** -

A friendly name for the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable name; - -/** -

A list of scopes. Each scope is map, where the keys are name and description.

- */ -@property (nonatomic, strong) NSArray * _Nullable scopes; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateResourceServerResponse : AWSModel - - -/** -

The newly created resource server.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderResourceServerType * _Nullable resourceServer; - -@end - -/** -

Represents the request to create the user import job.

- Required parameters: [JobName, UserPoolId, CloudWatchLogsRoleArn] - */ -@interface AWSCognitoIdentityProviderCreateUserImportJobRequest : AWSRequest - - -/** -

The role ARN for the Amazon CloudWatch Logging role for the user import job.

- */ -@property (nonatomic, strong) NSString * _Nullable cloudWatchLogsRoleArn; - -/** -

The job name for the user import job.

- */ -@property (nonatomic, strong) NSString * _Nullable jobName; - -/** -

The user pool ID for the user pool that the users are being imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server to the request to create the user import job.

- */ -@interface AWSCognitoIdentityProviderCreateUserImportJobResponse : AWSModel - - -/** -

The job object that represents the user import job.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserImportJobType * _Nullable userImportJob; - -@end - -/** -

Represents the request to create a user pool client.

- Required parameters: [UserPoolId, ClientName] - */ -@interface AWSCognitoIdentityProviderCreateUserPoolClientRequest : AWSRequest - - -/** -

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

- */ -@property (nonatomic, strong) NSArray * _Nullable allowedOAuthFlows; - -/** -

Set to True if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

- */ -@property (nonatomic, strong) NSNumber * _Nullable allowedOAuthFlowsUserPoolClient; - -/** -

A list of allowed OAuth scopes. Currently supported values are "phone", "email", "openid", and "Cognito".

- */ -@property (nonatomic, strong) NSArray * _Nullable allowedOAuthScopes; - -/** -

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsConfigurationType * _Nullable analyticsConfiguration; - -/** -

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

- */ -@property (nonatomic, strong) NSArray * _Nullable callbackURLs; - -/** -

The client name for the user pool client you would like to create.

- */ -@property (nonatomic, strong) NSString * _Nullable clientName; - -/** -

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

- */ -@property (nonatomic, strong) NSString * _Nullable defaultRedirectURI; - -/** -

The explicit authentication flows.

- */ -@property (nonatomic, strong) NSArray * _Nullable explicitAuthFlows; - -/** -

Boolean to specify whether you want to generate a secret for the user pool client being created.

- */ -@property (nonatomic, strong) NSNumber * _Nullable generateSecret; - -/** -

A list of allowed logout URLs for the identity providers.

- */ -@property (nonatomic, strong) NSArray * _Nullable logoutURLs; - -/** -

The read attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable readAttributes; - -/** -

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

- */ -@property (nonatomic, strong) NSNumber * _Nullable refreshTokenValidity; - -/** -

A list of provider names for the identity providers that are supported on this client.

- */ -@property (nonatomic, strong) NSArray * _Nullable supportedIdentityProviders; - -/** -

The user pool ID for the user pool where you want to create a user pool client.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user pool attributes that the app client can write to.

If your app client allows users to sign in through an identity provider, this array must include all attributes that are mapped to identity provider attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If your app client lacks write access to a mapped attribute, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable writeAttributes; - -@end - -/** -

Represents the response from the server to create a user pool client.

- */ -@interface AWSCognitoIdentityProviderCreateUserPoolClientResponse : AWSModel - - -/** -

The user pool client that was just created.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolClientType * _Nullable userPoolClient; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateUserPoolDomainRequest : AWSRequest - - -/** -

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

Provide this parameter only if you want to use a custom domain for your user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito hosted domain instead.

For more information about the hosted domain and custom domains, see Configuring a User Pool Domain.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCustomDomainConfigType * _Nullable customDomainConfig; - -/** -

The domain string.

- */ -@property (nonatomic, strong) NSString * _Nullable domain; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderCreateUserPoolDomainResponse : AWSModel - - -/** -

The Amazon CloudFront endpoint that you use as the target of the alias that you set up with your Domain Name Service (DNS) provider.

- */ -@property (nonatomic, strong) NSString * _Nullable cloudFrontDomain; - -@end - -/** -

Represents the request to create a user pool.

- Required parameters: [PoolName] - */ -@interface AWSCognitoIdentityProviderCreateUserPoolRequest : AWSRequest - - -/** -

The configuration for AdminCreateUser requests.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAdminCreateUserConfigType * _Nullable adminCreateUserConfig; - -/** -

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

- */ -@property (nonatomic, strong) NSArray * _Nullable aliasAttributes; - -/** -

The attributes to be auto-verified. Possible values: email, phone_number.

- */ -@property (nonatomic, strong) NSArray * _Nullable autoVerifiedAttributes; - -/** -

The device configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderDeviceConfigurationType * _Nullable deviceConfiguration; - -/** -

The email configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderEmailConfigurationType * _Nullable emailConfiguration; - -/** -

A string representing the email verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable emailVerificationMessage; - -/** -

A string representing the email verification subject.

- */ -@property (nonatomic, strong) NSString * _Nullable emailVerificationSubject; - -/** -

The Lambda trigger configuration information for the new user pool.

In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you will need to make an extra call to add permission for these event sources to invoke your Lambda function.

For more information on using the Lambda API to add permission, see AddPermission .

For adding permission using the AWS CLI, see add-permission .

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderLambdaConfigType * _Nullable lambdaConfig; - -/** -

Specifies MFA configuration details.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserPoolMfaType mfaConfiguration; - -/** -

The policies associated with the new user pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolPolicyType * _Nullable policies; - -/** -

A string used to name the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable poolName; - -/** -

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable schema; - -/** -

A string representing the SMS authentication message.

- */ -@property (nonatomic, strong) NSString * _Nullable smsAuthenticationMessage; - -/** -

The SMS configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSmsConfigurationType * _Nullable smsConfiguration; - -/** -

A string representing the SMS verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable smsVerificationMessage; - -/** -

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolAddOnsType * _Nullable userPoolAddOns; - -/** -

The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool

- */ -@property (nonatomic, strong) NSDictionary * _Nullable userPoolTags; - -/** -

Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

- */ -@property (nonatomic, strong) NSArray * _Nullable usernameAttributes; - -/** -

The template for the verification message that the user sees when the app requests permission to access the user's information.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderVerificationMessageTemplateType * _Nullable verificationMessageTemplate; - -@end - -/** -

Represents the response from the server for the request to create a user pool.

- */ -@interface AWSCognitoIdentityProviderCreateUserPoolResponse : AWSModel - - -/** -

A container for the user pool details.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolType * _Nullable userPool; - -@end - -/** -

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

- Required parameters: [CertificateArn] - */ -@interface AWSCognitoIdentityProviderCustomDomainConfigType : AWSModel - - -/** -

The Amazon Resource Name (ARN) of an AWS Certificate Manager SSL certificate. You use this certificate for the subdomain of your custom domain.

- */ -@property (nonatomic, strong) NSString * _Nullable certificateArn; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDeleteGroupRequest : AWSRequest - - -/** -

The name of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDeleteIdentityProviderRequest : AWSRequest - - -/** -

The identity provider name.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDeleteResourceServerRequest : AWSRequest - - -/** -

The identifier for the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable identifier; - -/** -

The user pool ID for the user pool that hosts the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the request to delete user attributes.

- Required parameters: [UserAttributeNames, AccessToken] - */ -@interface AWSCognitoIdentityProviderDeleteUserAttributesRequest : AWSRequest - - -/** -

The access token used in the request to delete user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

An array of strings representing the user attribute names you wish to delete.

For custom attributes, you must prepend the custom: prefix to the attribute name.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributeNames; - -@end - -/** -

Represents the response from the server to delete user attributes.

- */ -@interface AWSCognitoIdentityProviderDeleteUserAttributesResponse : AWSModel - - -@end - -/** -

Represents the request to delete a user pool client.

- Required parameters: [UserPoolId, ClientId] - */ -@interface AWSCognitoIdentityProviderDeleteUserPoolClientRequest : AWSRequest - - -/** -

The app client ID of the app associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The user pool ID for the user pool where you want to delete the client.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDeleteUserPoolDomainRequest : AWSRequest - - -/** -

The domain string.

- */ -@property (nonatomic, strong) NSString * _Nullable domain; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDeleteUserPoolDomainResponse : AWSModel - - -@end - -/** -

Represents the request to delete a user pool.

- Required parameters: [UserPoolId] - */ -@interface AWSCognitoIdentityProviderDeleteUserPoolRequest : AWSRequest - - -/** -

The user pool ID for the user pool you want to delete.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the request to delete a user.

- Required parameters: [AccessToken] - */ -@interface AWSCognitoIdentityProviderDeleteUserRequest : AWSRequest - - -/** -

The access token from a request to delete a user.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeIdentityProviderRequest : AWSRequest - - -/** -

The identity provider name.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeIdentityProviderResponse : AWSModel - - -/** -

The identity provider that was deleted.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderIdentityProviderType * _Nullable identityProvider; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeResourceServerRequest : AWSRequest - - -/** -

The identifier for the resource server

- */ -@property (nonatomic, strong) NSString * _Nullable identifier; - -/** -

The user pool ID for the user pool that hosts the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeResourceServerResponse : AWSModel - - -/** -

The resource server.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderResourceServerType * _Nullable resourceServer; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeRiskConfigurationRequest : AWSRequest - - -/** -

The app client ID.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeRiskConfigurationResponse : AWSModel - - -/** -

The risk configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderRiskConfigurationType * _Nullable riskConfiguration; - -@end - -/** -

Represents the request to describe the user import job.

- Required parameters: [UserPoolId, JobId] - */ -@interface AWSCognitoIdentityProviderDescribeUserImportJobRequest : AWSRequest - - -/** -

The job ID for the user import job.

- */ -@property (nonatomic, strong) NSString * _Nullable jobId; - -/** -

The user pool ID for the user pool that the users are being imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server to the request to describe the user import job.

- */ -@interface AWSCognitoIdentityProviderDescribeUserImportJobResponse : AWSModel - - -/** -

The job object that represents the user import job.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserImportJobType * _Nullable userImportJob; - -@end - -/** -

Represents the request to describe a user pool client.

- Required parameters: [UserPoolId, ClientId] - */ -@interface AWSCognitoIdentityProviderDescribeUserPoolClientRequest : AWSRequest - - -/** -

The app client ID of the app associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The user pool ID for the user pool you want to describe.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server from a request to describe the user pool client.

- */ -@interface AWSCognitoIdentityProviderDescribeUserPoolClientResponse : AWSModel - - -/** -

The user pool client from a server response to describe the user pool client.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolClientType * _Nullable userPoolClient; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeUserPoolDomainRequest : AWSRequest - - -/** -

The domain string.

- */ -@property (nonatomic, strong) NSString * _Nullable domain; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderDescribeUserPoolDomainResponse : AWSModel - - -/** -

A domain description object containing information about the domain.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderDomainDescriptionType * _Nullable domainDescription; - -@end - -/** -

Represents the request to describe the user pool.

- Required parameters: [UserPoolId] - */ -@interface AWSCognitoIdentityProviderDescribeUserPoolRequest : AWSRequest - - -/** -

The user pool ID for the user pool you want to describe.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response to describe the user pool.

- */ -@interface AWSCognitoIdentityProviderDescribeUserPoolResponse : AWSModel - - -/** -

The container of metadata returned by the server to describe the pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolType * _Nullable userPool; - -@end - -/** -

The configuration for the user pool's device tracking.

- */ -@interface AWSCognitoIdentityProviderDeviceConfigurationType : AWSModel - - -/** -

Indicates whether a challenge is required on a new device. Only applicable to a new device.

- */ -@property (nonatomic, strong) NSNumber * _Nullable challengeRequiredOnNewDevice; - -/** -

If true, a device is only remembered on user prompt.

- */ -@property (nonatomic, strong) NSNumber * _Nullable deviceOnlyRememberedOnUserPrompt; - -@end - -/** -

The device verifier against which it will be authenticated.

- */ -@interface AWSCognitoIdentityProviderDeviceSecretVerifierConfigType : AWSModel - - -/** -

The password verifier.

- */ -@property (nonatomic, strong) NSString * _Nullable passwordVerifier; - -/** -

The salt.

- */ -@property (nonatomic, strong) NSString * _Nullable salt; - -@end - -/** -

The device type.

- */ -@interface AWSCognitoIdentityProviderDeviceType : AWSModel - - -/** -

The device attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable deviceAttributes; - -/** -

The creation date of the device.

- */ -@property (nonatomic, strong) NSDate * _Nullable deviceCreateDate; - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -/** -

The date in which the device was last authenticated.

- */ -@property (nonatomic, strong) NSDate * _Nullable deviceLastAuthenticatedDate; - -/** -

The last modified date of the device.

- */ -@property (nonatomic, strong) NSDate * _Nullable deviceLastModifiedDate; - -@end - -/** -

A container for information about a domain.

- */ -@interface AWSCognitoIdentityProviderDomainDescriptionType : AWSModel - - -/** -

The AWS account ID for the user pool owner.

- */ -@property (nonatomic, strong) NSString * _Nullable AWSAccountId; - -/** -

The ARN of the CloudFront distribution.

- */ -@property (nonatomic, strong) NSString * _Nullable cloudFrontDistribution; - -/** -

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCustomDomainConfigType * _Nullable customDomainConfig; - -/** -

The domain string.

- */ -@property (nonatomic, strong) NSString * _Nullable domain; - -/** -

The S3 bucket where the static files for this domain are stored.

- */ -@property (nonatomic, strong) NSString * _Nullable s3Bucket; - -/** -

The domain status.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderDomainStatusType status; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The app version.

- */ -@property (nonatomic, strong) NSString * _Nullable version; - -@end - -/** -

The email configuration type.

- */ -@interface AWSCognitoIdentityProviderEmailConfigurationType : AWSModel - - -/** -

The destination to which the receiver of the email should reply to.

- */ -@property (nonatomic, strong) NSString * _Nullable replyToEmailAddress; - -/** -

The Amazon Resource Name (ARN) of the email source.

- */ -@property (nonatomic, strong) NSString * _Nullable sourceArn; - -@end - -/** -

Specifies the user context data captured at the time of an event request.

- */ -@interface AWSCognitoIdentityProviderEventContextDataType : AWSModel - - -/** -

The user's city.

- */ -@property (nonatomic, strong) NSString * _Nullable city; - -/** -

The user's country.

- */ -@property (nonatomic, strong) NSString * _Nullable country; - -/** -

The user's device name.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceName; - -/** -

The user's IP address.

- */ -@property (nonatomic, strong) NSString * _Nullable ipAddress; - -/** -

The user's time zone.

- */ -@property (nonatomic, strong) NSString * _Nullable timezone; - -@end - -/** -

Specifies the event feedback type.

- Required parameters: [FeedbackValue, Provider] - */ -@interface AWSCognitoIdentityProviderEventFeedbackType : AWSModel - - -/** -

The event feedback date.

- */ -@property (nonatomic, strong) NSDate * _Nullable feedbackDate; - -/** -

The event feedback value.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderFeedbackValueType feedbackValue; - -/** -

The provider.

- */ -@property (nonatomic, strong) NSString * _Nullable provider; - -@end - -/** -

The event risk type.

- */ -@interface AWSCognitoIdentityProviderEventRiskType : AWSModel - - -/** -

The risk decision.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderRiskDecisionType riskDecision; - -/** -

The risk level.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderRiskLevelType riskLevel; - -@end - -/** -

Represents the request to forget the device.

- Required parameters: [DeviceKey] - */ -@interface AWSCognitoIdentityProviderForgetDeviceRequest : AWSRequest - - -/** -

The access token for the forgotten device request.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -@end - -/** -

Represents the request to reset a user's password.

- Required parameters: [ClientId, Username] - */ -@interface AWSCognitoIdentityProviderForgotPasswordRequest : AWSRequest - - -/** -

The Amazon Pinpoint analytics metadata for collecting metrics for ForgotPassword calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The ID of the client associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

- */ -@property (nonatomic, strong) NSString * _Nullable secretHash; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserContextDataType * _Nullable userContextData; - -/** -

The user name of the user for whom you want to enter a code to reset a forgotten password.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Respresents the response from the server regarding the request to reset a password.

- */ -@interface AWSCognitoIdentityProviderForgotPasswordResponse : AWSModel - - -/** -

The code delivery details returned by the server in response to the request to reset a password.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCodeDeliveryDetailsType * _Nullable codeDeliveryDetails; - -@end - -/** -

Represents the request to get the header information for the .csv file for the user import job.

- Required parameters: [UserPoolId] - */ -@interface AWSCognitoIdentityProviderGetCSVHeaderRequest : AWSRequest - - -/** -

The user pool ID for the user pool that the users are to be imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server to the request to get the header information for the .csv file for the user import job.

- */ -@interface AWSCognitoIdentityProviderGetCSVHeaderResponse : AWSModel - - -/** -

The header information for the .csv file for the user import job.

- */ -@property (nonatomic, strong) NSArray * _Nullable CSVHeader; - -/** -

The user pool ID for the user pool that the users are to be imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the request to get the device.

- Required parameters: [DeviceKey] - */ -@interface AWSCognitoIdentityProviderGetDeviceRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -@end - -/** -

Gets the device response.

- Required parameters: [Device] - */ -@interface AWSCognitoIdentityProviderGetDeviceResponse : AWSModel - - -/** -

The device.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderDeviceType * _Nullable device; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetGroupRequest : AWSRequest - - -/** -

The name of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetGroupResponse : AWSModel - - -/** -

The group object for the group.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderGroupType * _Nullable group; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest : AWSRequest - - -/** -

The identity provider ID.

- */ -@property (nonatomic, strong) NSString * _Nullable idpIdentifier; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse : AWSModel - - -/** -

The identity provider object.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderIdentityProviderType * _Nullable identityProvider; - -@end - -/** -

Request to get a signing certificate from Cognito.

- Required parameters: [UserPoolId] - */ -@interface AWSCognitoIdentityProviderGetSigningCertificateRequest : AWSRequest - - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Response from Cognito for a signing certificate request.

- */ -@interface AWSCognitoIdentityProviderGetSigningCertificateResponse : AWSModel - - -/** -

The signing certificate.

- */ -@property (nonatomic, strong) NSString * _Nullable certificate; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetUICustomizationRequest : AWSRequest - - -/** -

The client ID for the client app.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetUICustomizationResponse : AWSModel - - -/** -

The UI customization information.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUICustomizationType * _Nullable UICustomization; - -@end - -/** -

Represents the request to get user attribute verification.

- Required parameters: [AccessToken, AttributeName] - */ -@interface AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest : AWSRequest - - -/** -

The access token returned by the server response to get the user attribute verification code.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The attribute name returned by the server response to get the user attribute verification code.

- */ -@property (nonatomic, strong) NSString * _Nullable attributeName; - -@end - -/** -

The verification code response returned by the server response to get the user attribute verification code.

- */ -@interface AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse : AWSModel - - -/** -

The code delivery details returned by the server in response to the request to get the user attribute verification code.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCodeDeliveryDetailsType * _Nullable codeDeliveryDetails; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest : AWSRequest - - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse : AWSModel - - -/** -

The multi-factor (MFA) configuration.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserPoolMfaType mfaConfiguration; - -/** -

The SMS text message multi-factor (MFA) configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSmsMfaConfigType * _Nullable smsMfaConfiguration; - -/** -

The software token multi-factor (MFA) configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSoftwareTokenMfaConfigType * _Nullable softwareTokenMfaConfiguration; - -@end - -/** -

Represents the request to get information about the user.

- Required parameters: [AccessToken] - */ -@interface AWSCognitoIdentityProviderGetUserRequest : AWSRequest - - -/** -

The access token returned by the server response to get information about the user.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -@end - -/** -

Represents the response from the server from the request to get information about the user.

- Required parameters: [Username, UserAttributes] - */ -@interface AWSCognitoIdentityProviderGetUserResponse : AWSModel - - -/** -

Specifies the options for MFA (e.g., email or phone number).

- */ -@property (nonatomic, strong) NSArray * _Nullable MFAOptions; - -/** -

The user's preferred MFA setting.

- */ -@property (nonatomic, strong) NSString * _Nullable preferredMfaSetting; - -/** -

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributes; - -/** -

The list of the user's MFA settings.

- */ -@property (nonatomic, strong) NSArray * _Nullable userMFASettingList; - -/** -

The user name of the user you wish to retrieve from the get user request.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

Represents the request to sign out all devices.

- Required parameters: [AccessToken] - */ -@interface AWSCognitoIdentityProviderGlobalSignOutRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -@end - -/** -

The response to the request to sign out all devices.

- */ -@interface AWSCognitoIdentityProviderGlobalSignOutResponse : AWSModel - - -@end - -/** -

The group type.

- */ -@interface AWSCognitoIdentityProviderGroupType : AWSModel - - -/** -

The date the group was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

A string containing the description of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable detail; - -/** -

The name of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

The date the group was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. If a user belongs to two or more groups, it is the group with the highest precedence whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens. Groups with higher Precedence values take precedence over groups with lower Precedence values or with null Precedence values.

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens.

The default Precedence value is null.

- */ -@property (nonatomic, strong) NSNumber * _Nullable precedence; - -/** -

The role ARN for the group.

- */ -@property (nonatomic, strong) NSString * _Nullable roleArn; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

The HTTP header.

- */ -@interface AWSCognitoIdentityProviderHttpHeader : AWSModel - - -/** -

The header name

- */ -@property (nonatomic, strong) NSString * _Nullable headerName; - -/** -

The header value.

- */ -@property (nonatomic, strong) NSString * _Nullable headerValue; - -@end - -/** -

A container for information about an identity provider.

- */ -@interface AWSCognitoIdentityProviderIdentityProviderType : AWSModel - - -/** -

A mapping of identity provider attributes to standard and custom user pool attributes.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable attributeMapping; - -/** -

The date the identity provider was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

A list of identity provider identifiers.

- */ -@property (nonatomic, strong) NSArray * _Nullable idpIdentifiers; - -/** -

The date the identity provider was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

The identity provider details, such as MetadataURL and MetadataFile.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable providerDetails; - -/** -

The identity provider name.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -/** -

The identity provider type.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderIdentityProviderTypeType providerType; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Initiates the authentication request.

- Required parameters: [AuthFlow, ClientId] - */ -@interface AWSCognitoIdentityProviderInitiateAuthRequest : AWSRequest - - -/** -

The Amazon Pinpoint analytics metadata for collecting metrics for InitiateAuth calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The authentication flow for this call to execute. The API action will depend on this value. For example:

  • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

  • USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.

  • USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

Valid values include:

  • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

  • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

  • CUSTOM_AUTH: Custom authentication flow.

  • USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.

ADMIN_NO_SRP_AUTH is not a valid value.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderAuthFlowType authFlow; - -/** -

The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:

  • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY

- */ -@property (nonatomic, strong) NSDictionary * _Nullable authParameters; - -/** -

The app client ID.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

This is a random key-value pair map which can contain any key and will be passed to your PreAuthentication Lambda trigger as-is. It can be used to implement additional validations around authentication.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable clientMetadata; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserContextDataType * _Nullable userContextData; - -@end - -/** -

Initiates the authentication response.

- */ -@interface AWSCognitoIdentityProviderInitiateAuthResponse : AWSModel - - -/** -

The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAuthenticationResultType * _Nullable authenticationResult; - -/** -

The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge.

Valid values include the following. Note that all of these challenges require USERNAME and SECRET_HASH (if applicable) in the parameters.

  • SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.

  • PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.

  • CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.

  • DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.

  • DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.

  • NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeNameType challengeName; - -/** -

The challenge parameters. These are returned to you in the InitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (RespondToAuthChallenge).

All challenges require USERNAME and SECRET_HASH (if applicable).

- */ -@property (nonatomic, strong) NSDictionary * _Nullable challengeParameters; - -/** -

The session which should be passed both ways in challenge-response calls to the service. If the or API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -@end - -/** -

Specifies the configuration for AWS Lambda triggers.

- */ -@interface AWSCognitoIdentityProviderLambdaConfigType : AWSModel - - -/** -

Creates an authentication challenge.

- */ -@property (nonatomic, strong) NSString * _Nullable createAuthChallenge; - -/** -

A custom Message AWS Lambda trigger.

- */ -@property (nonatomic, strong) NSString * _Nullable customMessage; - -/** -

Defines the authentication challenge.

- */ -@property (nonatomic, strong) NSString * _Nullable defineAuthChallenge; - -/** -

A post-authentication AWS Lambda trigger.

- */ -@property (nonatomic, strong) NSString * _Nullable postAuthentication; - -/** -

A post-confirmation AWS Lambda trigger.

- */ -@property (nonatomic, strong) NSString * _Nullable postConfirmation; - -/** -

A pre-authentication AWS Lambda trigger.

- */ -@property (nonatomic, strong) NSString * _Nullable preAuthentication; - -/** -

A pre-registration AWS Lambda trigger.

- */ -@property (nonatomic, strong) NSString * _Nullable preSignUp; - -/** -

A Lambda trigger that is invoked before token generation.

- */ -@property (nonatomic, strong) NSString * _Nullable preTokenGeneration; - -/** -

The user migration Lambda config type.

- */ -@property (nonatomic, strong) NSString * _Nullable userMigration; - -/** -

Verifies the authentication challenge response.

- */ -@property (nonatomic, strong) NSString * _Nullable verifyAuthChallengeResponse; - -@end - -/** -

Represents the request to list the devices.

- Required parameters: [AccessToken] - */ -@interface AWSCognitoIdentityProviderListDevicesRequest : AWSRequest - - -/** -

The access tokens for the request to list devices.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The limit of the device request.

- */ -@property (nonatomic, strong) NSNumber * _Nullable limit; - -/** -

The pagination token for the list request.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -@end - -/** -

Represents the response to list devices.

- */ -@interface AWSCognitoIdentityProviderListDevicesResponse : AWSModel - - -/** -

The devices returned in the list devices response.

- */ -@property (nonatomic, strong) NSArray * _Nullable devices; - -/** -

The pagination token for the list device response.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListGroupsRequest : AWSRequest - - -/** -

The limit of the request to list groups.

- */ -@property (nonatomic, strong) NSNumber * _Nullable limit; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListGroupsResponse : AWSModel - - -/** -

The group objects for the groups.

- */ -@property (nonatomic, strong) NSArray * _Nullable groups; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListIdentityProvidersRequest : AWSRequest - - -/** -

The maximum number of identity providers to return.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListIdentityProvidersResponse : AWSModel - - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

A list of identity provider objects.

- */ -@property (nonatomic, strong) NSArray * _Nullable providers; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListResourceServersRequest : AWSRequest - - -/** -

The maximum number of resource servers to return.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListResourceServersResponse : AWSModel - - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The resource servers.

- */ -@property (nonatomic, strong) NSArray * _Nullable resourceServers; - -@end - -/** -

Represents the request to list the user import jobs.

- Required parameters: [UserPoolId, MaxResults] - */ -@interface AWSCognitoIdentityProviderListUserImportJobsRequest : AWSRequest - - -/** -

The maximum number of import jobs you want the request to return.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

An identifier that was returned from the previous call to ListUserImportJobs, which can be used to return the next set of import jobs in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -/** -

The user pool ID for the user pool that the users are being imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server to the request to list the user import jobs.

- */ -@interface AWSCognitoIdentityProviderListUserImportJobsResponse : AWSModel - - -/** -

An identifier that can be used to return the next set of user import jobs in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -/** -

The user import jobs.

- */ -@property (nonatomic, strong) NSArray * _Nullable userImportJobs; - -@end - -/** -

Represents the request to list the user pool clients.

- Required parameters: [UserPoolId] - */ -@interface AWSCognitoIdentityProviderListUserPoolClientsRequest : AWSRequest - - -/** -

The maximum number of results you want the request to return when listing the user pool clients.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool ID for the user pool where you want to list user pool clients.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server that lists user pool clients.

- */ -@interface AWSCognitoIdentityProviderListUserPoolClientsResponse : AWSModel - - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool clients in the response that lists user pool clients.

- */ -@property (nonatomic, strong) NSArray * _Nullable userPoolClients; - -@end - -/** -

Represents the request to list user pools.

- Required parameters: [MaxResults] - */ -@interface AWSCognitoIdentityProviderListUserPoolsRequest : AWSRequest - - -/** -

The maximum number of results you want the request to return when listing the user pools.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** -

Represents the response to list user pools.

- */ -@interface AWSCognitoIdentityProviderListUserPoolsResponse : AWSModel - - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pools from the response to list users.

- */ -@property (nonatomic, strong) NSArray * _Nullable userPools; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListUsersInGroupRequest : AWSRequest - - -/** -

The name of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

The limit of the request to list users.

- */ -@property (nonatomic, strong) NSNumber * _Nullable limit; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderListUsersInGroupResponse : AWSModel - - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -/** -

The users returned in the request to list users.

- */ -@property (nonatomic, strong) NSArray * _Nullable users; - -@end - -/** -

Represents the request to list users.

- Required parameters: [UserPoolId] - */ -@interface AWSCognitoIdentityProviderListUsersRequest : AWSRequest - - -/** -

An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.

- */ -@property (nonatomic, strong) NSArray * _Nullable attributesToGet; - -/** -

A filter string of the form "AttributeNameFilter-Type "AttributeValue"". Quotation marks within the filter string must be escaped using the backslash (\) character. For example, "family_name = \"Reddy\"".

  • AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.

  • Filter-Type: For an exact match, use =, for example, "given_name = \"Jon\"". For a prefix ("starts with") match, use ^=, for example, "given_name ^= \"Jon\"".

  • AttributeValue: The attribute value that must be matched for each user.

If the filter string is empty, ListUsers returns all users in the user pool.

You can only search for the following standard attributes:

  • username (case-sensitive)

  • email

  • phone_number

  • name

  • given_name

  • family_name

  • preferred_username

  • cognito:user_status (called Status in the Console) (case-insensitive)

  • status (called Enabled in the Console) (case-sensitive)

  • sub

Custom attributes are not searchable.

For more information, see Searching for Users Using the ListUsers API and Examples of Using the ListUsers API in the Amazon Cognito Developer Guide.

- */ -@property (nonatomic, strong) NSString * _Nullable filter; - -/** -

Maximum number of users to be returned.

- */ -@property (nonatomic, strong) NSNumber * _Nullable limit; - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -/** -

The user pool ID for the user pool on which the search should be performed.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

The response from the request to list users.

- */ -@interface AWSCognitoIdentityProviderListUsersResponse : AWSModel - - -/** -

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

- */ -@property (nonatomic, strong) NSString * _Nullable paginationToken; - -/** -

The users returned in the request to list users.

- */ -@property (nonatomic, strong) NSArray * _Nullable users; - -@end - -/** -

Specifies the different settings for multi-factor authentication (MFA).

- */ -@interface AWSCognitoIdentityProviderMFAOptionType : AWSModel - - -/** -

The attribute name of the MFA option type.

- */ -@property (nonatomic, strong) NSString * _Nullable attributeName; - -/** -

The delivery medium (email message or SMS message) to send the MFA code.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderDeliveryMediumType deliveryMedium; - -@end - -/** -

The message template structure.

- */ -@interface AWSCognitoIdentityProviderMessageTemplateType : AWSModel - - -/** -

The message template for email messages.

- */ -@property (nonatomic, strong) NSString * _Nullable emailMessage; - -/** -

The subject line for email messages.

- */ -@property (nonatomic, strong) NSString * _Nullable emailSubject; - -/** -

The message template for SMS messages.

- */ -@property (nonatomic, strong) NSString * _Nullable SMSMessage; - -@end - -/** -

The new device metadata type.

- */ -@interface AWSCognitoIdentityProviderLatestDeviceMetadataType : AWSModel - - -/** -

The device group key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceGroupKey; - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -@end - -/** -

The notify configuration type.

- Required parameters: [SourceArn] - */ -@interface AWSCognitoIdentityProviderNotifyConfigurationType : AWSModel - - -/** -

Email template used when a detected risk event is blocked.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderNotifyEmailType * _Nullable blockEmail; - -/** -

The email address that is sending the email. It must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.

- */ -@property (nonatomic, strong) NSString * _Nullable from; - -/** -

The MFA email template used when MFA is challenged as part of a detected risk.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderNotifyEmailType * _Nullable mfaEmail; - -/** -

The email template used when a detected risk event is allowed.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderNotifyEmailType * _Nullable noActionEmail; - -/** -

The destination to which the receiver of an email should reply to.

- */ -@property (nonatomic, strong) NSString * _Nullable replyTo; - -/** -

The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. It permits Amazon Cognito to send for the email address specified in the From parameter.

- */ -@property (nonatomic, strong) NSString * _Nullable sourceArn; - -@end - -/** -

The notify email type.

- Required parameters: [Subject] - */ -@interface AWSCognitoIdentityProviderNotifyEmailType : AWSModel - - -/** -

The HTML body.

- */ -@property (nonatomic, strong) NSString * _Nullable htmlBody; - -/** -

The subject.

- */ -@property (nonatomic, strong) NSString * _Nullable subject; - -/** -

The text body.

- */ -@property (nonatomic, strong) NSString * _Nullable textBody; - -@end - -/** -

The minimum and maximum value of an attribute that is of the number data type.

- */ -@interface AWSCognitoIdentityProviderNumberAttributeConstraintsType : AWSModel - - -/** -

The maximum value of an attribute that is of the number data type.

- */ -@property (nonatomic, strong) NSString * _Nullable maxValue; - -/** -

The minimum value of an attribute that is of the number data type.

- */ -@property (nonatomic, strong) NSString * _Nullable minValue; - -@end - -/** -

The password policy type.

- */ -@interface AWSCognitoIdentityProviderPasswordPolicyType : AWSModel - - -/** -

The minimum length of the password policy that you have set. Cannot be less than 6.

- */ -@property (nonatomic, strong) NSNumber * _Nullable minimumLength; - -/** -

In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

- */ -@property (nonatomic, strong) NSNumber * _Nullable requireLowercase; - -/** -

In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

- */ -@property (nonatomic, strong) NSNumber * _Nullable requireNumbers; - -/** -

In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

- */ -@property (nonatomic, strong) NSNumber * _Nullable requireSymbols; - -/** -

In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

- */ -@property (nonatomic, strong) NSNumber * _Nullable requireUppercase; - -@end - -/** -

A container for identity provider details.

- */ -@interface AWSCognitoIdentityProviderProviderDescription : AWSModel - - -/** -

The date the provider was added to the user pool.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

The date the provider was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

The identity provider name.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -/** -

The identity provider type.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderIdentityProviderTypeType providerType; - -@end - -/** -

A container for information about an identity provider for a user pool.

- */ -@interface AWSCognitoIdentityProviderProviderUserIdentifierType : AWSModel - - -/** -

The name of the provider attribute to link to, for example, NameID.

- */ -@property (nonatomic, strong) NSString * _Nullable providerAttributeName; - -/** -

The value of the provider attribute to link to, for example, xxxxx_account.

- */ -@property (nonatomic, strong) NSString * _Nullable providerAttributeValue; - -/** -

The name of the provider, for example, Facebook, Google, or Login with Amazon.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -@end - -/** -

Represents the request to resend the confirmation code.

- Required parameters: [ClientId, Username] - */ -@interface AWSCognitoIdentityProviderResendConfirmationCodeRequest : AWSRequest - - -/** -

The Amazon Pinpoint analytics metadata for collecting metrics for ResendConfirmationCode calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The ID of the client associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

- */ -@property (nonatomic, strong) NSString * _Nullable secretHash; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserContextDataType * _Nullable userContextData; - -/** -

The user name of the user to whom you wish to resend a confirmation code.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

The response from the server when the Amazon Cognito Your User Pools service makes the request to resend a confirmation code.

- */ -@interface AWSCognitoIdentityProviderResendConfirmationCodeResponse : AWSModel - - -/** -

The code delivery details returned by the server in response to the request to resend the confirmation code.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCodeDeliveryDetailsType * _Nullable codeDeliveryDetails; - -@end - -/** -

A resource server scope.

- Required parameters: [ScopeName, ScopeDescription] - */ -@interface AWSCognitoIdentityProviderResourceServerScopeType : AWSModel - - -/** -

A description of the scope.

- */ -@property (nonatomic, strong) NSString * _Nullable scopeDescription; - -/** -

The name of the scope.

- */ -@property (nonatomic, strong) NSString * _Nullable scopeName; - -@end - -/** -

A container for information about a resource server for a user pool.

- */ -@interface AWSCognitoIdentityProviderResourceServerType : AWSModel - - -/** -

The identifier for the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable identifier; - -/** -

The name of the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable name; - -/** -

A list of scopes that are defined for the resource server.

- */ -@property (nonatomic, strong) NSArray * _Nullable scopes; - -/** -

The user pool ID for the user pool that hosts the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

The request to respond to an authentication challenge.

- Required parameters: [ClientId, ChallengeName] - */ -@interface AWSCognitoIdentityProviderRespondToAuthChallengeRequest : AWSRequest - - -/** -

The Amazon Pinpoint analytics metadata for collecting metrics for RespondToAuthChallenge calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The challenge name. For more information, see .

ADMIN_NO_SRP_AUTH is not a valid value.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeNameType challengeName; - -/** -

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

  • SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME, SECRET_HASH (if app client is configured with client secret).

- */ -@property (nonatomic, strong) NSDictionary * _Nullable challengeResponses; - -/** -

The app client ID.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserContextDataType * _Nullable userContextData; - -@end - -/** -

The response to respond to the authentication challenge.

- */ -@interface AWSCognitoIdentityProviderRespondToAuthChallengeResponse : AWSModel - - -/** -

The result returned by the server in response to the request to respond to the authentication challenge.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAuthenticationResultType * _Nullable authenticationResult; - -/** -

The challenge name. For more information, see .

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderChallengeNameType challengeName; - -/** -

The challenge parameters. For more information, see .

- */ -@property (nonatomic, strong) NSDictionary * _Nullable challengeParameters; - -/** -

The session which should be passed both ways in challenge-response calls to the service. If the or API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -@end - -/** -

The risk configuration type.

- */ -@interface AWSCognitoIdentityProviderRiskConfigurationType : AWSModel - - -/** -

The account takeover risk configuration object including the NotifyConfiguration object and Actions to take in the case of an account takeover.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAccountTakeoverRiskConfigurationType * _Nullable accountTakeoverRiskConfiguration; - -/** -

The app client ID.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The compromised credentials risk configuration object including the EventFilter and the EventAction

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCompromisedCredentialsRiskConfigurationType * _Nullable compromisedCredentialsRiskConfiguration; - -/** -

The last modified date.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

The configuration to override the risk decision.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderRiskExceptionConfigurationType * _Nullable riskExceptionConfiguration; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

The type of the configuration to override the risk decision.

- */ -@interface AWSCognitoIdentityProviderRiskExceptionConfigurationType : AWSModel - - -/** -

Overrides the risk decision to always block the pre-authentication requests. The IP range is in CIDR notation: a compact representation of an IP address and its associated routing prefix.

- */ -@property (nonatomic, strong) NSArray * _Nullable blockedIPRangeList; - -/** -

Risk detection is not performed on the IP addresses in the range list. The IP range is in CIDR notation.

- */ -@property (nonatomic, strong) NSArray * _Nullable skippedIPRangeList; - -@end - -/** -

The SMS multi-factor authentication (MFA) settings type.

- */ -@interface AWSCognitoIdentityProviderSMSMfaSettingsType : AWSModel - - -/** -

Specifies whether SMS text message MFA is enabled.

- */ -@property (nonatomic, strong) NSNumber * _Nullable enabled; - -/** -

The preferred MFA method.

- */ -@property (nonatomic, strong) NSNumber * _Nullable preferredMfa; - -@end - -/** -

Contains information about the schema attribute.

- */ -@interface AWSCognitoIdentityProviderSchemaAttributeType : AWSModel - - -/** -

The attribute data type.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderAttributeDataType attributeDataType; - -/** -

Specifies whether the attribute type is developer only.

- */ -@property (nonatomic, strong) NSNumber * _Nullable developerOnlyAttribute; - -/** -

Specifies whether the value of the attribute can be changed.

For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

- */ -@property (nonatomic, strong) NSNumber * _Nullable varying; - -/** -

A schema attribute of the name type.

- */ -@property (nonatomic, strong) NSString * _Nullable name; - -/** -

Specifies the constraints for an attribute of the number type.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderNumberAttributeConstraintsType * _Nullable numberAttributeConstraints; - -/** -

Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.

- */ -@property (nonatomic, strong) NSNumber * _Nullable required; - -/** -

Specifies the constraints for an attribute of the string type.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderStringAttributeConstraintsType * _Nullable stringAttributeConstraints; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetRiskConfigurationRequest : AWSRequest - - -/** -

The account takeover risk configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAccountTakeoverRiskConfigurationType * _Nullable accountTakeoverRiskConfiguration; - -/** -

The app client ID. If ClientId is null, then the risk configuration is mapped to userPoolId. When the client ID is null, the same risk configuration is applied to all the clients in the userPool.

Otherwise, ClientId is mapped to the client. When the client ID is not null, the user pool configuration is overridden and the risk configuration for the client is used instead.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The compromised credentials risk configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCompromisedCredentialsRiskConfigurationType * _Nullable compromisedCredentialsRiskConfiguration; - -/** -

The configuration to override the risk decision.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderRiskExceptionConfigurationType * _Nullable riskExceptionConfiguration; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetRiskConfigurationResponse : AWSModel - - -/** -

The risk configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderRiskConfigurationType * _Nullable riskConfiguration; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetUICustomizationRequest : AWSRequest - - -/** -

The CSS values in the UI customization.

- */ -@property (nonatomic, strong) NSString * _Nullable CSS; - -/** -

The client ID for the client app.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The uploaded logo image for the UI customization.

- */ -@property (nonatomic, strong) NSData * _Nullable imageFile; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetUICustomizationResponse : AWSModel - - -/** -

The UI customization information.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUICustomizationType * _Nullable UICustomization; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetUserMFAPreferenceRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The SMS text message multi-factor authentication (MFA) settings.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSMSMfaSettingsType * _Nullable SMSMfaSettings; - -/** -

The time-based one-time password software token MFA settings.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType * _Nullable softwareTokenMfaSettings; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetUserMFAPreferenceResponse : AWSModel - - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest : AWSRequest - - -/** -

The MFA configuration.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserPoolMfaType mfaConfiguration; - -/** -

The SMS text message MFA configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSmsMfaConfigType * _Nullable smsMfaConfiguration; - -/** -

The software token MFA configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSoftwareTokenMfaConfigType * _Nullable softwareTokenMfaConfiguration; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse : AWSModel - - -/** -

The MFA configuration.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserPoolMfaType mfaConfiguration; - -/** -

The SMS text message MFA configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSmsMfaConfigType * _Nullable smsMfaConfiguration; - -/** -

The software token MFA configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSoftwareTokenMfaConfigType * _Nullable softwareTokenMfaConfiguration; - -@end - -/** -

Represents the request to set user settings.

- Required parameters: [AccessToken, MFAOptions] - */ -@interface AWSCognitoIdentityProviderSetUserSettingsRequest : AWSRequest - - -/** -

The access token for the set user settings request.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

Specifies the options for MFA (e.g., email or phone number).

- */ -@property (nonatomic, strong) NSArray * _Nullable MFAOptions; - -@end - -/** -

The response from the server for a set user settings request.

- */ -@interface AWSCognitoIdentityProviderSetUserSettingsResponse : AWSModel - - -@end - -/** -

Represents the request to register a user.

- Required parameters: [ClientId, Username, Password] - */ -@interface AWSCognitoIdentityProviderSignUpRequest : AWSRequest - - -/** -

The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -/** -

The ID of the client associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The password of the user you wish to register.

- */ -@property (nonatomic, strong) NSString * _Nullable password; - -/** -

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

- */ -@property (nonatomic, strong) NSString * _Nullable secretHash; - -/** -

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributes; - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserContextDataType * _Nullable userContextData; - -/** -

The user name of the user you wish to register.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -/** -

The validation data in the request to register a user.

- */ -@property (nonatomic, strong) NSArray * _Nullable validationData; - -@end - -/** -

The response from the server for a registration request.

- Required parameters: [UserConfirmed, UserSub] - */ -@interface AWSCognitoIdentityProviderSignUpResponse : AWSModel - - -/** -

The code delivery details returned by the server response to the user registration request.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCodeDeliveryDetailsType * _Nullable codeDeliveryDetails; - -/** -

A response from the server indicating that a user registration has been confirmed.

- */ -@property (nonatomic, strong) NSNumber * _Nullable userConfirmed; - -/** -

The UUID of the authenticated user. This is not the same as username.

- */ -@property (nonatomic, strong) NSString * _Nullable userSub; - -@end - -/** -

The SMS configuration type.

- Required parameters: [SnsCallerArn] - */ -@interface AWSCognitoIdentityProviderSmsConfigurationType : AWSModel - - -/** -

The external ID.

- */ -@property (nonatomic, strong) NSString * _Nullable externalId; - -/** -

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.

- */ -@property (nonatomic, strong) NSString * _Nullable snsCallerArn; - -@end - -/** -

The SMS text message multi-factor authentication (MFA) configuration type.

- */ -@interface AWSCognitoIdentityProviderSmsMfaConfigType : AWSModel - - -/** -

The SMS authentication message.

- */ -@property (nonatomic, strong) NSString * _Nullable smsAuthenticationMessage; - -/** -

The SMS configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSmsConfigurationType * _Nullable smsConfiguration; - -@end - -/** -

The type used for enabling software token MFA at the user pool level.

- */ -@interface AWSCognitoIdentityProviderSoftwareTokenMfaConfigType : AWSModel - - -/** -

Specifies whether software token MFA is enabled.

- */ -@property (nonatomic, strong) NSNumber * _Nullable enabled; - -@end - -/** -

The type used for enabling software token MFA at the user level.

- */ -@interface AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType : AWSModel - - -/** -

Specifies whether software token MFA is enabled.

- */ -@property (nonatomic, strong) NSNumber * _Nullable enabled; - -/** -

The preferred MFA method.

- */ -@property (nonatomic, strong) NSNumber * _Nullable preferredMfa; - -@end - -/** -

Represents the request to start the user import job.

- Required parameters: [UserPoolId, JobId] - */ -@interface AWSCognitoIdentityProviderStartUserImportJobRequest : AWSRequest - - -/** -

The job ID for the user import job.

- */ -@property (nonatomic, strong) NSString * _Nullable jobId; - -/** -

The user pool ID for the user pool that the users are being imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server to the request to start the user import job.

- */ -@interface AWSCognitoIdentityProviderStartUserImportJobResponse : AWSModel - - -/** -

The job object that represents the user import job.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserImportJobType * _Nullable userImportJob; - -@end - -/** -

Represents the request to stop the user import job.

- Required parameters: [UserPoolId, JobId] - */ -@interface AWSCognitoIdentityProviderStopUserImportJobRequest : AWSRequest - - -/** -

The job ID for the user import job.

- */ -@property (nonatomic, strong) NSString * _Nullable jobId; - -/** -

The user pool ID for the user pool that the users are being imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Represents the response from the server to the request to stop the user import job.

- */ -@interface AWSCognitoIdentityProviderStopUserImportJobResponse : AWSModel - - -/** -

The job object that represents the user import job.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserImportJobType * _Nullable userImportJob; - -@end - -/** -

The constraints associated with a string attribute.

- */ -@interface AWSCognitoIdentityProviderStringAttributeConstraintsType : AWSModel - - -/** -

The maximum length.

- */ -@property (nonatomic, strong) NSString * _Nullable maxLength; - -/** -

The minimum length.

- */ -@property (nonatomic, strong) NSString * _Nullable minLength; - -@end - -/** -

A container for the UI customization information for a user pool's built-in app UI.

- */ -@interface AWSCognitoIdentityProviderUICustomizationType : AWSModel - - -/** -

The CSS values in the UI customization.

- */ -@property (nonatomic, strong) NSString * _Nullable CSS; - -/** -

The CSS version number.

- */ -@property (nonatomic, strong) NSString * _Nullable CSSVersion; - -/** -

The client ID for the client app.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The creation date for the UI customization.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

The logo image for the UI customization.

- */ -@property (nonatomic, strong) NSString * _Nullable imageUrl; - -/** -

The last-modified date for the UI customization.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest : AWSRequest - - -/** -

The event ID.

- */ -@property (nonatomic, strong) NSString * _Nullable eventId; - -/** -

The feedback token.

- */ -@property (nonatomic, strong) NSString * _Nullable feedbackToken; - -/** -

The authentication event feedback value.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderFeedbackValueType feedbackValue; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The user pool username.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse : AWSModel - - -@end - -/** -

Represents the request to update the device status.

- Required parameters: [AccessToken, DeviceKey] - */ -@interface AWSCognitoIdentityProviderUpdateDeviceStatusRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The device key.

- */ -@property (nonatomic, strong) NSString * _Nullable deviceKey; - -/** -

The status of whether a device is remembered.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderDeviceRememberedStatusType deviceRememberedStatus; - -@end - -/** -

The response to the request to update the device status.

- */ -@interface AWSCognitoIdentityProviderUpdateDeviceStatusResponse : AWSModel - - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateGroupRequest : AWSRequest - - -/** -

A string containing the new description of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable detail; - -/** -

The name of the group.

- */ -@property (nonatomic, strong) NSString * _Nullable groupName; - -/** -

The new precedence value for the group. For more information about this parameter, see .

- */ -@property (nonatomic, strong) NSNumber * _Nullable precedence; - -/** -

The new role ARN for the group. This is used for setting the cognito:roles and cognito:preferred_role claims in the token.

- */ -@property (nonatomic, strong) NSString * _Nullable roleArn; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateGroupResponse : AWSModel - - -/** -

The group object for the group.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderGroupType * _Nullable group; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateIdentityProviderRequest : AWSRequest - - -/** -

The identity provider attribute mapping to be changed.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable attributeMapping; - -/** -

A list of identity provider identifiers.

- */ -@property (nonatomic, strong) NSArray * _Nullable idpIdentifiers; - -/** -

The identity provider details to be updated, such as MetadataURL and MetadataFile.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable providerDetails; - -/** -

The identity provider name.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -/** -

The user pool ID.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateIdentityProviderResponse : AWSModel - - -/** -

The identity provider object.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderIdentityProviderType * _Nullable identityProvider; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateResourceServerRequest : AWSRequest - - -/** -

The identifier for the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable identifier; - -/** -

The name of the resource server.

- */ -@property (nonatomic, strong) NSString * _Nullable name; - -/** -

The scope values to be set for the resource server.

- */ -@property (nonatomic, strong) NSArray * _Nullable scopes; - -/** -

The user pool ID for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderUpdateResourceServerResponse : AWSModel - - -/** -

The resource server.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderResourceServerType * _Nullable resourceServer; - -@end - -/** -

Represents the request to update user attributes.

- Required parameters: [UserAttributes, AccessToken] - */ -@interface AWSCognitoIdentityProviderUpdateUserAttributesRequest : AWSRequest - - -/** -

The access token for the request to update user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

- */ -@property (nonatomic, strong) NSArray * _Nullable userAttributes; - -@end - -/** -

Represents the response from the server for the request to update user attributes.

- */ -@interface AWSCognitoIdentityProviderUpdateUserAttributesResponse : AWSModel - - -/** -

The code delivery details list from the server for the request to update user attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable codeDeliveryDetailsList; - -@end - -/** -

Represents the request to update the user pool client.

- Required parameters: [UserPoolId, ClientId] - */ -@interface AWSCognitoIdentityProviderUpdateUserPoolClientRequest : AWSRequest - - -/** -

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

- */ -@property (nonatomic, strong) NSArray * _Nullable allowedOAuthFlows; - -/** -

Set to TRUE if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

- */ -@property (nonatomic, strong) NSNumber * _Nullable allowedOAuthFlowsUserPoolClient; - -/** -

A list of allowed OAuth scopes. Currently supported values are "phone", "email", "openid", and "Cognito".

- */ -@property (nonatomic, strong) NSArray * _Nullable allowedOAuthScopes; - -/** -

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsConfigurationType * _Nullable analyticsConfiguration; - -/** -

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

- */ -@property (nonatomic, strong) NSArray * _Nullable callbackURLs; - -/** -

The ID of the client associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The client name from the update user pool client request.

- */ -@property (nonatomic, strong) NSString * _Nullable clientName; - -/** -

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

- */ -@property (nonatomic, strong) NSString * _Nullable defaultRedirectURI; - -/** -

Explicit authentication flows.

- */ -@property (nonatomic, strong) NSArray * _Nullable explicitAuthFlows; - -/** -

A list of allowed logout URLs for the identity providers.

- */ -@property (nonatomic, strong) NSArray * _Nullable logoutURLs; - -/** -

The read-only attributes of the user pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable readAttributes; - -/** -

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

- */ -@property (nonatomic, strong) NSNumber * _Nullable refreshTokenValidity; - -/** -

A list of provider names for the identity providers that are supported on this client.

- */ -@property (nonatomic, strong) NSArray * _Nullable supportedIdentityProviders; - -/** -

The user pool ID for the user pool where you want to update the user pool client.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The writeable attributes of the user pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable writeAttributes; - -@end - -/** -

Represents the response from the server to the request to update the user pool client.

- */ -@interface AWSCognitoIdentityProviderUpdateUserPoolClientResponse : AWSModel - - -/** -

The user pool client value from the response from the server when an update user pool client request is made.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolClientType * _Nullable userPoolClient; - -@end - -/** -

The UpdateUserPoolDomain request input.

- Required parameters: [Domain, UserPoolId, CustomDomainConfig] - */ -@interface AWSCognitoIdentityProviderUpdateUserPoolDomainRequest : AWSRequest - - -/** -

The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderCustomDomainConfigType * _Nullable customDomainConfig; - -/** -

The domain name for the custom domain that hosts the sign-up and sign-in pages for your application. For example: auth.example.com.

This string can include only lowercase letters, numbers, and hyphens. Do not use a hyphen for the first or last character. Use periods to separate subdomain names.

- */ -@property (nonatomic, strong) NSString * _Nullable domain; - -/** -

The ID of the user pool that is associated with the custom domain that you are updating the certificate for.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

The UpdateUserPoolDomain response output.

- */ -@interface AWSCognitoIdentityProviderUpdateUserPoolDomainResponse : AWSModel - - -/** -

The Amazon CloudFront endpoint that Amazon Cognito set up when you added the custom domain to your user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable cloudFrontDomain; - -@end - -/** -

Represents the request to update the user pool.

- Required parameters: [UserPoolId] - */ -@interface AWSCognitoIdentityProviderUpdateUserPoolRequest : AWSRequest - - -/** -

The configuration for AdminCreateUser requests.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAdminCreateUserConfigType * _Nullable adminCreateUserConfig; - -/** -

The attributes that are automatically verified when the Amazon Cognito service makes a request to update user pools.

- */ -@property (nonatomic, strong) NSArray * _Nullable autoVerifiedAttributes; - -/** -

Device configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderDeviceConfigurationType * _Nullable deviceConfiguration; - -/** -

Email configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderEmailConfigurationType * _Nullable emailConfiguration; - -/** -

The contents of the email verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable emailVerificationMessage; - -/** -

The subject of the email verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable emailVerificationSubject; - -/** -

The AWS Lambda configuration information from the request to update the user pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderLambdaConfigType * _Nullable lambdaConfig; - -/** -

Can be one of the following values:

  • OFF - MFA tokens are not required and cannot be specified during user registration.

  • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

  • OPTIONAL - Users have the option when registering to create an MFA token.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserPoolMfaType mfaConfiguration; - -/** -

A container with the policies you wish to update in a user pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolPolicyType * _Nullable policies; - -/** -

The contents of the SMS authentication message.

- */ -@property (nonatomic, strong) NSString * _Nullable smsAuthenticationMessage; - -/** -

SMS configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSmsConfigurationType * _Nullable smsConfiguration; - -/** -

A container with information about the SMS verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable smsVerificationMessage; - -/** -

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value "AUDIT".

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolAddOnsType * _Nullable userPoolAddOns; - -/** -

The user pool ID for the user pool you want to update.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool

- */ -@property (nonatomic, strong) NSDictionary * _Nullable userPoolTags; - -/** -

The template for verification messages.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderVerificationMessageTemplateType * _Nullable verificationMessageTemplate; - -@end - -/** -

Represents the response from the server when you make a request to update the user pool.

- */ -@interface AWSCognitoIdentityProviderUpdateUserPoolResponse : AWSModel - - -@end - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@interface AWSCognitoIdentityProviderUserContextDataType : AWSModel - - -/** -

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

- */ -@property (nonatomic, strong) NSString * _Nullable encodedData; - -@end - -/** -

The user import job type.

- */ -@interface AWSCognitoIdentityProviderUserImportJobType : AWSModel - - -/** -

The role ARN for the Amazon CloudWatch Logging role for the user import job. For more information, see "Creating the CloudWatch Logs IAM Role" in the Amazon Cognito Developer Guide.

- */ -@property (nonatomic, strong) NSString * _Nullable cloudWatchLogsRoleArn; - -/** -

The date when the user import job was completed.

- */ -@property (nonatomic, strong) NSDate * _Nullable completionDate; - -/** -

The message returned when the user import job is completed.

- */ -@property (nonatomic, strong) NSString * _Nullable completionMessage; - -/** -

The date the user import job was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

The number of users that could not be imported.

- */ -@property (nonatomic, strong) NSNumber * _Nullable failedUsers; - -/** -

The number of users that were successfully imported.

- */ -@property (nonatomic, strong) NSNumber * _Nullable importedUsers; - -/** -

The job ID for the user import job.

- */ -@property (nonatomic, strong) NSString * _Nullable jobId; - -/** -

The job name for the user import job.

- */ -@property (nonatomic, strong) NSString * _Nullable jobName; - -/** -

The pre-signed URL to be used to upload the .csv file.

- */ -@property (nonatomic, strong) NSString * _Nullable preSignedUrl; - -/** -

The number of users that were skipped.

- */ -@property (nonatomic, strong) NSNumber * _Nullable skippedUsers; - -/** -

The date when the user import job was started.

- */ -@property (nonatomic, strong) NSDate * _Nullable startDate; - -/** -

The status of the user import job. One of the following:

  • Created - The job was created but not started.

  • Pending - A transition state. You have started the job, but it has not begun importing users yet.

  • InProgress - The job has started, and users are being imported.

  • Stopping - You have stopped the job, but the job has not stopped importing users yet.

  • Stopped - You have stopped the job, and the job has stopped importing users.

  • Succeeded - The job has completed successfully.

  • Failed - The job has stopped due to an error.

  • Expired - You created a job, but did not start the job within 24-48 hours. All data associated with the job was deleted, and the job cannot be started.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserImportJobStatusType status; - -/** -

The user pool ID for the user pool that the users are being imported into.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

The user pool add-ons type.

- Required parameters: [AdvancedSecurityMode] - */ -@interface AWSCognitoIdentityProviderUserPoolAddOnsType : AWSModel - - -/** -

The advanced security mode.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderAdvancedSecurityModeType advancedSecurityMode; - -@end - -/** -

The description of the user pool client.

- */ -@interface AWSCognitoIdentityProviderUserPoolClientDescription : AWSModel - - -/** -

The ID of the client associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The client name from the user pool client description.

- */ -@property (nonatomic, strong) NSString * _Nullable clientName; - -/** -

The user pool ID for the user pool where you want to describe the user pool client.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -@end - -/** -

Contains information about a user pool client.

- */ -@interface AWSCognitoIdentityProviderUserPoolClientType : AWSModel - - -/** -

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

- */ -@property (nonatomic, strong) NSArray * _Nullable allowedOAuthFlows; - -/** -

Set to TRUE if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

- */ -@property (nonatomic, strong) NSNumber * _Nullable allowedOAuthFlowsUserPoolClient; - -/** -

A list of allowed OAuth scopes. Currently supported values are "phone", "email", "openid", and "Cognito".

- */ -@property (nonatomic, strong) NSArray * _Nullable allowedOAuthScopes; - -/** -

The Amazon Pinpoint analytics configuration for the user pool client.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAnalyticsConfigurationType * _Nullable analyticsConfiguration; - -/** -

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

- */ -@property (nonatomic, strong) NSArray * _Nullable callbackURLs; - -/** -

The ID of the client associated with the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The client name from the user pool request of the client type.

- */ -@property (nonatomic, strong) NSString * _Nullable clientName; - -/** -

The client secret from the user pool request of the client type.

- */ -@property (nonatomic, strong) NSString * _Nullable clientSecret; - -/** -

The date the user pool client was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

- */ -@property (nonatomic, strong) NSString * _Nullable defaultRedirectURI; - -/** -

The explicit authentication flows.

- */ -@property (nonatomic, strong) NSArray * _Nullable explicitAuthFlows; - -/** -

The date the user pool client was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

A list of allowed logout URLs for the identity providers.

- */ -@property (nonatomic, strong) NSArray * _Nullable logoutURLs; - -/** -

The Read-only attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable readAttributes; - -/** -

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

- */ -@property (nonatomic, strong) NSNumber * _Nullable refreshTokenValidity; - -/** -

A list of provider names for the identity providers that are supported on this client.

- */ -@property (nonatomic, strong) NSArray * _Nullable supportedIdentityProviders; - -/** -

The user pool ID for the user pool client.

- */ -@property (nonatomic, strong) NSString * _Nullable userPoolId; - -/** -

The writeable attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable writeAttributes; - -@end - -/** -

A user pool description.

- */ -@interface AWSCognitoIdentityProviderUserPoolDescriptionType : AWSModel - - -/** -

The date the user pool description was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

The ID in a user pool description.

- */ -@property (nonatomic, strong) NSString * _Nullable identifier; - -/** -

The AWS Lambda configuration information in a user pool description.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderLambdaConfigType * _Nullable lambdaConfig; - -/** -

The date the user pool description was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

The name in a user pool description.

- */ -@property (nonatomic, strong) NSString * _Nullable name; - -/** -

The user pool status in a user pool description.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderStatusType status; - -@end - -/** -

The policy associated with a user pool.

- */ -@interface AWSCognitoIdentityProviderUserPoolPolicyType : AWSModel - - -/** -

The password policy.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderPasswordPolicyType * _Nullable passwordPolicy; - -@end - -/** -

A container for information about the user pool.

- */ -@interface AWSCognitoIdentityProviderUserPoolType : AWSModel - - -/** -

The configuration for AdminCreateUser requests.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderAdminCreateUserConfigType * _Nullable adminCreateUserConfig; - -/** -

Specifies the attributes that are aliased in a user pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable aliasAttributes; - -/** -

The Amazon Resource Name (ARN) for the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable arn; - -/** -

Specifies the attributes that are auto-verified in a user pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable autoVerifiedAttributes; - -/** -

The date the user pool was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** - - */ -@property (nonatomic, strong) NSString * _Nullable customDomain; - -/** -

The device configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderDeviceConfigurationType * _Nullable deviceConfiguration; - -/** -

Holds the domain prefix if the user pool has a domain associated with it.

- */ -@property (nonatomic, strong) NSString * _Nullable domain; - -/** -

The email configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderEmailConfigurationType * _Nullable emailConfiguration; - -/** -

The reason why the email configuration cannot send the messages to your users.

- */ -@property (nonatomic, strong) NSString * _Nullable emailConfigurationFailure; - -/** -

The contents of the email verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable emailVerificationMessage; - -/** -

The subject of the email verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable emailVerificationSubject; - -/** -

A number estimating the size of the user pool.

- */ -@property (nonatomic, strong) NSNumber * _Nullable estimatedNumberOfUsers; - -/** -

The ID of the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable identifier; - -/** -

The AWS Lambda triggers associated with the user pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderLambdaConfigType * _Nullable lambdaConfig; - -/** -

The date the user pool was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

Can be one of the following values:

  • OFF - MFA tokens are not required and cannot be specified during user registration.

  • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

  • OPTIONAL - Users have the option when registering to create an MFA token.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserPoolMfaType mfaConfiguration; - -/** -

The name of the user pool.

- */ -@property (nonatomic, strong) NSString * _Nullable name; - -/** -

The policies associated with the user pool.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolPolicyType * _Nullable policies; - -/** -

A container with the schema attributes of a user pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable schemaAttributes; - -/** -

The contents of the SMS authentication message.

- */ -@property (nonatomic, strong) NSString * _Nullable smsAuthenticationMessage; - -/** -

The SMS configuration.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderSmsConfigurationType * _Nullable smsConfiguration; - -/** -

The reason why the SMS configuration cannot send the messages to your users.

- */ -@property (nonatomic, strong) NSString * _Nullable smsConfigurationFailure; - -/** -

The contents of the SMS verification message.

- */ -@property (nonatomic, strong) NSString * _Nullable smsVerificationMessage; - -/** -

The status of a user pool.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderStatusType status; - -/** -

The user pool add-ons.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderUserPoolAddOnsType * _Nullable userPoolAddOns; - -/** -

The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool

- */ -@property (nonatomic, strong) NSDictionary * _Nullable userPoolTags; - -/** -

Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

- */ -@property (nonatomic, strong) NSArray * _Nullable usernameAttributes; - -/** -

The template for verification messages.

- */ -@property (nonatomic, strong) AWSCognitoIdentityProviderVerificationMessageTemplateType * _Nullable verificationMessageTemplate; - -@end - -/** -

The user type.

- */ -@interface AWSCognitoIdentityProviderUserType : AWSModel - - -/** -

A container with information about the user type attributes.

- */ -@property (nonatomic, strong) NSArray * _Nullable attributes; - -/** -

Specifies whether the user is enabled.

- */ -@property (nonatomic, strong) NSNumber * _Nullable enabled; - -/** -

The MFA options for the user.

- */ -@property (nonatomic, strong) NSArray * _Nullable MFAOptions; - -/** -

The creation date of the user.

- */ -@property (nonatomic, strong) NSDate * _Nullable userCreateDate; - -/** -

The last modified date of the user.

- */ -@property (nonatomic, strong) NSDate * _Nullable userLastModifiedDate; - -/** -

The user status. Can be one of the following:

  • UNCONFIRMED - User has been created but not confirmed.

  • CONFIRMED - User has been confirmed.

  • ARCHIVED - User is no longer active.

  • COMPROMISED - User is disabled due to a potential security threat.

  • UNKNOWN - User status is not known.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderUserStatusType userStatus; - -/** -

The user name of the user you wish to describe.

- */ -@property (nonatomic, strong) NSString * _Nullable username; - -@end - -/** -

The template for verification messages.

- */ -@interface AWSCognitoIdentityProviderVerificationMessageTemplateType : AWSModel - - -/** -

The default email option.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderDefaultEmailOptionType defaultEmailOption; - -/** -

The email message template.

- */ -@property (nonatomic, strong) NSString * _Nullable emailMessage; - -/** -

The email message template for sending a confirmation link to the user.

- */ -@property (nonatomic, strong) NSString * _Nullable emailMessageByLink; - -/** -

The subject line for the email message template.

- */ -@property (nonatomic, strong) NSString * _Nullable emailSubject; - -/** -

The subject line for the email message template for sending a confirmation link to the user.

- */ -@property (nonatomic, strong) NSString * _Nullable emailSubjectByLink; - -/** -

The SMS message template.

- */ -@property (nonatomic, strong) NSString * _Nullable smsMessage; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderVerifySoftwareTokenRequest : AWSRequest - - -/** -

The access token.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The friendly device name.

- */ -@property (nonatomic, strong) NSString * _Nullable friendlyDeviceName; - -/** -

The session which should be passed both ways in challenge-response calls to the service.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -/** -

The one time password computed using the secret code returned by

- */ -@property (nonatomic, strong) NSString * _Nullable userCode; - -@end - -/** - - */ -@interface AWSCognitoIdentityProviderVerifySoftwareTokenResponse : AWSModel - - -/** -

The session which should be passed both ways in challenge-response calls to the service.

- */ -@property (nonatomic, strong) NSString * _Nullable session; - -/** -

The status of the verify software token.

- */ -@property (nonatomic, assign) AWSCognitoIdentityProviderVerifySoftwareTokenResponseType status; - -@end - -/** -

Represents the request to verify user attributes.

- Required parameters: [AccessToken, AttributeName, Code] - */ -@interface AWSCognitoIdentityProviderVerifyUserAttributeRequest : AWSRequest - - -/** -

Represents the access token of the request to verify user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable accessToken; - -/** -

The attribute name in the request to verify user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable attributeName; - -/** -

The verification code in the request to verify user attributes.

- */ -@property (nonatomic, strong) NSString * _Nullable code; - -@end - -/** -

A container representing the response from the server from the request to verify user attributes.

- */ -@interface AWSCognitoIdentityProviderVerifyUserAttributeResponse : AWSModel - - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderModel.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderModel.m deleted file mode 100644 index aeeefca..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderModel.m +++ /dev/null @@ -1,4995 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentityProviderModel.h" -#import - -NSString *const AWSCognitoIdentityProviderErrorDomain = @"com.amazonaws.AWSCognitoIdentityProviderErrorDomain"; - -@implementation AWSCognitoIdentityProviderAccountTakeoverActionType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"eventAction" : @"EventAction", - @"notify" : @"Notify", - }; -} - -+ (NSValueTransformer *)eventActionJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"BLOCK"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAccountTakeoverEventActionTypeBlock); - } - if ([value caseInsensitiveCompare:@"MFA_IF_CONFIGURED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAccountTakeoverEventActionTypeMfaIfConfigured); - } - if ([value caseInsensitiveCompare:@"MFA_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAccountTakeoverEventActionTypeMfaRequired); - } - if ([value caseInsensitiveCompare:@"NO_ACTION"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAccountTakeoverEventActionTypeNoAction); - } - return @(AWSCognitoIdentityProviderAccountTakeoverEventActionTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderAccountTakeoverEventActionTypeBlock: - return @"BLOCK"; - case AWSCognitoIdentityProviderAccountTakeoverEventActionTypeMfaIfConfigured: - return @"MFA_IF_CONFIGURED"; - case AWSCognitoIdentityProviderAccountTakeoverEventActionTypeMfaRequired: - return @"MFA_REQUIRED"; - case AWSCognitoIdentityProviderAccountTakeoverEventActionTypeNoAction: - return @"NO_ACTION"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderAccountTakeoverActionsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"highAction" : @"HighAction", - @"lowAction" : @"LowAction", - @"mediumAction" : @"MediumAction", - }; -} - -+ (NSValueTransformer *)highActionJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAccountTakeoverActionType class]]; -} - -+ (NSValueTransformer *)lowActionJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAccountTakeoverActionType class]]; -} - -+ (NSValueTransformer *)mediumActionJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAccountTakeoverActionType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAccountTakeoverRiskConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"actions" : @"Actions", - @"notifyConfiguration" : @"NotifyConfiguration", - }; -} - -+ (NSValueTransformer *)actionsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAccountTakeoverActionsType class]]; -} - -+ (NSValueTransformer *)notifyConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderNotifyConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAddCustomAttributesRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"customAttributes" : @"CustomAttributes", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)customAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderSchemaAttributeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAddCustomAttributesResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminAddUserToGroupRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"groupName" : @"GroupName", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminConfirmSignUpRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminConfirmSignUpResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminCreateUserConfigType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"allowAdminCreateUserOnly" : @"AllowAdminCreateUserOnly", - @"inviteMessageTemplate" : @"InviteMessageTemplate", - @"unusedAccountValidityDays" : @"UnusedAccountValidityDays", - }; -} - -+ (NSValueTransformer *)inviteMessageTemplateJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderMessageTemplateType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminCreateUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"desiredDeliveryMediums" : @"DesiredDeliveryMediums", - @"forceAliasCreation" : @"ForceAliasCreation", - @"messageAction" : @"MessageAction", - @"temporaryPassword" : @"TemporaryPassword", - @"userAttributes" : @"UserAttributes", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - @"validationData" : @"ValidationData", - }; -} - -+ (NSValueTransformer *)messageActionJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"RESEND"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderMessageActionTypeResend); - } - if ([value caseInsensitiveCompare:@"SUPPRESS"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderMessageActionTypeSuppress); - } - return @(AWSCognitoIdentityProviderMessageActionTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderMessageActionTypeResend: - return @"RESEND"; - case AWSCognitoIdentityProviderMessageActionTypeSuppress: - return @"SUPPRESS"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)userAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -+ (NSValueTransformer *)validationDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminCreateUserResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"user" : @"User", - }; -} - -+ (NSValueTransformer *)userJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userAttributeNames" : @"UserAttributeNames", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminDeleteUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminDisableProviderForUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"user" : @"User", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)userJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderProviderUserIdentifierType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminDisableProviderForUserResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminDisableUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminDisableUserResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminEnableUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminEnableUserResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminForgetDeviceRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"deviceKey" : @"DeviceKey", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminGetDeviceRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"deviceKey" : @"DeviceKey", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminGetDeviceResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"device" : @"Device", - }; -} - -+ (NSValueTransformer *)deviceJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminGetUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminGetUserResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"enabled" : @"Enabled", - @"MFAOptions" : @"MFAOptions", - @"preferredMfaSetting" : @"PreferredMfaSetting", - @"userAttributes" : @"UserAttributes", - @"userCreateDate" : @"UserCreateDate", - @"userLastModifiedDate" : @"UserLastModifiedDate", - @"userMFASettingList" : @"UserMFASettingList", - @"userStatus" : @"UserStatus", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)MFAOptionsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderMFAOptionType class]]; -} - -+ (NSValueTransformer *)userAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -+ (NSValueTransformer *)userCreateDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)userLastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)userStatusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"UNCONFIRMED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeUnconfirmed); - } - if ([value caseInsensitiveCompare:@"CONFIRMED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeConfirmed); - } - if ([value caseInsensitiveCompare:@"ARCHIVED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeArchived); - } - if ([value caseInsensitiveCompare:@"COMPROMISED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeCompromised); - } - if ([value caseInsensitiveCompare:@"UNKNOWN"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeUnknown); - } - if ([value caseInsensitiveCompare:@"RESET_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeResetRequired); - } - if ([value caseInsensitiveCompare:@"FORCE_CHANGE_PASSWORD"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeForceChangePassword); - } - return @(AWSCognitoIdentityProviderUserStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserStatusTypeUnconfirmed: - return @"UNCONFIRMED"; - case AWSCognitoIdentityProviderUserStatusTypeConfirmed: - return @"CONFIRMED"; - case AWSCognitoIdentityProviderUserStatusTypeArchived: - return @"ARCHIVED"; - case AWSCognitoIdentityProviderUserStatusTypeCompromised: - return @"COMPROMISED"; - case AWSCognitoIdentityProviderUserStatusTypeUnknown: - return @"UNKNOWN"; - case AWSCognitoIdentityProviderUserStatusTypeResetRequired: - return @"RESET_REQUIRED"; - case AWSCognitoIdentityProviderUserStatusTypeForceChangePassword: - return @"FORCE_CHANGE_PASSWORD"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminInitiateAuthRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"authFlow" : @"AuthFlow", - @"authParameters" : @"AuthParameters", - @"clientId" : @"ClientId", - @"clientMetadata" : @"ClientMetadata", - @"contextData" : @"ContextData", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)authFlowJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"USER_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeUserSrpAuth); - } - if ([value caseInsensitiveCompare:@"REFRESH_TOKEN_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeRefreshTokenAuth); - } - if ([value caseInsensitiveCompare:@"REFRESH_TOKEN"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeRefreshToken); - } - if ([value caseInsensitiveCompare:@"CUSTOM_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeCustomAuth); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"USER_PASSWORD_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeUserPasswordAuth); - } - return @(AWSCognitoIdentityProviderAuthFlowTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderAuthFlowTypeUserSrpAuth: - return @"USER_SRP_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeRefreshTokenAuth: - return @"REFRESH_TOKEN_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeRefreshToken: - return @"REFRESH_TOKEN"; - case AWSCognitoIdentityProviderAuthFlowTypeCustomAuth: - return @"CUSTOM_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeUserPasswordAuth: - return @"USER_PASSWORD_AUTH"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)contextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminInitiateAuthResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"authenticationResult" : @"AuthenticationResult", - @"challengeName" : @"ChallengeName", - @"challengeParameters" : @"ChallengeParameters", - @"session" : @"Session", - }; -} - -+ (NSValueTransformer *)authenticationResultJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAuthenticationResultType class]]; -} - -+ (NSValueTransformer *)challengeNameJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSmsMfa); - } - if ([value caseInsensitiveCompare:@"SOFTWARE_TOKEN_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa); - } - if ([value caseInsensitiveCompare:@"SELECT_MFA_TYPE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType); - } - if ([value caseInsensitiveCompare:@"MFA_SETUP"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeMfaSetup); - } - if ([value caseInsensitiveCompare:@"PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"CUSTOM_CHALLENGE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge); - } - if ([value caseInsensitiveCompare:@"DEVICE_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth); - } - if ([value caseInsensitiveCompare:@"DEVICE_PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"NEW_PASSWORD_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired); - } - return @(AWSCognitoIdentityProviderChallengeNameTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeNameTypeSmsMfa: - return @"SMS_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa: - return @"SOFTWARE_TOKEN_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType: - return @"SELECT_MFA_TYPE"; - case AWSCognitoIdentityProviderChallengeNameTypeMfaSetup: - return @"MFA_SETUP"; - case AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier: - return @"PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge: - return @"CUSTOM_CHALLENGE"; - case AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth: - return @"DEVICE_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier: - return @"DEVICE_PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired: - return @"NEW_PASSWORD_REQUIRED"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminLinkProviderForUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"destinationUser" : @"DestinationUser", - @"sourceUser" : @"SourceUser", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)destinationUserJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderProviderUserIdentifierType class]]; -} - -+ (NSValueTransformer *)sourceUserJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderProviderUserIdentifierType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminLinkProviderForUserResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminListDevicesRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"limit" : @"Limit", - @"paginationToken" : @"PaginationToken", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminListDevicesResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"devices" : @"Devices", - @"paginationToken" : @"PaginationToken", - }; -} - -+ (NSValueTransformer *)devicesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminListGroupsForUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"limit" : @"Limit", - @"nextToken" : @"NextToken", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminListGroupsForUserResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"groups" : @"Groups", - @"nextToken" : @"NextToken", - }; -} - -+ (NSValueTransformer *)groupsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderGroupType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminListUserAuthEventsRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminListUserAuthEventsResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"authEvents" : @"AuthEvents", - @"nextToken" : @"NextToken", - }; -} - -+ (NSValueTransformer *)authEventsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAuthEventType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"groupName" : @"GroupName", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminResetUserPasswordRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminResetUserPasswordResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"challengeName" : @"ChallengeName", - @"challengeResponses" : @"ChallengeResponses", - @"clientId" : @"ClientId", - @"contextData" : @"ContextData", - @"session" : @"Session", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)challengeNameJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSmsMfa); - } - if ([value caseInsensitiveCompare:@"SOFTWARE_TOKEN_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa); - } - if ([value caseInsensitiveCompare:@"SELECT_MFA_TYPE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType); - } - if ([value caseInsensitiveCompare:@"MFA_SETUP"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeMfaSetup); - } - if ([value caseInsensitiveCompare:@"PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"CUSTOM_CHALLENGE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge); - } - if ([value caseInsensitiveCompare:@"DEVICE_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth); - } - if ([value caseInsensitiveCompare:@"DEVICE_PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"NEW_PASSWORD_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired); - } - return @(AWSCognitoIdentityProviderChallengeNameTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeNameTypeSmsMfa: - return @"SMS_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa: - return @"SOFTWARE_TOKEN_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType: - return @"SELECT_MFA_TYPE"; - case AWSCognitoIdentityProviderChallengeNameTypeMfaSetup: - return @"MFA_SETUP"; - case AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier: - return @"PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge: - return @"CUSTOM_CHALLENGE"; - case AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth: - return @"DEVICE_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier: - return @"DEVICE_PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired: - return @"NEW_PASSWORD_REQUIRED"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)contextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"authenticationResult" : @"AuthenticationResult", - @"challengeName" : @"ChallengeName", - @"challengeParameters" : @"ChallengeParameters", - @"session" : @"Session", - }; -} - -+ (NSValueTransformer *)authenticationResultJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAuthenticationResultType class]]; -} - -+ (NSValueTransformer *)challengeNameJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSmsMfa); - } - if ([value caseInsensitiveCompare:@"SOFTWARE_TOKEN_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa); - } - if ([value caseInsensitiveCompare:@"SELECT_MFA_TYPE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType); - } - if ([value caseInsensitiveCompare:@"MFA_SETUP"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeMfaSetup); - } - if ([value caseInsensitiveCompare:@"PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"CUSTOM_CHALLENGE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge); - } - if ([value caseInsensitiveCompare:@"DEVICE_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth); - } - if ([value caseInsensitiveCompare:@"DEVICE_PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"NEW_PASSWORD_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired); - } - return @(AWSCognitoIdentityProviderChallengeNameTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeNameTypeSmsMfa: - return @"SMS_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa: - return @"SOFTWARE_TOKEN_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType: - return @"SELECT_MFA_TYPE"; - case AWSCognitoIdentityProviderChallengeNameTypeMfaSetup: - return @"MFA_SETUP"; - case AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier: - return @"PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge: - return @"CUSTOM_CHALLENGE"; - case AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth: - return @"DEVICE_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier: - return @"DEVICE_PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired: - return @"NEW_PASSWORD_REQUIRED"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"SMSMfaSettings" : @"SMSMfaSettings", - @"softwareTokenMfaSettings" : @"SoftwareTokenMfaSettings", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)SMSMfaSettingsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSMSMfaSettingsType class]]; -} - -+ (NSValueTransformer *)softwareTokenMfaSettingsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminSetUserSettingsRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"MFAOptions" : @"MFAOptions", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)MFAOptionsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderMFAOptionType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminSetUserSettingsResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"eventId" : @"EventId", - @"feedbackValue" : @"FeedbackValue", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)feedbackValueJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Valid"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderFeedbackValueTypeValid); - } - if ([value caseInsensitiveCompare:@"Invalid"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderFeedbackValueTypeInvalid); - } - return @(AWSCognitoIdentityProviderFeedbackValueTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderFeedbackValueTypeValid: - return @"Valid"; - case AWSCognitoIdentityProviderFeedbackValueTypeInvalid: - return @"Invalid"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"deviceKey" : @"DeviceKey", - @"deviceRememberedStatus" : @"DeviceRememberedStatus", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)deviceRememberedStatusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"remembered"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeviceRememberedStatusTypeRemembered); - } - if ([value caseInsensitiveCompare:@"not_remembered"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeviceRememberedStatusTypeNotRemembered); - } - return @(AWSCognitoIdentityProviderDeviceRememberedStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderDeviceRememberedStatusTypeRemembered: - return @"remembered"; - case AWSCognitoIdentityProviderDeviceRememberedStatusTypeNotRemembered: - return @"not_remembered"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userAttributes" : @"UserAttributes", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)userAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse - -@end - -@implementation AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse - -@end - -@implementation AWSCognitoIdentityProviderAnalyticsConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"applicationId" : @"ApplicationId", - @"externalId" : @"ExternalId", - @"roleArn" : @"RoleArn", - @"userDataShared" : @"UserDataShared", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAnalyticsMetadataType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsEndpointId" : @"AnalyticsEndpointId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAssociateSoftwareTokenRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"session" : @"Session", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAssociateSoftwareTokenResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"secretCode" : @"SecretCode", - @"session" : @"Session", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAttributeType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"name" : @"Name", - @"value" : @"Value", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderAuthEventType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"challengeResponses" : @"ChallengeResponses", - @"creationDate" : @"CreationDate", - @"eventContextData" : @"EventContextData", - @"eventFeedback" : @"EventFeedback", - @"eventId" : @"EventId", - @"eventResponse" : @"EventResponse", - @"eventRisk" : @"EventRisk", - @"eventType" : @"EventType", - }; -} - -+ (NSValueTransformer *)challengeResponsesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderChallengeResponseType class]]; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)eventContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderEventContextDataType class]]; -} - -+ (NSValueTransformer *)eventFeedbackJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderEventFeedbackType class]]; -} - -+ (NSValueTransformer *)eventResponseJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Success"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderEventResponseTypeSuccess); - } - if ([value caseInsensitiveCompare:@"Failure"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderEventResponseTypeFailure); - } - return @(AWSCognitoIdentityProviderEventResponseTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderEventResponseTypeSuccess: - return @"Success"; - case AWSCognitoIdentityProviderEventResponseTypeFailure: - return @"Failure"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)eventRiskJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderEventRiskType class]]; -} - -+ (NSValueTransformer *)eventTypeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SignIn"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderEventTypeSignIn); - } - if ([value caseInsensitiveCompare:@"SignUp"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderEventTypeSignUp); - } - if ([value caseInsensitiveCompare:@"ForgotPassword"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderEventTypeForgotPassword); - } - return @(AWSCognitoIdentityProviderEventTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderEventTypeSignIn: - return @"SignIn"; - case AWSCognitoIdentityProviderEventTypeSignUp: - return @"SignUp"; - case AWSCognitoIdentityProviderEventTypeForgotPassword: - return @"ForgotPassword"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderAuthenticationResultType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"expiresIn" : @"ExpiresIn", - @"idToken" : @"IdToken", - @"latestDeviceMetadata" : @"NewDeviceMetadata", - @"refreshToken" : @"RefreshToken", - @"tokenType" : @"TokenType", - }; -} - -+ (NSValueTransformer *)latestDeviceMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderLatestDeviceMetadataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderChallengeResponseType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"challengeName" : @"ChallengeName", - @"challengeResponse" : @"ChallengeResponse", - }; -} - -+ (NSValueTransformer *)challengeNameJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Password"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNamePassword); - } - if ([value caseInsensitiveCompare:@"Mfa"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameMfa); - } - return @(AWSCognitoIdentityProviderChallengeNameUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeNamePassword: - return @"Password"; - case AWSCognitoIdentityProviderChallengeNameMfa: - return @"Mfa"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)challengeResponseJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Success"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeResponseSuccess); - } - if ([value caseInsensitiveCompare:@"Failure"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeResponseFailure); - } - return @(AWSCognitoIdentityProviderChallengeResponseUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeResponseSuccess: - return @"Success"; - case AWSCognitoIdentityProviderChallengeResponseFailure: - return @"Failure"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderChangePasswordRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"previousPassword" : @"PreviousPassword", - @"proposedPassword" : @"ProposedPassword", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderChangePasswordResponse - -@end - -@implementation AWSCognitoIdentityProviderCodeDeliveryDetailsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributeName" : @"AttributeName", - @"deliveryMedium" : @"DeliveryMedium", - @"destination" : @"Destination", - }; -} - -+ (NSValueTransformer *)deliveryMediumJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeliveryMediumTypeSms); - } - if ([value caseInsensitiveCompare:@"EMAIL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeliveryMediumTypeEmail); - } - return @(AWSCognitoIdentityProviderDeliveryMediumTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderDeliveryMediumTypeSms: - return @"SMS"; - case AWSCognitoIdentityProviderDeliveryMediumTypeEmail: - return @"EMAIL"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderCompromisedCredentialsActionsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"eventAction" : @"EventAction", - }; -} - -+ (NSValueTransformer *)eventActionJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"BLOCK"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeBlock); - } - if ([value caseInsensitiveCompare:@"NO_ACTION"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeNoAction); - } - return @(AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeBlock: - return @"BLOCK"; - case AWSCognitoIdentityProviderCompromisedCredentialsEventActionTypeNoAction: - return @"NO_ACTION"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderCompromisedCredentialsRiskConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"actions" : @"Actions", - @"eventFilter" : @"EventFilter", - }; -} - -+ (NSValueTransformer *)actionsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCompromisedCredentialsActionsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderConfirmDeviceRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"deviceKey" : @"DeviceKey", - @"deviceName" : @"DeviceName", - @"deviceSecretVerifierConfig" : @"DeviceSecretVerifierConfig", - }; -} - -+ (NSValueTransformer *)deviceSecretVerifierConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceSecretVerifierConfigType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderConfirmDeviceResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userConfirmationNecessary" : @"UserConfirmationNecessary", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderConfirmForgotPasswordRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"clientId" : @"ClientId", - @"confirmationCode" : @"ConfirmationCode", - @"password" : @"Password", - @"secretHash" : @"SecretHash", - @"userContextData" : @"UserContextData", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)userContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderConfirmForgotPasswordResponse - -@end - -@implementation AWSCognitoIdentityProviderConfirmSignUpRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"clientId" : @"ClientId", - @"confirmationCode" : @"ConfirmationCode", - @"forceAliasCreation" : @"ForceAliasCreation", - @"secretHash" : @"SecretHash", - @"userContextData" : @"UserContextData", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)userContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderConfirmSignUpResponse - -@end - -@implementation AWSCognitoIdentityProviderContextDataType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"encodedData" : @"EncodedData", - @"httpHeaders" : @"HttpHeaders", - @"ipAddress" : @"IpAddress", - @"serverName" : @"ServerName", - @"serverPath" : @"ServerPath", - }; -} - -+ (NSValueTransformer *)httpHeadersJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderHttpHeader class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateGroupRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"detail" : @"Description", - @"groupName" : @"GroupName", - @"precedence" : @"Precedence", - @"roleArn" : @"RoleArn", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateGroupResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"group" : @"Group", - }; -} - -+ (NSValueTransformer *)groupJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderGroupType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateIdentityProviderRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributeMapping" : @"AttributeMapping", - @"idpIdentifiers" : @"IdpIdentifiers", - @"providerDetails" : @"ProviderDetails", - @"providerName" : @"ProviderName", - @"providerType" : @"ProviderType", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)providerTypeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SAML"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeSaml); - } - if ([value caseInsensitiveCompare:@"Facebook"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeFacebook); - } - if ([value caseInsensitiveCompare:@"Google"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeGoogle); - } - if ([value caseInsensitiveCompare:@"LoginWithAmazon"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeLoginWithAmazon); - } - if ([value caseInsensitiveCompare:@"OIDC"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeOidc); - } - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderIdentityProviderTypeTypeSaml: - return @"SAML"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeFacebook: - return @"Facebook"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeGoogle: - return @"Google"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeLoginWithAmazon: - return @"LoginWithAmazon"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeOidc: - return @"OIDC"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateIdentityProviderResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityProvider" : @"IdentityProvider", - }; -} - -+ (NSValueTransformer *)identityProviderJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderIdentityProviderType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateResourceServerRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identifier" : @"Identifier", - @"name" : @"Name", - @"scopes" : @"Scopes", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)scopesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderResourceServerScopeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateResourceServerResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"resourceServer" : @"ResourceServer", - }; -} - -+ (NSValueTransformer *)resourceServerJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderResourceServerType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserImportJobRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"cloudWatchLogsRoleArn" : @"CloudWatchLogsRoleArn", - @"jobName" : @"JobName", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserImportJobResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userImportJob" : @"UserImportJob", - }; -} - -+ (NSValueTransformer *)userImportJobJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserImportJobType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserPoolClientRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"allowedOAuthFlows" : @"AllowedOAuthFlows", - @"allowedOAuthFlowsUserPoolClient" : @"AllowedOAuthFlowsUserPoolClient", - @"allowedOAuthScopes" : @"AllowedOAuthScopes", - @"analyticsConfiguration" : @"AnalyticsConfiguration", - @"callbackURLs" : @"CallbackURLs", - @"clientName" : @"ClientName", - @"defaultRedirectURI" : @"DefaultRedirectURI", - @"explicitAuthFlows" : @"ExplicitAuthFlows", - @"generateSecret" : @"GenerateSecret", - @"logoutURLs" : @"LogoutURLs", - @"readAttributes" : @"ReadAttributes", - @"refreshTokenValidity" : @"RefreshTokenValidity", - @"supportedIdentityProviders" : @"SupportedIdentityProviders", - @"userPoolId" : @"UserPoolId", - @"writeAttributes" : @"WriteAttributes", - }; -} - -+ (NSValueTransformer *)analyticsConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserPoolClientResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolClient" : @"UserPoolClient", - }; -} - -+ (NSValueTransformer *)userPoolClientJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolClientType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserPoolDomainRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"customDomainConfig" : @"CustomDomainConfig", - @"domain" : @"Domain", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)customDomainConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCustomDomainConfigType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserPoolDomainResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"cloudFrontDomain" : @"CloudFrontDomain", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserPoolRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"adminCreateUserConfig" : @"AdminCreateUserConfig", - @"aliasAttributes" : @"AliasAttributes", - @"autoVerifiedAttributes" : @"AutoVerifiedAttributes", - @"deviceConfiguration" : @"DeviceConfiguration", - @"emailConfiguration" : @"EmailConfiguration", - @"emailVerificationMessage" : @"EmailVerificationMessage", - @"emailVerificationSubject" : @"EmailVerificationSubject", - @"lambdaConfig" : @"LambdaConfig", - @"mfaConfiguration" : @"MfaConfiguration", - @"policies" : @"Policies", - @"poolName" : @"PoolName", - @"schema" : @"Schema", - @"smsAuthenticationMessage" : @"SmsAuthenticationMessage", - @"smsConfiguration" : @"SmsConfiguration", - @"smsVerificationMessage" : @"SmsVerificationMessage", - @"userPoolAddOns" : @"UserPoolAddOns", - @"userPoolTags" : @"UserPoolTags", - @"usernameAttributes" : @"UsernameAttributes", - @"verificationMessageTemplate" : @"VerificationMessageTemplate", - }; -} - -+ (NSValueTransformer *)adminCreateUserConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAdminCreateUserConfigType class]]; -} - -+ (NSValueTransformer *)deviceConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceConfigurationType class]]; -} - -+ (NSValueTransformer *)emailConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderEmailConfigurationType class]]; -} - -+ (NSValueTransformer *)lambdaConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderLambdaConfigType class]]; -} - -+ (NSValueTransformer *)mfaConfigurationJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"OFF"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOff); - } - if ([value caseInsensitiveCompare:@"ON"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOn); - } - if ([value caseInsensitiveCompare:@"OPTIONAL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOptional); - } - return @(AWSCognitoIdentityProviderUserPoolMfaTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserPoolMfaTypeOff: - return @"OFF"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOn: - return @"ON"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOptional: - return @"OPTIONAL"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)policiesJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolPolicyType class]]; -} - -+ (NSValueTransformer *)schemaJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderSchemaAttributeType class]]; -} - -+ (NSValueTransformer *)smsConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSmsConfigurationType class]]; -} - -+ (NSValueTransformer *)userPoolAddOnsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolAddOnsType class]]; -} - -+ (NSValueTransformer *)verificationMessageTemplateJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderVerificationMessageTemplateType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCreateUserPoolResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPool" : @"UserPool", - }; -} - -+ (NSValueTransformer *)userPoolJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderCustomDomainConfigType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"certificateArn" : @"CertificateArn", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteGroupRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"groupName" : @"GroupName", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteIdentityProviderRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"providerName" : @"ProviderName", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteResourceServerRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identifier" : @"Identifier", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteUserAttributesRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"userAttributeNames" : @"UserAttributeNames", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteUserAttributesResponse - -@end - -@implementation AWSCognitoIdentityProviderDeleteUserPoolClientRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"clientId" : @"ClientId", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteUserPoolDomainRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"domain" : @"Domain", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteUserPoolDomainResponse - -@end - -@implementation AWSCognitoIdentityProviderDeleteUserPoolRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeleteUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeIdentityProviderRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"providerName" : @"ProviderName", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeIdentityProviderResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityProvider" : @"IdentityProvider", - }; -} - -+ (NSValueTransformer *)identityProviderJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderIdentityProviderType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeResourceServerRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identifier" : @"Identifier", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeResourceServerResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"resourceServer" : @"ResourceServer", - }; -} - -+ (NSValueTransformer *)resourceServerJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderResourceServerType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeRiskConfigurationRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"clientId" : @"ClientId", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeRiskConfigurationResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"riskConfiguration" : @"RiskConfiguration", - }; -} - -+ (NSValueTransformer *)riskConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderRiskConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserImportJobRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"jobId" : @"JobId", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserImportJobResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userImportJob" : @"UserImportJob", - }; -} - -+ (NSValueTransformer *)userImportJobJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserImportJobType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserPoolClientRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"clientId" : @"ClientId", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserPoolClientResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolClient" : @"UserPoolClient", - }; -} - -+ (NSValueTransformer *)userPoolClientJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolClientType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserPoolDomainRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"domain" : @"Domain", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserPoolDomainResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"domainDescription" : @"DomainDescription", - }; -} - -+ (NSValueTransformer *)domainDescriptionJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderDomainDescriptionType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserPoolRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDescribeUserPoolResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPool" : @"UserPool", - }; -} - -+ (NSValueTransformer *)userPoolJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderDeviceConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"challengeRequiredOnNewDevice" : @"ChallengeRequiredOnNewDevice", - @"deviceOnlyRememberedOnUserPrompt" : @"DeviceOnlyRememberedOnUserPrompt", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeviceSecretVerifierConfigType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"passwordVerifier" : @"PasswordVerifier", - @"salt" : @"Salt", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderDeviceType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"deviceAttributes" : @"DeviceAttributes", - @"deviceCreateDate" : @"DeviceCreateDate", - @"deviceKey" : @"DeviceKey", - @"deviceLastAuthenticatedDate" : @"DeviceLastAuthenticatedDate", - @"deviceLastModifiedDate" : @"DeviceLastModifiedDate", - }; -} - -+ (NSValueTransformer *)deviceAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -+ (NSValueTransformer *)deviceCreateDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)deviceLastAuthenticatedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)deviceLastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderDomainDescriptionType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"AWSAccountId" : @"AWSAccountId", - @"cloudFrontDistribution" : @"CloudFrontDistribution", - @"customDomainConfig" : @"CustomDomainConfig", - @"domain" : @"Domain", - @"s3Bucket" : @"S3Bucket", - @"status" : @"Status", - @"userPoolId" : @"UserPoolId", - @"version" : @"Version", - }; -} - -+ (NSValueTransformer *)customDomainConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCustomDomainConfigType class]]; -} - -+ (NSValueTransformer *)statusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"CREATING"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDomainStatusTypeCreating); - } - if ([value caseInsensitiveCompare:@"DELETING"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDomainStatusTypeDeleting); - } - if ([value caseInsensitiveCompare:@"UPDATING"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDomainStatusTypeUpdating); - } - if ([value caseInsensitiveCompare:@"ACTIVE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDomainStatusTypeActive); - } - if ([value caseInsensitiveCompare:@"FAILED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDomainStatusTypeFailed); - } - return @(AWSCognitoIdentityProviderDomainStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderDomainStatusTypeCreating: - return @"CREATING"; - case AWSCognitoIdentityProviderDomainStatusTypeDeleting: - return @"DELETING"; - case AWSCognitoIdentityProviderDomainStatusTypeUpdating: - return @"UPDATING"; - case AWSCognitoIdentityProviderDomainStatusTypeActive: - return @"ACTIVE"; - case AWSCognitoIdentityProviderDomainStatusTypeFailed: - return @"FAILED"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderEmailConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"replyToEmailAddress" : @"ReplyToEmailAddress", - @"sourceArn" : @"SourceArn", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderEventContextDataType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"city" : @"City", - @"country" : @"Country", - @"deviceName" : @"DeviceName", - @"ipAddress" : @"IpAddress", - @"timezone" : @"Timezone", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderEventFeedbackType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"feedbackDate" : @"FeedbackDate", - @"feedbackValue" : @"FeedbackValue", - @"provider" : @"Provider", - }; -} - -+ (NSValueTransformer *)feedbackDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)feedbackValueJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Valid"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderFeedbackValueTypeValid); - } - if ([value caseInsensitiveCompare:@"Invalid"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderFeedbackValueTypeInvalid); - } - return @(AWSCognitoIdentityProviderFeedbackValueTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderFeedbackValueTypeValid: - return @"Valid"; - case AWSCognitoIdentityProviderFeedbackValueTypeInvalid: - return @"Invalid"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderEventRiskType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"riskDecision" : @"RiskDecision", - @"riskLevel" : @"RiskLevel", - }; -} - -+ (NSValueTransformer *)riskDecisionJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"NoRisk"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderRiskDecisionTypeNoRisk); - } - if ([value caseInsensitiveCompare:@"AccountTakeover"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderRiskDecisionTypeAccountTakeover); - } - if ([value caseInsensitiveCompare:@"Block"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderRiskDecisionTypeBlock); - } - return @(AWSCognitoIdentityProviderRiskDecisionTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderRiskDecisionTypeNoRisk: - return @"NoRisk"; - case AWSCognitoIdentityProviderRiskDecisionTypeAccountTakeover: - return @"AccountTakeover"; - case AWSCognitoIdentityProviderRiskDecisionTypeBlock: - return @"Block"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)riskLevelJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Low"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderRiskLevelTypeLow); - } - if ([value caseInsensitiveCompare:@"Medium"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderRiskLevelTypeMedium); - } - if ([value caseInsensitiveCompare:@"High"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderRiskLevelTypeHigh); - } - return @(AWSCognitoIdentityProviderRiskLevelTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderRiskLevelTypeLow: - return @"Low"; - case AWSCognitoIdentityProviderRiskLevelTypeMedium: - return @"Medium"; - case AWSCognitoIdentityProviderRiskLevelTypeHigh: - return @"High"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderForgetDeviceRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"deviceKey" : @"DeviceKey", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderForgotPasswordRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"clientId" : @"ClientId", - @"secretHash" : @"SecretHash", - @"userContextData" : @"UserContextData", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)userContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderForgotPasswordResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"codeDeliveryDetails" : @"CodeDeliveryDetails", - }; -} - -+ (NSValueTransformer *)codeDeliveryDetailsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCodeDeliveryDetailsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGetCSVHeaderRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetCSVHeaderResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"CSVHeader" : @"CSVHeader", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetDeviceRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"deviceKey" : @"DeviceKey", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetDeviceResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"device" : @"Device", - }; -} - -+ (NSValueTransformer *)deviceJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGetGroupRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"groupName" : @"GroupName", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetGroupResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"group" : @"Group", - }; -} - -+ (NSValueTransformer *)groupJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderGroupType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"idpIdentifier" : @"IdpIdentifier", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityProvider" : @"IdentityProvider", - }; -} - -+ (NSValueTransformer *)identityProviderJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderIdentityProviderType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGetSigningCertificateRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetSigningCertificateResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"certificate" : @"Certificate", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUICustomizationRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"clientId" : @"ClientId", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUICustomizationResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"UICustomization" : @"UICustomization", - }; -} - -+ (NSValueTransformer *)UICustomizationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUICustomizationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"attributeName" : @"AttributeName", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"codeDeliveryDetails" : @"CodeDeliveryDetails", - }; -} - -+ (NSValueTransformer *)codeDeliveryDetailsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCodeDeliveryDetailsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"mfaConfiguration" : @"MfaConfiguration", - @"smsMfaConfiguration" : @"SmsMfaConfiguration", - @"softwareTokenMfaConfiguration" : @"SoftwareTokenMfaConfiguration", - }; -} - -+ (NSValueTransformer *)mfaConfigurationJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"OFF"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOff); - } - if ([value caseInsensitiveCompare:@"ON"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOn); - } - if ([value caseInsensitiveCompare:@"OPTIONAL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOptional); - } - return @(AWSCognitoIdentityProviderUserPoolMfaTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserPoolMfaTypeOff: - return @"OFF"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOn: - return @"ON"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOptional: - return @"OPTIONAL"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)smsMfaConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSmsMfaConfigType class]]; -} - -+ (NSValueTransformer *)softwareTokenMfaConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSoftwareTokenMfaConfigType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUserRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGetUserResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"MFAOptions" : @"MFAOptions", - @"preferredMfaSetting" : @"PreferredMfaSetting", - @"userAttributes" : @"UserAttributes", - @"userMFASettingList" : @"UserMFASettingList", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)MFAOptionsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderMFAOptionType class]]; -} - -+ (NSValueTransformer *)userAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderGlobalSignOutRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderGlobalSignOutResponse - -@end - -@implementation AWSCognitoIdentityProviderGroupType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"creationDate" : @"CreationDate", - @"detail" : @"Description", - @"groupName" : @"GroupName", - @"lastModifiedDate" : @"LastModifiedDate", - @"precedence" : @"Precedence", - @"roleArn" : @"RoleArn", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderHttpHeader - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"headerName" : @"headerName", - @"headerValue" : @"headerValue", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderIdentityProviderType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributeMapping" : @"AttributeMapping", - @"creationDate" : @"CreationDate", - @"idpIdentifiers" : @"IdpIdentifiers", - @"lastModifiedDate" : @"LastModifiedDate", - @"providerDetails" : @"ProviderDetails", - @"providerName" : @"ProviderName", - @"providerType" : @"ProviderType", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)providerTypeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SAML"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeSaml); - } - if ([value caseInsensitiveCompare:@"Facebook"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeFacebook); - } - if ([value caseInsensitiveCompare:@"Google"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeGoogle); - } - if ([value caseInsensitiveCompare:@"LoginWithAmazon"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeLoginWithAmazon); - } - if ([value caseInsensitiveCompare:@"OIDC"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeOidc); - } - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderIdentityProviderTypeTypeSaml: - return @"SAML"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeFacebook: - return @"Facebook"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeGoogle: - return @"Google"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeLoginWithAmazon: - return @"LoginWithAmazon"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeOidc: - return @"OIDC"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderInitiateAuthRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"authFlow" : @"AuthFlow", - @"authParameters" : @"AuthParameters", - @"clientId" : @"ClientId", - @"clientMetadata" : @"ClientMetadata", - @"userContextData" : @"UserContextData", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)authFlowJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"USER_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeUserSrpAuth); - } - if ([value caseInsensitiveCompare:@"REFRESH_TOKEN_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeRefreshTokenAuth); - } - if ([value caseInsensitiveCompare:@"REFRESH_TOKEN"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeRefreshToken); - } - if ([value caseInsensitiveCompare:@"CUSTOM_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeCustomAuth); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"USER_PASSWORD_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAuthFlowTypeUserPasswordAuth); - } - return @(AWSCognitoIdentityProviderAuthFlowTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderAuthFlowTypeUserSrpAuth: - return @"USER_SRP_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeRefreshTokenAuth: - return @"REFRESH_TOKEN_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeRefreshToken: - return @"REFRESH_TOKEN"; - case AWSCognitoIdentityProviderAuthFlowTypeCustomAuth: - return @"CUSTOM_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderAuthFlowTypeUserPasswordAuth: - return @"USER_PASSWORD_AUTH"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)userContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderInitiateAuthResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"authenticationResult" : @"AuthenticationResult", - @"challengeName" : @"ChallengeName", - @"challengeParameters" : @"ChallengeParameters", - @"session" : @"Session", - }; -} - -+ (NSValueTransformer *)authenticationResultJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAuthenticationResultType class]]; -} - -+ (NSValueTransformer *)challengeNameJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSmsMfa); - } - if ([value caseInsensitiveCompare:@"SOFTWARE_TOKEN_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa); - } - if ([value caseInsensitiveCompare:@"SELECT_MFA_TYPE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType); - } - if ([value caseInsensitiveCompare:@"MFA_SETUP"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeMfaSetup); - } - if ([value caseInsensitiveCompare:@"PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"CUSTOM_CHALLENGE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge); - } - if ([value caseInsensitiveCompare:@"DEVICE_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth); - } - if ([value caseInsensitiveCompare:@"DEVICE_PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"NEW_PASSWORD_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired); - } - return @(AWSCognitoIdentityProviderChallengeNameTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeNameTypeSmsMfa: - return @"SMS_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa: - return @"SOFTWARE_TOKEN_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType: - return @"SELECT_MFA_TYPE"; - case AWSCognitoIdentityProviderChallengeNameTypeMfaSetup: - return @"MFA_SETUP"; - case AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier: - return @"PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge: - return @"CUSTOM_CHALLENGE"; - case AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth: - return @"DEVICE_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier: - return @"DEVICE_PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired: - return @"NEW_PASSWORD_REQUIRED"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderLambdaConfigType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"createAuthChallenge" : @"CreateAuthChallenge", - @"customMessage" : @"CustomMessage", - @"defineAuthChallenge" : @"DefineAuthChallenge", - @"postAuthentication" : @"PostAuthentication", - @"postConfirmation" : @"PostConfirmation", - @"preAuthentication" : @"PreAuthentication", - @"preSignUp" : @"PreSignUp", - @"preTokenGeneration" : @"PreTokenGeneration", - @"userMigration" : @"UserMigration", - @"verifyAuthChallengeResponse" : @"VerifyAuthChallengeResponse", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListDevicesRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"limit" : @"Limit", - @"paginationToken" : @"PaginationToken", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListDevicesResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"devices" : @"Devices", - @"paginationToken" : @"PaginationToken", - }; -} - -+ (NSValueTransformer *)devicesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListGroupsRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"limit" : @"Limit", - @"nextToken" : @"NextToken", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListGroupsResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"groups" : @"Groups", - @"nextToken" : @"NextToken", - }; -} - -+ (NSValueTransformer *)groupsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderGroupType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListIdentityProvidersRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListIdentityProvidersResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"nextToken" : @"NextToken", - @"providers" : @"Providers", - }; -} - -+ (NSValueTransformer *)providersJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderProviderDescription class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListResourceServersRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListResourceServersResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"nextToken" : @"NextToken", - @"resourceServers" : @"ResourceServers", - }; -} - -+ (NSValueTransformer *)resourceServersJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderResourceServerType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListUserImportJobsRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxResults" : @"MaxResults", - @"paginationToken" : @"PaginationToken", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListUserImportJobsResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"paginationToken" : @"PaginationToken", - @"userImportJobs" : @"UserImportJobs", - }; -} - -+ (NSValueTransformer *)userImportJobsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderUserImportJobType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListUserPoolClientsRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListUserPoolClientsResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"nextToken" : @"NextToken", - @"userPoolClients" : @"UserPoolClients", - }; -} - -+ (NSValueTransformer *)userPoolClientsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolClientDescription class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListUserPoolsRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListUserPoolsResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"nextToken" : @"NextToken", - @"userPools" : @"UserPools", - }; -} - -+ (NSValueTransformer *)userPoolsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolDescriptionType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListUsersInGroupRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"groupName" : @"GroupName", - @"limit" : @"Limit", - @"nextToken" : @"NextToken", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListUsersInGroupResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"nextToken" : @"NextToken", - @"users" : @"Users", - }; -} - -+ (NSValueTransformer *)usersJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderUserType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderListUsersRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributesToGet" : @"AttributesToGet", - @"filter" : @"Filter", - @"limit" : @"Limit", - @"paginationToken" : @"PaginationToken", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderListUsersResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"paginationToken" : @"PaginationToken", - @"users" : @"Users", - }; -} - -+ (NSValueTransformer *)usersJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderUserType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderMFAOptionType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributeName" : @"AttributeName", - @"deliveryMedium" : @"DeliveryMedium", - }; -} - -+ (NSValueTransformer *)deliveryMediumJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeliveryMediumTypeSms); - } - if ([value caseInsensitiveCompare:@"EMAIL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeliveryMediumTypeEmail); - } - return @(AWSCognitoIdentityProviderDeliveryMediumTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderDeliveryMediumTypeSms: - return @"SMS"; - case AWSCognitoIdentityProviderDeliveryMediumTypeEmail: - return @"EMAIL"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderMessageTemplateType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"emailMessage" : @"EmailMessage", - @"emailSubject" : @"EmailSubject", - @"SMSMessage" : @"SMSMessage", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderLatestDeviceMetadataType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"deviceGroupKey" : @"DeviceGroupKey", - @"deviceKey" : @"DeviceKey", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderNotifyConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"blockEmail" : @"BlockEmail", - @"from" : @"From", - @"mfaEmail" : @"MfaEmail", - @"noActionEmail" : @"NoActionEmail", - @"replyTo" : @"ReplyTo", - @"sourceArn" : @"SourceArn", - }; -} - -+ (NSValueTransformer *)blockEmailJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderNotifyEmailType class]]; -} - -+ (NSValueTransformer *)mfaEmailJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderNotifyEmailType class]]; -} - -+ (NSValueTransformer *)noActionEmailJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderNotifyEmailType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderNotifyEmailType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"htmlBody" : @"HtmlBody", - @"subject" : @"Subject", - @"textBody" : @"TextBody", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderNumberAttributeConstraintsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxValue" : @"MaxValue", - @"minValue" : @"MinValue", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderPasswordPolicyType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"minimumLength" : @"MinimumLength", - @"requireLowercase" : @"RequireLowercase", - @"requireNumbers" : @"RequireNumbers", - @"requireSymbols" : @"RequireSymbols", - @"requireUppercase" : @"RequireUppercase", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderProviderDescription - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"creationDate" : @"CreationDate", - @"lastModifiedDate" : @"LastModifiedDate", - @"providerName" : @"ProviderName", - @"providerType" : @"ProviderType", - }; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)providerTypeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SAML"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeSaml); - } - if ([value caseInsensitiveCompare:@"Facebook"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeFacebook); - } - if ([value caseInsensitiveCompare:@"Google"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeGoogle); - } - if ([value caseInsensitiveCompare:@"LoginWithAmazon"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeLoginWithAmazon); - } - if ([value caseInsensitiveCompare:@"OIDC"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeOidc); - } - return @(AWSCognitoIdentityProviderIdentityProviderTypeTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderIdentityProviderTypeTypeSaml: - return @"SAML"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeFacebook: - return @"Facebook"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeGoogle: - return @"Google"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeLoginWithAmazon: - return @"LoginWithAmazon"; - case AWSCognitoIdentityProviderIdentityProviderTypeTypeOidc: - return @"OIDC"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderProviderUserIdentifierType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"providerAttributeName" : @"ProviderAttributeName", - @"providerAttributeValue" : @"ProviderAttributeValue", - @"providerName" : @"ProviderName", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderResendConfirmationCodeRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"clientId" : @"ClientId", - @"secretHash" : @"SecretHash", - @"userContextData" : @"UserContextData", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)userContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderResendConfirmationCodeResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"codeDeliveryDetails" : @"CodeDeliveryDetails", - }; -} - -+ (NSValueTransformer *)codeDeliveryDetailsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCodeDeliveryDetailsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderResourceServerScopeType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"scopeDescription" : @"ScopeDescription", - @"scopeName" : @"ScopeName", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderResourceServerType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identifier" : @"Identifier", - @"name" : @"Name", - @"scopes" : @"Scopes", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)scopesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderResourceServerScopeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderRespondToAuthChallengeRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"challengeName" : @"ChallengeName", - @"challengeResponses" : @"ChallengeResponses", - @"clientId" : @"ClientId", - @"session" : @"Session", - @"userContextData" : @"UserContextData", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)challengeNameJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSmsMfa); - } - if ([value caseInsensitiveCompare:@"SOFTWARE_TOKEN_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa); - } - if ([value caseInsensitiveCompare:@"SELECT_MFA_TYPE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType); - } - if ([value caseInsensitiveCompare:@"MFA_SETUP"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeMfaSetup); - } - if ([value caseInsensitiveCompare:@"PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"CUSTOM_CHALLENGE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge); - } - if ([value caseInsensitiveCompare:@"DEVICE_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth); - } - if ([value caseInsensitiveCompare:@"DEVICE_PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"NEW_PASSWORD_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired); - } - return @(AWSCognitoIdentityProviderChallengeNameTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeNameTypeSmsMfa: - return @"SMS_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa: - return @"SOFTWARE_TOKEN_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType: - return @"SELECT_MFA_TYPE"; - case AWSCognitoIdentityProviderChallengeNameTypeMfaSetup: - return @"MFA_SETUP"; - case AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier: - return @"PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge: - return @"CUSTOM_CHALLENGE"; - case AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth: - return @"DEVICE_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier: - return @"DEVICE_PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired: - return @"NEW_PASSWORD_REQUIRED"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)userContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserContextDataType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderRespondToAuthChallengeResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"authenticationResult" : @"AuthenticationResult", - @"challengeName" : @"ChallengeName", - @"challengeParameters" : @"ChallengeParameters", - @"session" : @"Session", - }; -} - -+ (NSValueTransformer *)authenticationResultJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAuthenticationResultType class]]; -} - -+ (NSValueTransformer *)challengeNameJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SMS_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSmsMfa); - } - if ([value caseInsensitiveCompare:@"SOFTWARE_TOKEN_MFA"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa); - } - if ([value caseInsensitiveCompare:@"SELECT_MFA_TYPE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType); - } - if ([value caseInsensitiveCompare:@"MFA_SETUP"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeMfaSetup); - } - if ([value caseInsensitiveCompare:@"PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"CUSTOM_CHALLENGE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge); - } - if ([value caseInsensitiveCompare:@"DEVICE_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth); - } - if ([value caseInsensitiveCompare:@"DEVICE_PASSWORD_VERIFIER"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier); - } - if ([value caseInsensitiveCompare:@"ADMIN_NO_SRP_AUTH"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth); - } - if ([value caseInsensitiveCompare:@"NEW_PASSWORD_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired); - } - return @(AWSCognitoIdentityProviderChallengeNameTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderChallengeNameTypeSmsMfa: - return @"SMS_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSoftwareTokenMfa: - return @"SOFTWARE_TOKEN_MFA"; - case AWSCognitoIdentityProviderChallengeNameTypeSelectMfaType: - return @"SELECT_MFA_TYPE"; - case AWSCognitoIdentityProviderChallengeNameTypeMfaSetup: - return @"MFA_SETUP"; - case AWSCognitoIdentityProviderChallengeNameTypePasswordVerifier: - return @"PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeCustomChallenge: - return @"CUSTOM_CHALLENGE"; - case AWSCognitoIdentityProviderChallengeNameTypeDeviceSrpAuth: - return @"DEVICE_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeDevicePasswordVerifier: - return @"DEVICE_PASSWORD_VERIFIER"; - case AWSCognitoIdentityProviderChallengeNameTypeAdminNoSrpAuth: - return @"ADMIN_NO_SRP_AUTH"; - case AWSCognitoIdentityProviderChallengeNameTypeNewPasswordRequired: - return @"NEW_PASSWORD_REQUIRED"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderRiskConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accountTakeoverRiskConfiguration" : @"AccountTakeoverRiskConfiguration", - @"clientId" : @"ClientId", - @"compromisedCredentialsRiskConfiguration" : @"CompromisedCredentialsRiskConfiguration", - @"lastModifiedDate" : @"LastModifiedDate", - @"riskExceptionConfiguration" : @"RiskExceptionConfiguration", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)accountTakeoverRiskConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAccountTakeoverRiskConfigurationType class]]; -} - -+ (NSValueTransformer *)compromisedCredentialsRiskConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCompromisedCredentialsRiskConfigurationType class]]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)riskExceptionConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderRiskExceptionConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderRiskExceptionConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"blockedIPRangeList" : @"BlockedIPRangeList", - @"skippedIPRangeList" : @"SkippedIPRangeList", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderSMSMfaSettingsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"enabled" : @"Enabled", - @"preferredMfa" : @"PreferredMfa", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderSchemaAttributeType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributeDataType" : @"AttributeDataType", - @"developerOnlyAttribute" : @"DeveloperOnlyAttribute", - @"varying" : @"Mutable", - @"name" : @"Name", - @"numberAttributeConstraints" : @"NumberAttributeConstraints", - @"required" : @"Required", - @"stringAttributeConstraints" : @"StringAttributeConstraints", - }; -} - -+ (NSValueTransformer *)attributeDataTypeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"String"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAttributeDataTypeString); - } - if ([value caseInsensitiveCompare:@"Number"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAttributeDataTypeNumber); - } - if ([value caseInsensitiveCompare:@"DateTime"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAttributeDataTypeDateTime); - } - if ([value caseInsensitiveCompare:@"Boolean"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAttributeDataTypeBoolean); - } - return @(AWSCognitoIdentityProviderAttributeDataTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderAttributeDataTypeString: - return @"String"; - case AWSCognitoIdentityProviderAttributeDataTypeNumber: - return @"Number"; - case AWSCognitoIdentityProviderAttributeDataTypeDateTime: - return @"DateTime"; - case AWSCognitoIdentityProviderAttributeDataTypeBoolean: - return @"Boolean"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)numberAttributeConstraintsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderNumberAttributeConstraintsType class]]; -} - -+ (NSValueTransformer *)stringAttributeConstraintsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderStringAttributeConstraintsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetRiskConfigurationRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accountTakeoverRiskConfiguration" : @"AccountTakeoverRiskConfiguration", - @"clientId" : @"ClientId", - @"compromisedCredentialsRiskConfiguration" : @"CompromisedCredentialsRiskConfiguration", - @"riskExceptionConfiguration" : @"RiskExceptionConfiguration", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)accountTakeoverRiskConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAccountTakeoverRiskConfigurationType class]]; -} - -+ (NSValueTransformer *)compromisedCredentialsRiskConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCompromisedCredentialsRiskConfigurationType class]]; -} - -+ (NSValueTransformer *)riskExceptionConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderRiskExceptionConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetRiskConfigurationResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"riskConfiguration" : @"RiskConfiguration", - }; -} - -+ (NSValueTransformer *)riskConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderRiskConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetUICustomizationRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"CSS" : @"CSS", - @"clientId" : @"ClientId", - @"imageFile" : @"ImageFile", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderSetUICustomizationResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"UICustomization" : @"UICustomization", - }; -} - -+ (NSValueTransformer *)UICustomizationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUICustomizationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetUserMFAPreferenceRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"SMSMfaSettings" : @"SMSMfaSettings", - @"softwareTokenMfaSettings" : @"SoftwareTokenMfaSettings", - }; -} - -+ (NSValueTransformer *)SMSMfaSettingsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSMSMfaSettingsType class]]; -} - -+ (NSValueTransformer *)softwareTokenMfaSettingsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetUserMFAPreferenceResponse - -@end - -@implementation AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"mfaConfiguration" : @"MfaConfiguration", - @"smsMfaConfiguration" : @"SmsMfaConfiguration", - @"softwareTokenMfaConfiguration" : @"SoftwareTokenMfaConfiguration", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)mfaConfigurationJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"OFF"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOff); - } - if ([value caseInsensitiveCompare:@"ON"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOn); - } - if ([value caseInsensitiveCompare:@"OPTIONAL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOptional); - } - return @(AWSCognitoIdentityProviderUserPoolMfaTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserPoolMfaTypeOff: - return @"OFF"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOn: - return @"ON"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOptional: - return @"OPTIONAL"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)smsMfaConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSmsMfaConfigType class]]; -} - -+ (NSValueTransformer *)softwareTokenMfaConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSoftwareTokenMfaConfigType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"mfaConfiguration" : @"MfaConfiguration", - @"smsMfaConfiguration" : @"SmsMfaConfiguration", - @"softwareTokenMfaConfiguration" : @"SoftwareTokenMfaConfiguration", - }; -} - -+ (NSValueTransformer *)mfaConfigurationJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"OFF"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOff); - } - if ([value caseInsensitiveCompare:@"ON"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOn); - } - if ([value caseInsensitiveCompare:@"OPTIONAL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOptional); - } - return @(AWSCognitoIdentityProviderUserPoolMfaTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserPoolMfaTypeOff: - return @"OFF"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOn: - return @"ON"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOptional: - return @"OPTIONAL"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)smsMfaConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSmsMfaConfigType class]]; -} - -+ (NSValueTransformer *)softwareTokenMfaConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSoftwareTokenMfaConfigType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetUserSettingsRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"MFAOptions" : @"MFAOptions", - }; -} - -+ (NSValueTransformer *)MFAOptionsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderMFAOptionType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSetUserSettingsResponse - -@end - -@implementation AWSCognitoIdentityProviderSignUpRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"analyticsMetadata" : @"AnalyticsMetadata", - @"clientId" : @"ClientId", - @"password" : @"Password", - @"secretHash" : @"SecretHash", - @"userAttributes" : @"UserAttributes", - @"userContextData" : @"UserContextData", - @"username" : @"Username", - @"validationData" : @"ValidationData", - }; -} - -+ (NSValueTransformer *)analyticsMetadataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsMetadataType class]]; -} - -+ (NSValueTransformer *)userAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -+ (NSValueTransformer *)userContextDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserContextDataType class]]; -} - -+ (NSValueTransformer *)validationDataJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSignUpResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"codeDeliveryDetails" : @"CodeDeliveryDetails", - @"userConfirmed" : @"UserConfirmed", - @"userSub" : @"UserSub", - }; -} - -+ (NSValueTransformer *)codeDeliveryDetailsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCodeDeliveryDetailsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSmsConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"externalId" : @"ExternalId", - @"snsCallerArn" : @"SnsCallerArn", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderSmsMfaConfigType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"smsAuthenticationMessage" : @"SmsAuthenticationMessage", - @"smsConfiguration" : @"SmsConfiguration", - }; -} - -+ (NSValueTransformer *)smsConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSmsConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderSoftwareTokenMfaConfigType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"enabled" : @"Enabled", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderSoftwareTokenMfaSettingsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"enabled" : @"Enabled", - @"preferredMfa" : @"PreferredMfa", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderStartUserImportJobRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"jobId" : @"JobId", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderStartUserImportJobResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userImportJob" : @"UserImportJob", - }; -} - -+ (NSValueTransformer *)userImportJobJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserImportJobType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderStopUserImportJobRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"jobId" : @"JobId", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderStopUserImportJobResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userImportJob" : @"UserImportJob", - }; -} - -+ (NSValueTransformer *)userImportJobJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserImportJobType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderStringAttributeConstraintsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxLength" : @"MaxLength", - @"minLength" : @"MinLength", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderUICustomizationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"CSS" : @"CSS", - @"CSSVersion" : @"CSSVersion", - @"clientId" : @"ClientId", - @"creationDate" : @"CreationDate", - @"imageUrl" : @"ImageUrl", - @"lastModifiedDate" : @"LastModifiedDate", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"eventId" : @"EventId", - @"feedbackToken" : @"FeedbackToken", - @"feedbackValue" : @"FeedbackValue", - @"userPoolId" : @"UserPoolId", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)feedbackValueJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Valid"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderFeedbackValueTypeValid); - } - if ([value caseInsensitiveCompare:@"Invalid"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderFeedbackValueTypeInvalid); - } - return @(AWSCognitoIdentityProviderFeedbackValueTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderFeedbackValueTypeValid: - return @"Valid"; - case AWSCognitoIdentityProviderFeedbackValueTypeInvalid: - return @"Invalid"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse - -@end - -@implementation AWSCognitoIdentityProviderUpdateDeviceStatusRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"deviceKey" : @"DeviceKey", - @"deviceRememberedStatus" : @"DeviceRememberedStatus", - }; -} - -+ (NSValueTransformer *)deviceRememberedStatusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"remembered"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeviceRememberedStatusTypeRemembered); - } - if ([value caseInsensitiveCompare:@"not_remembered"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDeviceRememberedStatusTypeNotRemembered); - } - return @(AWSCognitoIdentityProviderDeviceRememberedStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderDeviceRememberedStatusTypeRemembered: - return @"remembered"; - case AWSCognitoIdentityProviderDeviceRememberedStatusTypeNotRemembered: - return @"not_remembered"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateDeviceStatusResponse - -@end - -@implementation AWSCognitoIdentityProviderUpdateGroupRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"detail" : @"Description", - @"groupName" : @"GroupName", - @"precedence" : @"Precedence", - @"roleArn" : @"RoleArn", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateGroupResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"group" : @"Group", - }; -} - -+ (NSValueTransformer *)groupJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderGroupType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateIdentityProviderRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributeMapping" : @"AttributeMapping", - @"idpIdentifiers" : @"IdpIdentifiers", - @"providerDetails" : @"ProviderDetails", - @"providerName" : @"ProviderName", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateIdentityProviderResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityProvider" : @"IdentityProvider", - }; -} - -+ (NSValueTransformer *)identityProviderJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderIdentityProviderType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateResourceServerRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identifier" : @"Identifier", - @"name" : @"Name", - @"scopes" : @"Scopes", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)scopesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderResourceServerScopeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateResourceServerResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"resourceServer" : @"ResourceServer", - }; -} - -+ (NSValueTransformer *)resourceServerJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderResourceServerType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserAttributesRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"userAttributes" : @"UserAttributes", - }; -} - -+ (NSValueTransformer *)userAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserAttributesResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"codeDeliveryDetailsList" : @"CodeDeliveryDetailsList", - }; -} - -+ (NSValueTransformer *)codeDeliveryDetailsListJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderCodeDeliveryDetailsType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserPoolClientRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"allowedOAuthFlows" : @"AllowedOAuthFlows", - @"allowedOAuthFlowsUserPoolClient" : @"AllowedOAuthFlowsUserPoolClient", - @"allowedOAuthScopes" : @"AllowedOAuthScopes", - @"analyticsConfiguration" : @"AnalyticsConfiguration", - @"callbackURLs" : @"CallbackURLs", - @"clientId" : @"ClientId", - @"clientName" : @"ClientName", - @"defaultRedirectURI" : @"DefaultRedirectURI", - @"explicitAuthFlows" : @"ExplicitAuthFlows", - @"logoutURLs" : @"LogoutURLs", - @"readAttributes" : @"ReadAttributes", - @"refreshTokenValidity" : @"RefreshTokenValidity", - @"supportedIdentityProviders" : @"SupportedIdentityProviders", - @"userPoolId" : @"UserPoolId", - @"writeAttributes" : @"WriteAttributes", - }; -} - -+ (NSValueTransformer *)analyticsConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsConfigurationType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserPoolClientResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"userPoolClient" : @"UserPoolClient", - }; -} - -+ (NSValueTransformer *)userPoolClientJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolClientType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserPoolDomainRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"customDomainConfig" : @"CustomDomainConfig", - @"domain" : @"Domain", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)customDomainConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderCustomDomainConfigType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserPoolDomainResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"cloudFrontDomain" : @"CloudFrontDomain", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserPoolRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"adminCreateUserConfig" : @"AdminCreateUserConfig", - @"autoVerifiedAttributes" : @"AutoVerifiedAttributes", - @"deviceConfiguration" : @"DeviceConfiguration", - @"emailConfiguration" : @"EmailConfiguration", - @"emailVerificationMessage" : @"EmailVerificationMessage", - @"emailVerificationSubject" : @"EmailVerificationSubject", - @"lambdaConfig" : @"LambdaConfig", - @"mfaConfiguration" : @"MfaConfiguration", - @"policies" : @"Policies", - @"smsAuthenticationMessage" : @"SmsAuthenticationMessage", - @"smsConfiguration" : @"SmsConfiguration", - @"smsVerificationMessage" : @"SmsVerificationMessage", - @"userPoolAddOns" : @"UserPoolAddOns", - @"userPoolId" : @"UserPoolId", - @"userPoolTags" : @"UserPoolTags", - @"verificationMessageTemplate" : @"VerificationMessageTemplate", - }; -} - -+ (NSValueTransformer *)adminCreateUserConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAdminCreateUserConfigType class]]; -} - -+ (NSValueTransformer *)deviceConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceConfigurationType class]]; -} - -+ (NSValueTransformer *)emailConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderEmailConfigurationType class]]; -} - -+ (NSValueTransformer *)lambdaConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderLambdaConfigType class]]; -} - -+ (NSValueTransformer *)mfaConfigurationJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"OFF"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOff); - } - if ([value caseInsensitiveCompare:@"ON"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOn); - } - if ([value caseInsensitiveCompare:@"OPTIONAL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOptional); - } - return @(AWSCognitoIdentityProviderUserPoolMfaTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserPoolMfaTypeOff: - return @"OFF"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOn: - return @"ON"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOptional: - return @"OPTIONAL"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)policiesJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolPolicyType class]]; -} - -+ (NSValueTransformer *)smsConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSmsConfigurationType class]]; -} - -+ (NSValueTransformer *)userPoolAddOnsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolAddOnsType class]]; -} - -+ (NSValueTransformer *)verificationMessageTemplateJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderVerificationMessageTemplateType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUpdateUserPoolResponse - -@end - -@implementation AWSCognitoIdentityProviderUserContextDataType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"encodedData" : @"EncodedData", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderUserImportJobType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"cloudWatchLogsRoleArn" : @"CloudWatchLogsRoleArn", - @"completionDate" : @"CompletionDate", - @"completionMessage" : @"CompletionMessage", - @"creationDate" : @"CreationDate", - @"failedUsers" : @"FailedUsers", - @"importedUsers" : @"ImportedUsers", - @"jobId" : @"JobId", - @"jobName" : @"JobName", - @"preSignedUrl" : @"PreSignedUrl", - @"skippedUsers" : @"SkippedUsers", - @"startDate" : @"StartDate", - @"status" : @"Status", - @"userPoolId" : @"UserPoolId", - }; -} - -+ (NSValueTransformer *)completionDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)startDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)statusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Created"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeCreated); - } - if ([value caseInsensitiveCompare:@"Pending"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypePending); - } - if ([value caseInsensitiveCompare:@"InProgress"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeInProgress); - } - if ([value caseInsensitiveCompare:@"Stopping"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeStopping); - } - if ([value caseInsensitiveCompare:@"Expired"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeExpired); - } - if ([value caseInsensitiveCompare:@"Stopped"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeStopped); - } - if ([value caseInsensitiveCompare:@"Failed"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeFailed); - } - if ([value caseInsensitiveCompare:@"Succeeded"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeSucceeded); - } - return @(AWSCognitoIdentityProviderUserImportJobStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserImportJobStatusTypeCreated: - return @"Created"; - case AWSCognitoIdentityProviderUserImportJobStatusTypePending: - return @"Pending"; - case AWSCognitoIdentityProviderUserImportJobStatusTypeInProgress: - return @"InProgress"; - case AWSCognitoIdentityProviderUserImportJobStatusTypeStopping: - return @"Stopping"; - case AWSCognitoIdentityProviderUserImportJobStatusTypeExpired: - return @"Expired"; - case AWSCognitoIdentityProviderUserImportJobStatusTypeStopped: - return @"Stopped"; - case AWSCognitoIdentityProviderUserImportJobStatusTypeFailed: - return @"Failed"; - case AWSCognitoIdentityProviderUserImportJobStatusTypeSucceeded: - return @"Succeeded"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderUserPoolAddOnsType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"advancedSecurityMode" : @"AdvancedSecurityMode", - }; -} - -+ (NSValueTransformer *)advancedSecurityModeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"OFF"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAdvancedSecurityModeTypeOff); - } - if ([value caseInsensitiveCompare:@"AUDIT"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAdvancedSecurityModeTypeAudit); - } - if ([value caseInsensitiveCompare:@"ENFORCED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderAdvancedSecurityModeTypeEnforced); - } - return @(AWSCognitoIdentityProviderAdvancedSecurityModeTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderAdvancedSecurityModeTypeOff: - return @"OFF"; - case AWSCognitoIdentityProviderAdvancedSecurityModeTypeAudit: - return @"AUDIT"; - case AWSCognitoIdentityProviderAdvancedSecurityModeTypeEnforced: - return @"ENFORCED"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderUserPoolClientDescription - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"clientId" : @"ClientId", - @"clientName" : @"ClientName", - @"userPoolId" : @"UserPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderUserPoolClientType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"allowedOAuthFlows" : @"AllowedOAuthFlows", - @"allowedOAuthFlowsUserPoolClient" : @"AllowedOAuthFlowsUserPoolClient", - @"allowedOAuthScopes" : @"AllowedOAuthScopes", - @"analyticsConfiguration" : @"AnalyticsConfiguration", - @"callbackURLs" : @"CallbackURLs", - @"clientId" : @"ClientId", - @"clientName" : @"ClientName", - @"clientSecret" : @"ClientSecret", - @"creationDate" : @"CreationDate", - @"defaultRedirectURI" : @"DefaultRedirectURI", - @"explicitAuthFlows" : @"ExplicitAuthFlows", - @"lastModifiedDate" : @"LastModifiedDate", - @"logoutURLs" : @"LogoutURLs", - @"readAttributes" : @"ReadAttributes", - @"refreshTokenValidity" : @"RefreshTokenValidity", - @"supportedIdentityProviders" : @"SupportedIdentityProviders", - @"userPoolId" : @"UserPoolId", - @"writeAttributes" : @"WriteAttributes", - }; -} - -+ (NSValueTransformer *)analyticsConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAnalyticsConfigurationType class]]; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderUserPoolDescriptionType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"creationDate" : @"CreationDate", - @"identifier" : @"Id", - @"lambdaConfig" : @"LambdaConfig", - @"lastModifiedDate" : @"LastModifiedDate", - @"name" : @"Name", - @"status" : @"Status", - }; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)lambdaConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderLambdaConfigType class]]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)statusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Enabled"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderStatusTypeEnabled); - } - if ([value caseInsensitiveCompare:@"Disabled"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderStatusTypeDisabled); - } - return @(AWSCognitoIdentityProviderStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderStatusTypeEnabled: - return @"Enabled"; - case AWSCognitoIdentityProviderStatusTypeDisabled: - return @"Disabled"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderUserPoolPolicyType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"passwordPolicy" : @"PasswordPolicy", - }; -} - -+ (NSValueTransformer *)passwordPolicyJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderPasswordPolicyType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUserPoolType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"adminCreateUserConfig" : @"AdminCreateUserConfig", - @"aliasAttributes" : @"AliasAttributes", - @"arn" : @"Arn", - @"autoVerifiedAttributes" : @"AutoVerifiedAttributes", - @"creationDate" : @"CreationDate", - @"customDomain" : @"CustomDomain", - @"deviceConfiguration" : @"DeviceConfiguration", - @"domain" : @"Domain", - @"emailConfiguration" : @"EmailConfiguration", - @"emailConfigurationFailure" : @"EmailConfigurationFailure", - @"emailVerificationMessage" : @"EmailVerificationMessage", - @"emailVerificationSubject" : @"EmailVerificationSubject", - @"estimatedNumberOfUsers" : @"EstimatedNumberOfUsers", - @"identifier" : @"Id", - @"lambdaConfig" : @"LambdaConfig", - @"lastModifiedDate" : @"LastModifiedDate", - @"mfaConfiguration" : @"MfaConfiguration", - @"name" : @"Name", - @"policies" : @"Policies", - @"schemaAttributes" : @"SchemaAttributes", - @"smsAuthenticationMessage" : @"SmsAuthenticationMessage", - @"smsConfiguration" : @"SmsConfiguration", - @"smsConfigurationFailure" : @"SmsConfigurationFailure", - @"smsVerificationMessage" : @"SmsVerificationMessage", - @"status" : @"Status", - @"userPoolAddOns" : @"UserPoolAddOns", - @"userPoolTags" : @"UserPoolTags", - @"usernameAttributes" : @"UsernameAttributes", - @"verificationMessageTemplate" : @"VerificationMessageTemplate", - }; -} - -+ (NSValueTransformer *)adminCreateUserConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderAdminCreateUserConfigType class]]; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)deviceConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderDeviceConfigurationType class]]; -} - -+ (NSValueTransformer *)emailConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderEmailConfigurationType class]]; -} - -+ (NSValueTransformer *)lambdaConfigJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderLambdaConfigType class]]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)mfaConfigurationJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"OFF"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOff); - } - if ([value caseInsensitiveCompare:@"ON"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOn); - } - if ([value caseInsensitiveCompare:@"OPTIONAL"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserPoolMfaTypeOptional); - } - return @(AWSCognitoIdentityProviderUserPoolMfaTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserPoolMfaTypeOff: - return @"OFF"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOn: - return @"ON"; - case AWSCognitoIdentityProviderUserPoolMfaTypeOptional: - return @"OPTIONAL"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)policiesJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolPolicyType class]]; -} - -+ (NSValueTransformer *)schemaAttributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderSchemaAttributeType class]]; -} - -+ (NSValueTransformer *)smsConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderSmsConfigurationType class]]; -} - -+ (NSValueTransformer *)statusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Enabled"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderStatusTypeEnabled); - } - if ([value caseInsensitiveCompare:@"Disabled"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderStatusTypeDisabled); - } - return @(AWSCognitoIdentityProviderStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderStatusTypeEnabled: - return @"Enabled"; - case AWSCognitoIdentityProviderStatusTypeDisabled: - return @"Disabled"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)userPoolAddOnsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderUserPoolAddOnsType class]]; -} - -+ (NSValueTransformer *)verificationMessageTemplateJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityProviderVerificationMessageTemplateType class]]; -} - -@end - -@implementation AWSCognitoIdentityProviderUserType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"attributes" : @"Attributes", - @"enabled" : @"Enabled", - @"MFAOptions" : @"MFAOptions", - @"userCreateDate" : @"UserCreateDate", - @"userLastModifiedDate" : @"UserLastModifiedDate", - @"userStatus" : @"UserStatus", - @"username" : @"Username", - }; -} - -+ (NSValueTransformer *)attributesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderAttributeType class]]; -} - -+ (NSValueTransformer *)MFAOptionsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityProviderMFAOptionType class]]; -} - -+ (NSValueTransformer *)userCreateDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)userLastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)userStatusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"UNCONFIRMED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeUnconfirmed); - } - if ([value caseInsensitiveCompare:@"CONFIRMED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeConfirmed); - } - if ([value caseInsensitiveCompare:@"ARCHIVED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeArchived); - } - if ([value caseInsensitiveCompare:@"COMPROMISED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeCompromised); - } - if ([value caseInsensitiveCompare:@"UNKNOWN"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeUnknown); - } - if ([value caseInsensitiveCompare:@"RESET_REQUIRED"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeResetRequired); - } - if ([value caseInsensitiveCompare:@"FORCE_CHANGE_PASSWORD"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderUserStatusTypeForceChangePassword); - } - return @(AWSCognitoIdentityProviderUserStatusTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderUserStatusTypeUnconfirmed: - return @"UNCONFIRMED"; - case AWSCognitoIdentityProviderUserStatusTypeConfirmed: - return @"CONFIRMED"; - case AWSCognitoIdentityProviderUserStatusTypeArchived: - return @"ARCHIVED"; - case AWSCognitoIdentityProviderUserStatusTypeCompromised: - return @"COMPROMISED"; - case AWSCognitoIdentityProviderUserStatusTypeUnknown: - return @"UNKNOWN"; - case AWSCognitoIdentityProviderUserStatusTypeResetRequired: - return @"RESET_REQUIRED"; - case AWSCognitoIdentityProviderUserStatusTypeForceChangePassword: - return @"FORCE_CHANGE_PASSWORD"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderVerificationMessageTemplateType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"defaultEmailOption" : @"DefaultEmailOption", - @"emailMessage" : @"EmailMessage", - @"emailMessageByLink" : @"EmailMessageByLink", - @"emailSubject" : @"EmailSubject", - @"emailSubjectByLink" : @"EmailSubjectByLink", - @"smsMessage" : @"SmsMessage", - }; -} - -+ (NSValueTransformer *)defaultEmailOptionJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"CONFIRM_WITH_LINK"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDefaultEmailOptionTypeConfirmWithLink); - } - if ([value caseInsensitiveCompare:@"CONFIRM_WITH_CODE"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderDefaultEmailOptionTypeConfirmWithCode); - } - return @(AWSCognitoIdentityProviderDefaultEmailOptionTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderDefaultEmailOptionTypeConfirmWithLink: - return @"CONFIRM_WITH_LINK"; - case AWSCognitoIdentityProviderDefaultEmailOptionTypeConfirmWithCode: - return @"CONFIRM_WITH_CODE"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderVerifySoftwareTokenRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"friendlyDeviceName" : @"FriendlyDeviceName", - @"session" : @"Session", - @"userCode" : @"UserCode", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderVerifySoftwareTokenResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"session" : @"Session", - @"status" : @"Status", - }; -} - -+ (NSValueTransformer *)statusJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"SUCCESS"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeSuccess); - } - if ([value caseInsensitiveCompare:@"ERROR"] == NSOrderedSame) { - return @(AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeError); - } - return @(AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeSuccess: - return @"SUCCESS"; - case AWSCognitoIdentityProviderVerifySoftwareTokenResponseTypeError: - return @"ERROR"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityProviderVerifyUserAttributeRequest - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessToken" : @"AccessToken", - @"attributeName" : @"AttributeName", - @"code" : @"Code", - }; -} - -@end - -@implementation AWSCognitoIdentityProviderVerifyUserAttributeResponse - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderResources.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderResources.h deleted file mode 100644 index 4b6fce8..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderResources.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -@interface AWSCognitoIdentityProviderResources : NSObject - -+ (instancetype)sharedInstance; - -- (NSDictionary *)JSONObject; - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderResources.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderResources.m deleted file mode 100644 index a3e1be2..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderResources.m +++ /dev/null @@ -1,7770 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentityProviderResources.h" -#import - -@interface AWSCognitoIdentityProviderResources () - -@property (nonatomic, strong) NSDictionary *definitionDictionary; - -@end - -@implementation AWSCognitoIdentityProviderResources - -+ (instancetype)sharedInstance { - static AWSCognitoIdentityProviderResources *_sharedResources = nil; - static dispatch_once_t once_token; - - dispatch_once(&once_token, ^{ - _sharedResources = [AWSCognitoIdentityProviderResources new]; - }); - - return _sharedResources; -} - -- (NSDictionary *)JSONObject { - return self.definitionDictionary; -} - -- (instancetype)init { - if (self = [super init]) { - //init method - NSError *error = nil; - _definitionDictionary = [NSJSONSerialization JSONObjectWithData:[[self definitionString] dataUsingEncoding:NSUTF8StringEncoding] - options:kNilOptions - error:&error]; - if (_definitionDictionary == nil) { - if (error) { - AWSDDLogError(@"Failed to parse JSON service definition: %@",error); - } - } - } - return self; -} - -- (NSString *)definitionString { - return @"{\ - \"version\":\"2.0\",\ - \"metadata\":{\ - \"apiVersion\":\"2016-04-18\",\ - \"endpointPrefix\":\"cognito-idp\",\ - \"jsonVersion\":\"1.1\",\ - \"protocol\":\"json\",\ - \"serviceFullName\":\"Amazon Cognito Identity Provider\",\ - \"serviceId\":\"Cognito Identity Provider\",\ - \"signatureVersion\":\"v4\",\ - \"targetPrefix\":\"AWSCognitoIdentityProviderService\",\ - \"uid\":\"cognito-idp-2016-04-18\"\ - },\ - \"operations\":{\ - \"AddCustomAttributes\":{\ - \"name\":\"AddCustomAttributes\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AddCustomAttributesRequest\"},\ - \"output\":{\"shape\":\"AddCustomAttributesResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserImportInProgressException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Adds additional user attributes to the user pool schema.

\"\ - },\ - \"AdminAddUserToGroup\":{\ - \"name\":\"AdminAddUserToGroup\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminAddUserToGroupRequest\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Adds the specified user to the specified group.

Requires developer credentials.

\"\ - },\ - \"AdminConfirmSignUp\":{\ - \"name\":\"AdminConfirmSignUp\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminConfirmSignUpRequest\"},\ - \"output\":{\"shape\":\"AdminConfirmSignUpResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyFailedAttemptsException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Confirms user registration as an admin without using a confirmation code. Works on any user.

Requires developer credentials.

\"\ - },\ - \"AdminCreateUser\":{\ - \"name\":\"AdminCreateUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminCreateUserRequest\"},\ - \"output\":{\"shape\":\"AdminCreateUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UsernameExistsException\"},\ - {\"shape\":\"InvalidPasswordException\"},\ - {\"shape\":\"CodeDeliveryFailureException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"PreconditionNotMetException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UnsupportedUserStateException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates a new user in the specified user pool.

If MessageAction is not set, the default is to send a welcome message via email or phone (SMS).

This message is based on a template that you configured in your call to or . This template includes your custom sign-up instructions and placeholders for user name and temporary password.

Alternatively, you can call AdminCreateUser with “SUPPRESS” for the MessageAction parameter, and Amazon Cognito will not send any email.

In either case, the user will be in the FORCE_CHANGE_PASSWORD state until they sign in and change their password.

AdminCreateUser requires developer credentials.

\"\ - },\ - \"AdminDeleteUser\":{\ - \"name\":\"AdminDeleteUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminDeleteUserRequest\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes a user as an administrator. Works on any user.

Requires developer credentials.

\"\ - },\ - \"AdminDeleteUserAttributes\":{\ - \"name\":\"AdminDeleteUserAttributes\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminDeleteUserAttributesRequest\"},\ - \"output\":{\"shape\":\"AdminDeleteUserAttributesResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes the user attributes in a user pool as an administrator. Works on any user.

Requires developer credentials.

\"\ - },\ - \"AdminDisableProviderForUser\":{\ - \"name\":\"AdminDisableProviderForUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminDisableProviderForUserRequest\"},\ - \"output\":{\"shape\":\"AdminDisableProviderForUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"AliasExistsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Disables the user from signing in with the specified external (SAML or social) identity provider. If the user to disable is a Cognito User Pools native username + password user, they are not permitted to use their password to sign-in. If the user to disable is a linked external IdP user, any link between that user and an existing user is removed. The next time the external user (no longer attached to the previously linked DestinationUser) signs in, they must create a new user account. See .

This action is enabled only for admin access and requires developer credentials.

The ProviderName must match the value specified when creating an IdP for the pool.

To disable a native username + password user, the ProviderName value must be Cognito and the ProviderAttributeName must be Cognito_Subject, with the ProviderAttributeValue being the name that is used in the user pool for the user.

The ProviderAttributeName must always be Cognito_Subject for social identity providers. The ProviderAttributeValue must always be the exact subject that was used when the user was originally linked as a source user.

For de-linking a SAML identity, there are two scenarios. If the linked identity has not yet been used to sign-in, the ProviderAttributeName and ProviderAttributeValue must be the same values that were used for the SourceUser when the identities were originally linked in the call. (If the linking was done with ProviderAttributeName set to Cognito_Subject, the same applies here). However, if the user has already signed in, the ProviderAttributeName must be Cognito_Subject and ProviderAttributeValue must be the subject of the SAML assertion.

\"\ - },\ - \"AdminDisableUser\":{\ - \"name\":\"AdminDisableUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminDisableUserRequest\"},\ - \"output\":{\"shape\":\"AdminDisableUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Disables the specified user as an administrator. Works on any user.

Requires developer credentials.

\"\ - },\ - \"AdminEnableUser\":{\ - \"name\":\"AdminEnableUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminEnableUserRequest\"},\ - \"output\":{\"shape\":\"AdminEnableUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Enables the specified user as an administrator. Works on any user.

Requires developer credentials.

\"\ - },\ - \"AdminForgetDevice\":{\ - \"name\":\"AdminForgetDevice\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminForgetDeviceRequest\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Forgets the device, as an administrator.

Requires developer credentials.

\"\ - },\ - \"AdminGetDevice\":{\ - \"name\":\"AdminGetDevice\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminGetDeviceRequest\"},\ - \"output\":{\"shape\":\"AdminGetDeviceResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"NotAuthorizedException\"}\ - ],\ - \"documentation\":\"

Gets the device, as an administrator.

Requires developer credentials.

\"\ - },\ - \"AdminGetUser\":{\ - \"name\":\"AdminGetUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminGetUserRequest\"},\ - \"output\":{\"shape\":\"AdminGetUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the specified user by user name in a user pool as an administrator. Works on any user.

Requires developer credentials.

\"\ - },\ - \"AdminInitiateAuth\":{\ - \"name\":\"AdminInitiateAuth\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminInitiateAuthRequest\"},\ - \"output\":{\"shape\":\"AdminInitiateAuthResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"MFAMethodNotFoundException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"}\ - ],\ - \"documentation\":\"

Initiates the authentication flow, as an administrator.

Requires developer credentials.

\"\ - },\ - \"AdminLinkProviderForUser\":{\ - \"name\":\"AdminLinkProviderForUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminLinkProviderForUserRequest\"},\ - \"output\":{\"shape\":\"AdminLinkProviderForUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"AliasExistsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Links an existing user account in a user pool (DestinationUser) to an identity from an external identity provider (SourceUser) based on a specified attribute name and value from the external identity provider. This allows you to create a link from the existing user account to an external federated user identity that has not yet been used to sign in, so that the federated user identity can be used to sign in as the existing user account.

For example, if there is an existing user with a username and password, this API links that user to a federated user identity, so that when the federated user identity is used, the user signs in as the existing user account.

Because this API allows a user with an external federated identity to sign in as an existing user in the user pool, it is critical that it only be used with external identity providers and provider attributes that have been trusted by the application owner.

See also .

This action is enabled only for admin access and requires developer credentials.

\"\ - },\ - \"AdminListDevices\":{\ - \"name\":\"AdminListDevices\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminListDevicesRequest\"},\ - \"output\":{\"shape\":\"AdminListDevicesResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"NotAuthorizedException\"}\ - ],\ - \"documentation\":\"

Lists devices, as an administrator.

Requires developer credentials.

\"\ - },\ - \"AdminListGroupsForUser\":{\ - \"name\":\"AdminListGroupsForUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminListGroupsForUserRequest\"},\ - \"output\":{\"shape\":\"AdminListGroupsForUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the groups that the user belongs to.

Requires developer credentials.

\"\ - },\ - \"AdminListUserAuthEvents\":{\ - \"name\":\"AdminListUserAuthEvents\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminListUserAuthEventsRequest\"},\ - \"output\":{\"shape\":\"AdminListUserAuthEventsResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserPoolAddOnNotEnabledException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists a history of user activity and any risks detected as part of Amazon Cognito advanced security.

\"\ - },\ - \"AdminRemoveUserFromGroup\":{\ - \"name\":\"AdminRemoveUserFromGroup\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminRemoveUserFromGroupRequest\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Removes the specified user from the specified group.

Requires developer credentials.

\"\ - },\ - \"AdminResetUserPassword\":{\ - \"name\":\"AdminResetUserPassword\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminResetUserPasswordRequest\"},\ - \"output\":{\"shape\":\"AdminResetUserPasswordResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Resets the specified user's password in a user pool as an administrator. Works on any user.

When a developer calls this API, the current password is invalidated, so it must be changed. If a user tries to sign in after the API is called, the app will get a PasswordResetRequiredException exception back and should direct the user down the flow to reset the password, which is the same as the forgot password flow. In addition, if the user pool has phone verification selected and a verified phone number exists for the user, or if email verification is selected and a verified email exists for the user, calling this API will also result in sending a message to the end user with the code to change their password.

Requires developer credentials.

\"\ - },\ - \"AdminRespondToAuthChallenge\":{\ - \"name\":\"AdminRespondToAuthChallenge\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminRespondToAuthChallengeRequest\"},\ - \"output\":{\"shape\":\"AdminRespondToAuthChallengeResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"CodeMismatchException\"},\ - {\"shape\":\"ExpiredCodeException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"InvalidPasswordException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"MFAMethodNotFoundException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"AliasExistsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"SoftwareTokenMFANotFoundException\"}\ - ],\ - \"documentation\":\"

Responds to an authentication challenge, as an administrator.

Requires developer credentials.

\"\ - },\ - \"AdminSetUserMFAPreference\":{\ - \"name\":\"AdminSetUserMFAPreference\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminSetUserMFAPreferenceRequest\"},\ - \"output\":{\"shape\":\"AdminSetUserMFAPreferenceResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Sets the user's multi-factor authentication (MFA) preference.

\"\ - },\ - \"AdminSetUserSettings\":{\ - \"name\":\"AdminSetUserSettings\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminSetUserSettingsRequest\"},\ - \"output\":{\"shape\":\"AdminSetUserSettingsResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Sets all the user settings for a specified user name. Works on any user.

Requires developer credentials.

\"\ - },\ - \"AdminUpdateAuthEventFeedback\":{\ - \"name\":\"AdminUpdateAuthEventFeedback\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminUpdateAuthEventFeedbackRequest\"},\ - \"output\":{\"shape\":\"AdminUpdateAuthEventFeedbackResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserPoolAddOnNotEnabledException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Provides feedback for an authentication event as to whether it was from a valid user. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

\"\ - },\ - \"AdminUpdateDeviceStatus\":{\ - \"name\":\"AdminUpdateDeviceStatus\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminUpdateDeviceStatusRequest\"},\ - \"output\":{\"shape\":\"AdminUpdateDeviceStatusResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates the device status as an administrator.

Requires developer credentials.

\"\ - },\ - \"AdminUpdateUserAttributes\":{\ - \"name\":\"AdminUpdateUserAttributes\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminUpdateUserAttributesRequest\"},\ - \"output\":{\"shape\":\"AdminUpdateUserAttributesResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"AliasExistsException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates the specified user's attributes, including developer attributes, as an administrator. Works on any user.

For custom attributes, you must prepend the custom: prefix to the attribute name.

In addition to updating user attributes, this API can also be used to mark phone and email as verified.

Requires developer credentials.

\"\ - },\ - \"AdminUserGlobalSignOut\":{\ - \"name\":\"AdminUserGlobalSignOut\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AdminUserGlobalSignOutRequest\"},\ - \"output\":{\"shape\":\"AdminUserGlobalSignOutResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Signs out users from all devices, as an administrator.

Requires developer credentials.

\"\ - },\ - \"AssociateSoftwareToken\":{\ - \"name\":\"AssociateSoftwareToken\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"AssociateSoftwareTokenRequest\"},\ - \"output\":{\"shape\":\"AssociateSoftwareTokenResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"SoftwareTokenMFANotFoundException\"}\ - ],\ - \"documentation\":\"

Returns a unique generated shared secret key code for the user account. The request takes an access token or a session string, but not both.

\"\ - },\ - \"ChangePassword\":{\ - \"name\":\"ChangePassword\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ChangePasswordRequest\"},\ - \"output\":{\"shape\":\"ChangePasswordResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"InvalidPasswordException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Changes the password for a specified user in a user pool.

\",\ - \"authtype\":\"none\"\ - },\ - \"ConfirmDevice\":{\ - \"name\":\"ConfirmDevice\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ConfirmDeviceRequest\"},\ - \"output\":{\"shape\":\"ConfirmDeviceResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidPasswordException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"UsernameExistsException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Confirms tracking of the device. This API call is the call that begins device tracking.

\"\ - },\ - \"ConfirmForgotPassword\":{\ - \"name\":\"ConfirmForgotPassword\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ConfirmForgotPasswordRequest\"},\ - \"output\":{\"shape\":\"ConfirmForgotPasswordResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"InvalidPasswordException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"CodeMismatchException\"},\ - {\"shape\":\"ExpiredCodeException\"},\ - {\"shape\":\"TooManyFailedAttemptsException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Allows a user to enter a confirmation code to reset a forgotten password.

\",\ - \"authtype\":\"none\"\ - },\ - \"ConfirmSignUp\":{\ - \"name\":\"ConfirmSignUp\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ConfirmSignUpRequest\"},\ - \"output\":{\"shape\":\"ConfirmSignUpResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyFailedAttemptsException\"},\ - {\"shape\":\"CodeMismatchException\"},\ - {\"shape\":\"ExpiredCodeException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"AliasExistsException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Confirms registration of a user and handles the existing alias from a previous user.

\",\ - \"authtype\":\"none\"\ - },\ - \"CreateGroup\":{\ - \"name\":\"CreateGroup\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateGroupRequest\"},\ - \"output\":{\"shape\":\"CreateGroupResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"GroupExistsException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates a new group in the specified user pool.

Requires developer credentials.

\"\ - },\ - \"CreateIdentityProvider\":{\ - \"name\":\"CreateIdentityProvider\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateIdentityProviderRequest\"},\ - \"output\":{\"shape\":\"CreateIdentityProviderResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"DuplicateProviderException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates an identity provider for a user pool.

\"\ - },\ - \"CreateResourceServer\":{\ - \"name\":\"CreateResourceServer\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateResourceServerRequest\"},\ - \"output\":{\"shape\":\"CreateResourceServerResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates a new OAuth2.0 resource server and defines custom scopes in it.

\"\ - },\ - \"CreateUserImportJob\":{\ - \"name\":\"CreateUserImportJob\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateUserImportJobRequest\"},\ - \"output\":{\"shape\":\"CreateUserImportJobResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PreconditionNotMetException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates the user import job.

\"\ - },\ - \"CreateUserPool\":{\ - \"name\":\"CreateUserPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateUserPoolRequest\"},\ - \"output\":{\"shape\":\"CreateUserPoolResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserPoolTaggingException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

\"\ - },\ - \"CreateUserPoolClient\":{\ - \"name\":\"CreateUserPoolClient\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateUserPoolClientRequest\"},\ - \"output\":{\"shape\":\"CreateUserPoolClientResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ScopeDoesNotExistException\"},\ - {\"shape\":\"InvalidOAuthFlowException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates the user pool client.

\"\ - },\ - \"CreateUserPoolDomain\":{\ - \"name\":\"CreateUserPoolDomain\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateUserPoolDomainRequest\"},\ - \"output\":{\"shape\":\"CreateUserPoolDomainResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Creates a new domain for a user pool.

\"\ - },\ - \"DeleteGroup\":{\ - \"name\":\"DeleteGroup\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteGroupRequest\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes a group. Currently only groups with no members can be deleted.

Requires developer credentials.

\"\ - },\ - \"DeleteIdentityProvider\":{\ - \"name\":\"DeleteIdentityProvider\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteIdentityProviderRequest\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnsupportedIdentityProviderException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes an identity provider for a user pool.

\"\ - },\ - \"DeleteResourceServer\":{\ - \"name\":\"DeleteResourceServer\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteResourceServerRequest\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes a resource server.

\"\ - },\ - \"DeleteUser\":{\ - \"name\":\"DeleteUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteUserRequest\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Allows a user to delete himself or herself.

\",\ - \"authtype\":\"none\"\ - },\ - \"DeleteUserAttributes\":{\ - \"name\":\"DeleteUserAttributes\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteUserAttributesRequest\"},\ - \"output\":{\"shape\":\"DeleteUserAttributesResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes the attributes for a user.

\",\ - \"authtype\":\"none\"\ - },\ - \"DeleteUserPool\":{\ - \"name\":\"DeleteUserPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteUserPoolRequest\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserImportInProgressException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes the specified Amazon Cognito user pool.

\"\ - },\ - \"DeleteUserPoolClient\":{\ - \"name\":\"DeleteUserPoolClient\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteUserPoolClientRequest\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Allows the developer to delete the user pool client.

\"\ - },\ - \"DeleteUserPoolDomain\":{\ - \"name\":\"DeleteUserPoolDomain\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteUserPoolDomainRequest\"},\ - \"output\":{\"shape\":\"DeleteUserPoolDomainResponse\"},\ - \"errors\":[\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes a domain for a user pool.

\"\ - },\ - \"DescribeIdentityProvider\":{\ - \"name\":\"DescribeIdentityProvider\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeIdentityProviderRequest\"},\ - \"output\":{\"shape\":\"DescribeIdentityProviderResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets information about a specific identity provider.

\"\ - },\ - \"DescribeResourceServer\":{\ - \"name\":\"DescribeResourceServer\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeResourceServerRequest\"},\ - \"output\":{\"shape\":\"DescribeResourceServerResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Describes a resource server.

\"\ - },\ - \"DescribeRiskConfiguration\":{\ - \"name\":\"DescribeRiskConfiguration\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeRiskConfigurationRequest\"},\ - \"output\":{\"shape\":\"DescribeRiskConfigurationResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserPoolAddOnNotEnabledException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Describes the risk configuration.

\"\ - },\ - \"DescribeUserImportJob\":{\ - \"name\":\"DescribeUserImportJob\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeUserImportJobRequest\"},\ - \"output\":{\"shape\":\"DescribeUserImportJobResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Describes the user import job.

\"\ - },\ - \"DescribeUserPool\":{\ - \"name\":\"DescribeUserPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeUserPoolRequest\"},\ - \"output\":{\"shape\":\"DescribeUserPoolResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserPoolTaggingException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Returns the configuration information and metadata of the specified user pool.

\"\ - },\ - \"DescribeUserPoolClient\":{\ - \"name\":\"DescribeUserPoolClient\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeUserPoolClientRequest\"},\ - \"output\":{\"shape\":\"DescribeUserPoolClientResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Client method for returning the configuration information and metadata of the specified user pool app client.

\"\ - },\ - \"DescribeUserPoolDomain\":{\ - \"name\":\"DescribeUserPoolDomain\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeUserPoolDomainRequest\"},\ - \"output\":{\"shape\":\"DescribeUserPoolDomainResponse\"},\ - \"errors\":[\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets information about a domain.

\"\ - },\ - \"ForgetDevice\":{\ - \"name\":\"ForgetDevice\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ForgetDeviceRequest\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Forgets the specified device.

\"\ - },\ - \"ForgotPassword\":{\ - \"name\":\"ForgotPassword\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ForgotPasswordRequest\"},\ - \"output\":{\"shape\":\"ForgotPasswordResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"CodeDeliveryFailureException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. For the Username parameter, you can use the username or user alias. If a verified phone number exists for the user, the confirmation code is sent to the phone number. Otherwise, if a verified email exists, the confirmation code is sent to the email. If neither a verified phone number nor a verified email exists, InvalidParameterException is thrown. To use the confirmation code for resetting the password, call .

\",\ - \"authtype\":\"none\"\ - },\ - \"GetCSVHeader\":{\ - \"name\":\"GetCSVHeader\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetCSVHeaderRequest\"},\ - \"output\":{\"shape\":\"GetCSVHeaderResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the header information for the .csv file to be used as input for the user import job.

\"\ - },\ - \"GetDevice\":{\ - \"name\":\"GetDevice\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetDeviceRequest\"},\ - \"output\":{\"shape\":\"GetDeviceResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the device.

\"\ - },\ - \"GetGroup\":{\ - \"name\":\"GetGroup\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetGroupRequest\"},\ - \"output\":{\"shape\":\"GetGroupResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets a group.

Requires developer credentials.

\"\ - },\ - \"GetIdentityProviderByIdentifier\":{\ - \"name\":\"GetIdentityProviderByIdentifier\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetIdentityProviderByIdentifierRequest\"},\ - \"output\":{\"shape\":\"GetIdentityProviderByIdentifierResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the specified identity provider.

\"\ - },\ - \"GetSigningCertificate\":{\ - \"name\":\"GetSigningCertificate\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetSigningCertificateRequest\"},\ - \"output\":{\"shape\":\"GetSigningCertificateResponse\"},\ - \"errors\":[\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"ResourceNotFoundException\"}\ - ],\ - \"documentation\":\"

This method takes a user pool ID, and returns the signing certificate.

\"\ - },\ - \"GetUICustomization\":{\ - \"name\":\"GetUICustomization\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetUICustomizationRequest\"},\ - \"output\":{\"shape\":\"GetUICustomizationResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the UI Customization information for a particular app client's app UI, if there is something set. If nothing is set for the particular client, but there is an existing pool level customization (app clientId will be ALL), then that is returned. If nothing is present, then an empty shape is returned.

\"\ - },\ - \"GetUser\":{\ - \"name\":\"GetUser\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetUserRequest\"},\ - \"output\":{\"shape\":\"GetUserResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the user attributes and metadata for a user.

\",\ - \"authtype\":\"none\"\ - },\ - \"GetUserAttributeVerificationCode\":{\ - \"name\":\"GetUserAttributeVerificationCode\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetUserAttributeVerificationCodeRequest\"},\ - \"output\":{\"shape\":\"GetUserAttributeVerificationCodeResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"CodeDeliveryFailureException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the user attribute verification code for the specified attribute name.

\",\ - \"authtype\":\"none\"\ - },\ - \"GetUserPoolMfaConfig\":{\ - \"name\":\"GetUserPoolMfaConfig\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetUserPoolMfaConfigRequest\"},\ - \"output\":{\"shape\":\"GetUserPoolMfaConfigResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the user pool multi-factor authentication (MFA) configuration.

\"\ - },\ - \"GlobalSignOut\":{\ - \"name\":\"GlobalSignOut\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GlobalSignOutRequest\"},\ - \"output\":{\"shape\":\"GlobalSignOutResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Signs out users from all devices.

\"\ - },\ - \"InitiateAuth\":{\ - \"name\":\"InitiateAuth\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"InitiateAuthRequest\"},\ - \"output\":{\"shape\":\"InitiateAuthResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Initiates the authentication flow.

\"\ - },\ - \"ListDevices\":{\ - \"name\":\"ListDevices\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListDevicesRequest\"},\ - \"output\":{\"shape\":\"ListDevicesResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the devices.

\"\ - },\ - \"ListGroups\":{\ - \"name\":\"ListGroups\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListGroupsRequest\"},\ - \"output\":{\"shape\":\"ListGroupsResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the groups associated with a user pool.

Requires developer credentials.

\"\ - },\ - \"ListIdentityProviders\":{\ - \"name\":\"ListIdentityProviders\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListIdentityProvidersRequest\"},\ - \"output\":{\"shape\":\"ListIdentityProvidersResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists information about all identity providers for a user pool.

\"\ - },\ - \"ListResourceServers\":{\ - \"name\":\"ListResourceServers\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListResourceServersRequest\"},\ - \"output\":{\"shape\":\"ListResourceServersResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the resource servers for a user pool.

\"\ - },\ - \"ListUserImportJobs\":{\ - \"name\":\"ListUserImportJobs\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListUserImportJobsRequest\"},\ - \"output\":{\"shape\":\"ListUserImportJobsResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the user import jobs.

\"\ - },\ - \"ListUserPoolClients\":{\ - \"name\":\"ListUserPoolClients\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListUserPoolClientsRequest\"},\ - \"output\":{\"shape\":\"ListUserPoolClientsResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the clients that have been created for the specified user pool.

\"\ - },\ - \"ListUserPools\":{\ - \"name\":\"ListUserPools\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListUserPoolsRequest\"},\ - \"output\":{\"shape\":\"ListUserPoolsResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the user pools associated with an AWS account.

\"\ - },\ - \"ListUsers\":{\ - \"name\":\"ListUsers\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListUsersRequest\"},\ - \"output\":{\"shape\":\"ListUsersResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the users in the Amazon Cognito user pool.

\"\ - },\ - \"ListUsersInGroup\":{\ - \"name\":\"ListUsersInGroup\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListUsersInGroupRequest\"},\ - \"output\":{\"shape\":\"ListUsersInGroupResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the users in the specified group.

Requires developer credentials.

\"\ - },\ - \"ResendConfirmationCode\":{\ - \"name\":\"ResendConfirmationCode\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ResendConfirmationCodeRequest\"},\ - \"output\":{\"shape\":\"ResendConfirmationCodeResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"CodeDeliveryFailureException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Resends the confirmation (for confirmation of registration) to a specific user in the user pool.

\",\ - \"authtype\":\"none\"\ - },\ - \"RespondToAuthChallenge\":{\ - \"name\":\"RespondToAuthChallenge\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"RespondToAuthChallengeRequest\"},\ - \"output\":{\"shape\":\"RespondToAuthChallengeResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"CodeMismatchException\"},\ - {\"shape\":\"ExpiredCodeException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidPasswordException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"MFAMethodNotFoundException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"AliasExistsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"SoftwareTokenMFANotFoundException\"}\ - ],\ - \"documentation\":\"

Responds to the authentication challenge.

\"\ - },\ - \"SetRiskConfiguration\":{\ - \"name\":\"SetRiskConfiguration\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"SetRiskConfigurationRequest\"},\ - \"output\":{\"shape\":\"SetRiskConfigurationResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserPoolAddOnNotEnabledException\"},\ - {\"shape\":\"CodeDeliveryFailureException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Configures actions on detected risks. To delete the risk configuration for UserPoolId or ClientId, pass null values for all four configuration types.

To enable Amazon Cognito advanced security features, update the user pool to include the UserPoolAddOns keyAdvancedSecurityMode.

See .

\"\ - },\ - \"SetUICustomization\":{\ - \"name\":\"SetUICustomization\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"SetUICustomizationRequest\"},\ - \"output\":{\"shape\":\"SetUICustomizationResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Sets the UI customization information for a user pool's built-in app UI.

You can specify app UI customization settings for a single client (with a specific clientId) or for all clients (by setting the clientId to ALL). If you specify ALL, the default configuration will be used for every client that has no UI customization set previously. If you specify UI customization settings for a particular client, it will no longer fall back to the ALL configuration.

To use this API, your user pool must have a domain associated with it. Otherwise, there is no place to host the app's pages, and the service will throw an error.

\"\ - },\ - \"SetUserMFAPreference\":{\ - \"name\":\"SetUserMFAPreference\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"SetUserMFAPreferenceRequest\"},\ - \"output\":{\"shape\":\"SetUserMFAPreferenceResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Set the user's multi-factor authentication (MFA) method preference.

\"\ - },\ - \"SetUserPoolMfaConfig\":{\ - \"name\":\"SetUserPoolMfaConfig\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"SetUserPoolMfaConfigRequest\"},\ - \"output\":{\"shape\":\"SetUserPoolMfaConfigResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Set the user pool MFA configuration.

\"\ - },\ - \"SetUserSettings\":{\ - \"name\":\"SetUserSettings\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"SetUserSettingsRequest\"},\ - \"output\":{\"shape\":\"SetUserSettingsResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Sets the user settings like multi-factor authentication (MFA). If MFA is to be removed for a particular attribute pass the attribute with code delivery as null. If null list is passed, all MFA options are removed.

\",\ - \"authtype\":\"none\"\ - },\ - \"SignUp\":{\ - \"name\":\"SignUp\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"SignUpRequest\"},\ - \"output\":{\"shape\":\"SignUpResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidPasswordException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"UsernameExistsException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"CodeDeliveryFailureException\"}\ - ],\ - \"documentation\":\"

Registers the user in the specified user pool and creates a user name, password, and user attributes.

\",\ - \"authtype\":\"none\"\ - },\ - \"StartUserImportJob\":{\ - \"name\":\"StartUserImportJob\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"StartUserImportJobRequest\"},\ - \"output\":{\"shape\":\"StartUserImportJobResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"PreconditionNotMetException\"},\ - {\"shape\":\"NotAuthorizedException\"}\ - ],\ - \"documentation\":\"

Starts the user import.

\"\ - },\ - \"StopUserImportJob\":{\ - \"name\":\"StopUserImportJob\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"StopUserImportJobRequest\"},\ - \"output\":{\"shape\":\"StopUserImportJobResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"PreconditionNotMetException\"},\ - {\"shape\":\"NotAuthorizedException\"}\ - ],\ - \"documentation\":\"

Stops the user import job.

\"\ - },\ - \"UpdateAuthEventFeedback\":{\ - \"name\":\"UpdateAuthEventFeedback\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateAuthEventFeedbackRequest\"},\ - \"output\":{\"shape\":\"UpdateAuthEventFeedbackResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserPoolAddOnNotEnabledException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Provides the feedback for an authentication event whether it was from a valid user or not. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

\"\ - },\ - \"UpdateDeviceStatus\":{\ - \"name\":\"UpdateDeviceStatus\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateDeviceStatusRequest\"},\ - \"output\":{\"shape\":\"UpdateDeviceStatusResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates the device status.

\"\ - },\ - \"UpdateGroup\":{\ - \"name\":\"UpdateGroup\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateGroupRequest\"},\ - \"output\":{\"shape\":\"UpdateGroupResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates the specified group with the specified attributes.

Requires developer credentials.

\"\ - },\ - \"UpdateIdentityProvider\":{\ - \"name\":\"UpdateIdentityProvider\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateIdentityProviderRequest\"},\ - \"output\":{\"shape\":\"UpdateIdentityProviderResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"UnsupportedIdentityProviderException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates identity provider information for a user pool.

\"\ - },\ - \"UpdateResourceServer\":{\ - \"name\":\"UpdateResourceServer\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateResourceServerRequest\"},\ - \"output\":{\"shape\":\"UpdateResourceServerResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates the name and scopes of resource server. All other fields are read-only.

\"\ - },\ - \"UpdateUserAttributes\":{\ - \"name\":\"UpdateUserAttributes\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateUserAttributesRequest\"},\ - \"output\":{\"shape\":\"UpdateUserAttributesResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"CodeMismatchException\"},\ - {\"shape\":\"ExpiredCodeException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UnexpectedLambdaException\"},\ - {\"shape\":\"UserLambdaValidationException\"},\ - {\"shape\":\"InvalidLambdaResponseException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"AliasExistsException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"},\ - {\"shape\":\"CodeDeliveryFailureException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Allows a user to update a specific attribute (one at a time).

\",\ - \"authtype\":\"none\"\ - },\ - \"UpdateUserPool\":{\ - \"name\":\"UpdateUserPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateUserPoolRequest\"},\ - \"output\":{\"shape\":\"UpdateUserPoolResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ConcurrentModificationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"UserImportInProgressException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"InvalidSmsRoleAccessPolicyException\"},\ - {\"shape\":\"InvalidSmsRoleTrustRelationshipException\"},\ - {\"shape\":\"UserPoolTaggingException\"},\ - {\"shape\":\"InvalidEmailRoleAccessPolicyException\"}\ - ],\ - \"documentation\":\"

Updates the specified user pool with the specified attributes. If you don't provide a value for an attribute, it will be set to the default value. You can get a list of the current user pool settings with .

\"\ - },\ - \"UpdateUserPoolClient\":{\ - \"name\":\"UpdateUserPoolClient\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateUserPoolClientRequest\"},\ - \"output\":{\"shape\":\"UpdateUserPoolClientResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ConcurrentModificationException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ScopeDoesNotExistException\"},\ - {\"shape\":\"InvalidOAuthFlowException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates the specified user pool app client with the specified attributes. If you don't provide a value for an attribute, it will be set to the default value. You can get a list of the current user pool app client settings with .

\"\ - },\ - \"UpdateUserPoolDomain\":{\ - \"name\":\"UpdateUserPoolDomain\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UpdateUserPoolDomainRequest\"},\ - \"output\":{\"shape\":\"UpdateUserPoolDomainResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user pool.

You can use this operation to provide the Amazon Resource Name (ARN) of a new certificate to Amazon Cognito. You cannot use it to change the domain for a user pool.

A custom domain is used to host the Amazon Cognito hosted UI, which provides sign-up and sign-in pages for your application. When you set up a custom domain, you provide a certificate that you manage with AWS Certificate Manager (ACM). When necessary, you can use this operation to change the certificate that you applied to your custom domain.

Usually, this is unnecessary following routine certificate renewal with ACM. When you renew your existing certificate in ACM, the ARN for your certificate remains the same, and your custom domain uses the new certificate automatically.

However, if you replace your existing certificate with a new one, ACM gives the new certificate a new ARN. To apply the new certificate to your custom domain, you must provide this ARN to Amazon Cognito.

When you add your new certificate in ACM, you must choose US East (N. Virginia) as the AWS Region.

After you submit your request, Amazon Cognito requires up to 1 hour to distribute your new certificate to your custom domain.

For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

\"\ - },\ - \"VerifySoftwareToken\":{\ - \"name\":\"VerifySoftwareToken\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"VerifySoftwareTokenRequest\"},\ - \"output\":{\"shape\":\"VerifySoftwareTokenResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidUserPoolConfigurationException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"EnableSoftwareTokenMFAException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"SoftwareTokenMFANotFoundException\"},\ - {\"shape\":\"CodeMismatchException\"}\ - ],\ - \"documentation\":\"

Use this API to register a user's entered TOTP code and mark the user's software token MFA status as \\\"verified\\\" if successful. The request takes an access token or a session string, but not both.

\"\ - },\ - \"VerifyUserAttribute\":{\ - \"name\":\"VerifyUserAttribute\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"VerifyUserAttributeRequest\"},\ - \"output\":{\"shape\":\"VerifyUserAttributeResponse\"},\ - \"errors\":[\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"CodeMismatchException\"},\ - {\"shape\":\"ExpiredCodeException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"PasswordResetRequiredException\"},\ - {\"shape\":\"UserNotFoundException\"},\ - {\"shape\":\"UserNotConfirmedException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Verifies the specified user attributes in the user pool.

\",\ - \"authtype\":\"none\"\ - }\ - },\ - \"shapes\":{\ - \"AWSAccountIdType\":{\"type\":\"string\"},\ - \"AccountTakeoverActionNotifyType\":{\"type\":\"boolean\"},\ - \"AccountTakeoverActionType\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Notify\",\ - \"EventAction\"\ - ],\ - \"members\":{\ - \"Notify\":{\ - \"shape\":\"AccountTakeoverActionNotifyType\",\ - \"documentation\":\"

Flag specifying whether to send a notification.

\"\ - },\ - \"EventAction\":{\ - \"shape\":\"AccountTakeoverEventActionType\",\ - \"documentation\":\"

The event action.

  • BLOCK Choosing this action will block the request.

  • MFA_IF_CONFIGURED Throw MFA challenge if user has configured it, else allow the request.

  • MFA_REQUIRED Throw MFA challenge if user has configured it, else block the request.

  • NO_ACTION Allow the user sign-in.

\"\ - }\ - },\ - \"documentation\":\"

Account takeover action type.

\"\ - },\ - \"AccountTakeoverActionsType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"LowAction\":{\ - \"shape\":\"AccountTakeoverActionType\",\ - \"documentation\":\"

Action to take for a low risk.

\"\ - },\ - \"MediumAction\":{\ - \"shape\":\"AccountTakeoverActionType\",\ - \"documentation\":\"

Action to take for a medium risk.

\"\ - },\ - \"HighAction\":{\ - \"shape\":\"AccountTakeoverActionType\",\ - \"documentation\":\"

Action to take for a high risk.

\"\ - }\ - },\ - \"documentation\":\"

Account takeover actions type.

\"\ - },\ - \"AccountTakeoverEventActionType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"BLOCK\",\ - \"MFA_IF_CONFIGURED\",\ - \"MFA_REQUIRED\",\ - \"NO_ACTION\"\ - ]\ - },\ - \"AccountTakeoverRiskConfigurationType\":{\ - \"type\":\"structure\",\ - \"required\":[\"Actions\"],\ - \"members\":{\ - \"NotifyConfiguration\":{\ - \"shape\":\"NotifyConfigurationType\",\ - \"documentation\":\"

The notify configuration used to construct email notifications.

\"\ - },\ - \"Actions\":{\ - \"shape\":\"AccountTakeoverActionsType\",\ - \"documentation\":\"

Account takeover risk configuration actions

\"\ - }\ - },\ - \"documentation\":\"

Configuration for mitigation actions and notification for different levels of risk detected for a potential account takeover.

\"\ - },\ - \"AddCustomAttributesRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"CustomAttributes\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to add custom attributes.

\"\ - },\ - \"CustomAttributes\":{\ - \"shape\":\"CustomAttributesListType\",\ - \"documentation\":\"

An array of custom attributes, such as Mutable and Name.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to add custom attributes.

\"\ - },\ - \"AddCustomAttributesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server for the request to add custom attributes.

\"\ - },\ - \"AdminAddUserToGroupRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"GroupName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The username for the user.

\"\ - },\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The group name.

\"\ - }\ - }\ - },\ - \"AdminConfirmSignUpRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for which you want to confirm user registration.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name for which you want to confirm user registration.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to confirm user registration.

\"\ - },\ - \"AdminConfirmSignUpResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server for the request to confirm registration.

\"\ - },\ - \"AdminCreateUserConfigType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"AllowAdminCreateUserOnly\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Set to True if only the administrator is allowed to create user profiles. Set to False if users can sign themselves up via an app.

\"\ - },\ - \"UnusedAccountValidityDays\":{\ - \"shape\":\"AdminCreateUserUnusedAccountValidityDaysType\",\ - \"documentation\":\"

The user account expiration limit, in days, after which the account is no longer usable. To reset the account after that time limit, you must call AdminCreateUser again, specifying \\\"RESEND\\\" for the MessageAction parameter. The default value for this parameter is 7.

\"\ - },\ - \"InviteMessageTemplate\":{\ - \"shape\":\"MessageTemplateType\",\ - \"documentation\":\"

The message template to be used for the welcome message to new users.

See also Customizing User Invitation Messages.

\"\ - }\ - },\ - \"documentation\":\"

The configuration for creating a new user profile.

\"\ - },\ - \"AdminCreateUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where the user will be created.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The username for the user. Must be unique within the user pool. Must be a UTF-8 string between 1 and 128 characters. After the user is created, the username cannot be changed.

\"\ - },\ - \"UserAttributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

An array of name-value pairs that contain user attributes and attribute values to be set for the user to be created. You can create a user without specifying any attributes other than Username. However, any attributes that you specify as required (in or in the Attributes tab of the console) must be supplied either by you (in your call to AdminCreateUser) or by the user (when he or she signs up in response to your welcome message).

For custom attributes, you must prepend the custom: prefix to the attribute name.

To send a message inviting the user to sign up, you must specify the user's email address or phone number. This can be done in your call to AdminCreateUser or in the Users tab of the Amazon Cognito console for managing your user pools.

In your call to AdminCreateUser, you can set the email_verified attribute to True, and you can set the phone_number_verified attribute to True. (You can also do this by calling .)

  • email: The email address of the user to whom the message that contains the code and username will be sent. Required if the email_verified attribute is set to True, or if \\\"EMAIL\\\" is specified in the DesiredDeliveryMediums parameter.

  • phone_number: The phone number of the user to whom the message that contains the code and username will be sent. Required if the phone_number_verified attribute is set to True, or if \\\"SMS\\\" is specified in the DesiredDeliveryMediums parameter.

\"\ - },\ - \"ValidationData\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

The user's validation data. This is an array of name-value pairs that contain user attributes and attribute values that you can use for custom validation, such as restricting the types of user accounts that can be registered. For example, you might choose to allow or disallow user sign-up based on the user's domain.

To configure custom validation, you must create a Pre Sign-up Lambda trigger for the user pool as described in the Amazon Cognito Developer Guide. The Lambda trigger receives the validation data and uses it in the validation process.

The user's validation data is not persisted.

\"\ - },\ - \"TemporaryPassword\":{\ - \"shape\":\"PasswordType\",\ - \"documentation\":\"

The user's temporary password. This password must conform to the password policy that you specified when you created the user pool.

The temporary password is valid only once. To complete the Admin Create User flow, the user must enter the temporary password in the sign-in page along with a new password to be used in all future sign-ins.

This parameter is not required. If you do not specify a value, Amazon Cognito generates one for you.

The temporary password can only be used until the user account expiration limit that you specified when you created the user pool. To reset the account after that time limit, you must call AdminCreateUser again, specifying \\\"RESEND\\\" for the MessageAction parameter.

\"\ - },\ - \"ForceAliasCreation\":{\ - \"shape\":\"ForceAliasCreation\",\ - \"documentation\":\"

This parameter is only used if the phone_number_verified or email_verified attribute is set to True. Otherwise, it is ignored.

If this parameter is set to True and the phone number or email address specified in the UserAttributes parameter already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user. The previous user will no longer be able to log in using that alias.

If this parameter is set to False, the API throws an AliasExistsException error if the alias already exists. The default value is False.

\"\ - },\ - \"MessageAction\":{\ - \"shape\":\"MessageActionType\",\ - \"documentation\":\"

Set to \\\"RESEND\\\" to resend the invitation message to a user that already exists and reset the expiration limit on the user's account. Set to \\\"SUPPRESS\\\" to suppress sending the message. Only one value can be specified.

\"\ - },\ - \"DesiredDeliveryMediums\":{\ - \"shape\":\"DeliveryMediumListType\",\ - \"documentation\":\"

Specify \\\"EMAIL\\\" if email will be used to send the welcome message. Specify \\\"SMS\\\" if the phone number will be used. The default value is \\\"SMS\\\". More than one value can be specified.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to create a user in the specified user pool.

\"\ - },\ - \"AdminCreateUserResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"User\":{\ - \"shape\":\"UserType\",\ - \"documentation\":\"

The newly created user.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to create the user.

\"\ - },\ - \"AdminCreateUserUnusedAccountValidityDaysType\":{\ - \"type\":\"integer\",\ - \"max\":365,\ - \"min\":0\ - },\ - \"AdminDeleteUserAttributesRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"UserAttributeNames\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to delete user attributes.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user from which you would like to delete attributes.

\"\ - },\ - \"UserAttributeNames\":{\ - \"shape\":\"AttributeNameListType\",\ - \"documentation\":\"

An array of strings representing the user attribute names you wish to delete.

For custom attributes, you must prepend the custom: prefix to the attribute name.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to delete user attributes as an administrator.

\"\ - },\ - \"AdminDeleteUserAttributesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response received from the server for a request to delete user attributes.

\"\ - },\ - \"AdminDeleteUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to delete the user.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user you wish to delete.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to delete a user as an administrator.

\"\ - },\ - \"AdminDisableProviderForUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"User\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"User\":{\ - \"shape\":\"ProviderUserIdentifierType\",\ - \"documentation\":\"

The user to be disabled.

\"\ - }\ - }\ - },\ - \"AdminDisableProviderForUserResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - }\ - },\ - \"AdminDisableUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to disable the user.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user you wish to disable.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to disable any user as an administrator.

\"\ - },\ - \"AdminDisableUserResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response received from the server to disable the user as an administrator.

\"\ - },\ - \"AdminEnableUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to enable the user.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user you wish to enable.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request that enables the user as an administrator.

\"\ - },\ - \"AdminEnableUserResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server for the request to enable a user as an administrator.

\"\ - },\ - \"AdminForgetDeviceRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"DeviceKey\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name.

\"\ - },\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - }\ - },\ - \"documentation\":\"

Sends the forgot device request, as an administrator.

\"\ - },\ - \"AdminGetDeviceRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"DeviceKey\",\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to get the device, as an administrator.

\"\ - },\ - \"AdminGetDeviceResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"Device\"],\ - \"members\":{\ - \"Device\":{\ - \"shape\":\"DeviceType\",\ - \"documentation\":\"

The device.

\"\ - }\ - },\ - \"documentation\":\"

Gets the device response, as an administrator.

\"\ - },\ - \"AdminGetUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to get information about the user.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user you wish to retrieve.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to get the specified user as an administrator.

\"\ - },\ - \"AdminGetUserResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"Username\"],\ - \"members\":{\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user about whom you are receiving information.

\"\ - },\ - \"UserAttributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

An array of name-value pairs representing user attributes.

\"\ - },\ - \"UserCreateDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user was created.

\"\ - },\ - \"UserLastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user was last modified.

\"\ - },\ - \"Enabled\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Indicates that the status is enabled.

\"\ - },\ - \"UserStatus\":{\ - \"shape\":\"UserStatusType\",\ - \"documentation\":\"

The user status. Can be one of the following:

  • UNCONFIRMED - User has been created but not confirmed.

  • CONFIRMED - User has been confirmed.

  • ARCHIVED - User is no longer active.

  • COMPROMISED - User is disabled due to a potential security threat.

  • UNKNOWN - User status is not known.

\"\ - },\ - \"MFAOptions\":{\ - \"shape\":\"MFAOptionListType\",\ - \"documentation\":\"

Specifies the options for MFA (e.g., email or phone number).

\"\ - },\ - \"PreferredMfaSetting\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user's preferred MFA setting.

\"\ - },\ - \"UserMFASettingList\":{\ - \"shape\":\"UserMFASettingListType\",\ - \"documentation\":\"

The list of the user's MFA settings.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server from the request to get the specified user as an administrator.

\"\ - },\ - \"AdminInitiateAuthRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ClientId\",\ - \"AuthFlow\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The ID of the Amazon Cognito user pool.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID.

\"\ - },\ - \"AuthFlow\":{\ - \"shape\":\"AuthFlowType\",\ - \"documentation\":\"

The authentication flow for this call to execute. The API action will depend on this value. For example:

  • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

  • USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.

  • USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

Valid values include:

  • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

  • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

  • CUSTOM_AUTH: Custom authentication flow.

  • ADMIN_NO_SRP_AUTH: Non-SRP authentication flow; you can pass in the USERNAME and PASSWORD directly if the flow is enabled for calling the app client.

  • USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.

\"\ - },\ - \"AuthParameters\":{\ - \"shape\":\"AuthParametersType\",\ - \"documentation\":\"

The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:

  • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For ADMIN_NO_SRP_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), PASSWORD (required), DEVICE_KEY

  • For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY

\"\ - },\ - \"ClientMetadata\":{\ - \"shape\":\"ClientMetadataType\",\ - \"documentation\":\"

This is a random key-value pair map which can contain any key and will be passed to your PreAuthentication Lambda trigger as-is. It can be used to implement additional validations around authentication.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The analytics metadata for collecting Amazon Pinpoint metrics for AdminInitiateAuth calls.

\"\ - },\ - \"ContextData\":{\ - \"shape\":\"ContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

Initiates the authorization request, as an administrator.

\"\ - },\ - \"AdminInitiateAuthResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ChallengeName\":{\ - \"shape\":\"ChallengeNameType\",\ - \"documentation\":\"

The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge.

  • MFA_SETUP: If MFA is required, users who do not have at least one of the MFA methods set up are presented with an MFA_SETUP challenge. The user must set up at least one MFA type to continue to authenticate.

  • SELECT_MFA_TYPE: Selects the MFA type. Valid MFA options are SMS_MFA for text SMS MFA, and SOFTWARE_TOKEN_MFA for TOTP software token MFA.

  • SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.

  • PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.

  • CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.

  • DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.

  • DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.

  • ADMIN_NO_SRP_AUTH: This is returned if you need to authenticate with USERNAME and PASSWORD directly. An app client must be enabled to use this flow.

  • NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. If AdminInitiateAuth or AdminRespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next AdminRespondToAuthChallenge API call.

\"\ - },\ - \"ChallengeParameters\":{\ - \"shape\":\"ChallengeParametersType\",\ - \"documentation\":\"

The challenge parameters. These are returned to you in the AdminInitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (AdminRespondToAuthChallenge).

All challenges require USERNAME and SECRET_HASH (if applicable).

The value of the USER_ID_FOR_SRP attribute will be the user's actual username, not an alias (such as email address or phone number), even if you specified an alias in your call to AdminInitiateAuth. This is because, in the AdminRespondToAuthChallenge API ChallengeResponses, the USERNAME attribute cannot be an alias.

\"\ - },\ - \"AuthenticationResult\":{\ - \"shape\":\"AuthenticationResultType\",\ - \"documentation\":\"

The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.

\"\ - }\ - },\ - \"documentation\":\"

Initiates the authentication response, as an administrator.

\"\ - },\ - \"AdminLinkProviderForUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"DestinationUser\",\ - \"SourceUser\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"DestinationUser\":{\ - \"shape\":\"ProviderUserIdentifierType\",\ - \"documentation\":\"

The existing user in the user pool to be linked to the external identity provider user account. Can be a native (Username + Password) Cognito User Pools user or a federated user (for example, a SAML or Facebook user). If the user doesn't exist, an exception is thrown. This is the user that is returned when the new user (with the linked identity provider attribute) signs in.

For a native username + password user, the ProviderAttributeValue for the DestinationUser should be the username in the user pool. For a federated user, it should be the provider-specific user_id.

The ProviderAttributeName of the DestinationUser is ignored.

The ProviderName should be set to Cognito for users in Cognito user pools.

\"\ - },\ - \"SourceUser\":{\ - \"shape\":\"ProviderUserIdentifierType\",\ - \"documentation\":\"

An external identity provider account for a user who does not currently exist yet in the user pool. This user must be a federated user (for example, a SAML or Facebook user), not another native user.

If the SourceUser is a federated social identity provider user (Facebook, Google, or Login with Amazon), you must set the ProviderAttributeName to Cognito_Subject. For social identity providers, the ProviderName will be Facebook, Google, or LoginWithAmazon, and Cognito will automatically parse the Facebook, Google, and Login with Amazon tokens for id, sub, and user_id, respectively. The ProviderAttributeValue for the user must be the same value as the id, sub, or user_id value found in the social identity provider token.

For SAML, the ProviderAttributeName can be any value that matches a claim in the SAML assertion. If you wish to link SAML users based on the subject of the SAML assertion, you should map the subject to a claim through the SAML identity provider and submit that claim name as the ProviderAttributeName. If you set ProviderAttributeName to Cognito_Subject, Cognito will automatically parse the default unique identifier found in the subject from the SAML token.

\"\ - }\ - }\ - },\ - \"AdminLinkProviderForUserResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - }\ - },\ - \"AdminListDevicesRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name.

\"\ - },\ - \"Limit\":{\ - \"shape\":\"QueryLimitType\",\ - \"documentation\":\"

The limit of the devices request.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"SearchPaginationTokenType\",\ - \"documentation\":\"

The pagination token.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to list devices, as an administrator.

\"\ - },\ - \"AdminListDevicesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Devices\":{\ - \"shape\":\"DeviceListType\",\ - \"documentation\":\"

The devices in the list of devices response.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"SearchPaginationTokenType\",\ - \"documentation\":\"

The pagination token.

\"\ - }\ - },\ - \"documentation\":\"

Lists the device's response, as an administrator.

\"\ - },\ - \"AdminListGroupsForUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Username\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The username for the user.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Limit\":{\ - \"shape\":\"QueryLimitType\",\ - \"documentation\":\"

The limit of the request to list groups.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - }\ - },\ - \"AdminListGroupsForUserResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Groups\":{\ - \"shape\":\"GroupListType\",\ - \"documentation\":\"

The groups that the user belongs to.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - }\ - },\ - \"AdminListUserAuthEventsRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user pool username or an alias.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"QueryLimitType\",\ - \"documentation\":\"

The maximum number of authentication events to return.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - }\ - },\ - \"AdminListUserAuthEventsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"AuthEvents\":{\ - \"shape\":\"AuthEventsType\",\ - \"documentation\":\"

The response object. It includes the EventID, EventType, CreationDate, EventRisk, and EventResponse.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - }\ - },\ - \"AdminRemoveUserFromGroupRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"GroupName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The username for the user.

\"\ - },\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The group name.

\"\ - }\ - }\ - },\ - \"AdminResetUserPasswordRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to reset the user's password.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user whose password you wish to reset.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to reset a user's password as an administrator.

\"\ - },\ - \"AdminResetUserPasswordResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server to reset a user password as an administrator.

\"\ - },\ - \"AdminRespondToAuthChallengeRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ClientId\",\ - \"ChallengeName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The ID of the Amazon Cognito user pool.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID.

\"\ - },\ - \"ChallengeName\":{\ - \"shape\":\"ChallengeNameType\",\ - \"documentation\":\"

The challenge name. For more information, see .

\"\ - },\ - \"ChallengeResponses\":{\ - \"shape\":\"ChallengeResponsesType\",\ - \"documentation\":\"

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

  • SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • ADMIN_NO_SRP_AUTH: PASSWORD, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME, SECRET_HASH (if app client is configured with client secret).

The value of the USERNAME attribute must be the user's actual username, not an alias (such as email address or phone number). To make this easier, the AdminInitiateAuth response includes the actual username value in the USERNAMEUSER_ID_FOR_SRP attribute, even if you specified an alias in your call to AdminInitiateAuth.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The analytics metadata for collecting Amazon Pinpoint metrics for AdminRespondToAuthChallenge calls.

\"\ - },\ - \"ContextData\":{\ - \"shape\":\"ContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

The request to respond to the authentication challenge, as an administrator.

\"\ - },\ - \"AdminRespondToAuthChallengeResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ChallengeName\":{\ - \"shape\":\"ChallengeNameType\",\ - \"documentation\":\"

The name of the challenge. For more information, see .

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. If the or API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

\"\ - },\ - \"ChallengeParameters\":{\ - \"shape\":\"ChallengeParametersType\",\ - \"documentation\":\"

The challenge parameters. For more information, see .

\"\ - },\ - \"AuthenticationResult\":{\ - \"shape\":\"AuthenticationResultType\",\ - \"documentation\":\"

The result returned by the server in response to the authentication request.

\"\ - }\ - },\ - \"documentation\":\"

Responds to the authentication challenge, as an administrator.

\"\ - },\ - \"AdminSetUserMFAPreferenceRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Username\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"SMSMfaSettings\":{\ - \"shape\":\"SMSMfaSettingsType\",\ - \"documentation\":\"

The SMS text message MFA settings.

\"\ - },\ - \"SoftwareTokenMfaSettings\":{\ - \"shape\":\"SoftwareTokenMfaSettingsType\",\ - \"documentation\":\"

The time-based one-time password software token MFA settings.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user pool username or alias.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - }\ - }\ - },\ - \"AdminSetUserMFAPreferenceResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - }\ - },\ - \"AdminSetUserSettingsRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"MFAOptions\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to set the user's settings, such as MFA options.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user for whom you wish to set user settings.

\"\ - },\ - \"MFAOptions\":{\ - \"shape\":\"MFAOptionListType\",\ - \"documentation\":\"

Specifies the options for MFA (e.g., email or phone number).

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to set user settings as an administrator.

\"\ - },\ - \"AdminSetUserSettingsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server to set user settings as an administrator.

\"\ - },\ - \"AdminUpdateAuthEventFeedbackRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"EventId\",\ - \"FeedbackValue\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user pool username.

\"\ - },\ - \"EventId\":{\ - \"shape\":\"EventIdType\",\ - \"documentation\":\"

The authentication event ID.

\"\ - },\ - \"FeedbackValue\":{\ - \"shape\":\"FeedbackValueType\",\ - \"documentation\":\"

The authentication event feedback value.

\"\ - }\ - }\ - },\ - \"AdminUpdateAuthEventFeedbackResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - }\ - },\ - \"AdminUpdateDeviceStatusRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"DeviceKey\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name.

\"\ - },\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - },\ - \"DeviceRememberedStatus\":{\ - \"shape\":\"DeviceRememberedStatusType\",\ - \"documentation\":\"

The status indicating whether a device has been remembered or not.

\"\ - }\ - },\ - \"documentation\":\"

The request to update the device status, as an administrator.

\"\ - },\ - \"AdminUpdateDeviceStatusResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

The status response from the request to update the device, as an administrator.

\"\ - },\ - \"AdminUpdateUserAttributesRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"UserAttributes\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to update user attributes.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user for whom you want to update user attributes.

\"\ - },\ - \"UserAttributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to update the user's attributes as an administrator.

\"\ - },\ - \"AdminUpdateUserAttributesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server for the request to update user attributes as an administrator.

\"\ - },\ - \"AdminUserGlobalSignOutRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name.

\"\ - }\ - },\ - \"documentation\":\"

The request to sign out of all devices, as an administrator.

\"\ - },\ - \"AdminUserGlobalSignOutResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

The global sign-out response, as an administrator.

\"\ - },\ - \"AdvancedSecurityModeType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"OFF\",\ - \"AUDIT\",\ - \"ENFORCED\"\ - ]\ - },\ - \"AliasAttributeType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"phone_number\",\ - \"email\",\ - \"preferred_username\"\ - ]\ - },\ - \"AliasAttributesListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"AliasAttributeType\"}\ - },\ - \"AliasExistsException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message sent to the user when an alias exists.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a user tries to confirm the account with an email or phone number that has already been supplied as an alias from a different account. This exception tells user that an account with this email or phone already exists.

\",\ - \"exception\":true\ - },\ - \"AnalyticsConfigurationType\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ApplicationId\",\ - \"RoleArn\",\ - \"ExternalId\"\ - ],\ - \"members\":{\ - \"ApplicationId\":{\ - \"shape\":\"HexStringType\",\ - \"documentation\":\"

The application ID for an Amazon Pinpoint application.

\"\ - },\ - \"RoleArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The ARN of an IAM role that authorizes Amazon Cognito to publish events to Amazon Pinpoint analytics.

\"\ - },\ - \"ExternalId\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The external ID.

\"\ - },\ - \"UserDataShared\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

If UserDataShared is true, Amazon Cognito will include user data in the events it publishes to Amazon Pinpoint analytics.

\"\ - }\ - },\ - \"documentation\":\"

The Amazon Pinpoint analytics configuration for collecting metrics for a user pool.

\"\ - },\ - \"AnalyticsMetadataType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"AnalyticsEndpointId\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The endpoint ID.

\"\ - }\ - },\ - \"documentation\":\"

An Amazon Pinpoint analytics endpoint.

An endpoint uniquely identifies a mobile device, email address, or phone number that can receive messages from Amazon Pinpoint analytics.

\"\ - },\ - \"ArnType\":{\ - \"type\":\"string\",\ - \"max\":2048,\ - \"min\":20,\ - \"pattern\":\"arn:[\\\\w+=/,.@-]+:[\\\\w+=/,.@-]+:([\\\\w+=/,.@-]*)?:[0-9]+:[\\\\w+=/,.@-]+(:[\\\\w+=/,.@-]+)?(:[\\\\w+=/,.@-]+)?\"\ - },\ - \"AssociateSoftwareTokenRequest\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

\"\ - }\ - }\ - },\ - \"AssociateSoftwareTokenResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"SecretCode\":{\ - \"shape\":\"SecretCodeType\",\ - \"documentation\":\"

A unique generated shared secret code that is used in the TOTP algorithm to generate a one time code.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. This allows authentication of the user as part of the MFA setup process.

\"\ - }\ - }\ - },\ - \"AttributeDataType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"String\",\ - \"Number\",\ - \"DateTime\",\ - \"Boolean\"\ - ]\ - },\ - \"AttributeListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"AttributeType\"}\ - },\ - \"AttributeMappingKeyType\":{\ - \"type\":\"string\",\ - \"max\":32,\ - \"min\":1\ - },\ - \"AttributeMappingType\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"AttributeMappingKeyType\"},\ - \"value\":{\"shape\":\"StringType\"}\ - },\ - \"AttributeNameListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"AttributeNameType\"}\ - },\ - \"AttributeNameType\":{\ - \"type\":\"string\",\ - \"max\":32,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\"\ - },\ - \"AttributeType\":{\ - \"type\":\"structure\",\ - \"required\":[\"Name\"],\ - \"members\":{\ - \"Name\":{\ - \"shape\":\"AttributeNameType\",\ - \"documentation\":\"

The name of the attribute.

\"\ - },\ - \"Value\":{\ - \"shape\":\"AttributeValueType\",\ - \"documentation\":\"

The value of the attribute.

\"\ - }\ - },\ - \"documentation\":\"

Specifies whether the attribute is standard or custom.

\"\ - },\ - \"AttributeValueType\":{\ - \"type\":\"string\",\ - \"max\":2048,\ - \"sensitive\":true\ - },\ - \"AuthEventType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"EventId\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The event ID.

\"\ - },\ - \"EventType\":{\ - \"shape\":\"EventType\",\ - \"documentation\":\"

The event type.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The creation date

\"\ - },\ - \"EventResponse\":{\ - \"shape\":\"EventResponseType\",\ - \"documentation\":\"

The event response.

\"\ - },\ - \"EventRisk\":{\ - \"shape\":\"EventRiskType\",\ - \"documentation\":\"

The event risk.

\"\ - },\ - \"ChallengeResponses\":{\ - \"shape\":\"ChallengeResponseListType\",\ - \"documentation\":\"

The challenge responses.

\"\ - },\ - \"EventContextData\":{\ - \"shape\":\"EventContextDataType\",\ - \"documentation\":\"

The user context data captured at the time of an event request. It provides additional information about the client from which event the request is received.

\"\ - },\ - \"EventFeedback\":{\ - \"shape\":\"EventFeedbackType\",\ - \"documentation\":\"

A flag specifying the user feedback captured at the time of an event request is good or bad.

\"\ - }\ - },\ - \"documentation\":\"

The authentication event type.

\"\ - },\ - \"AuthEventsType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"AuthEventType\"}\ - },\ - \"AuthFlowType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"USER_SRP_AUTH\",\ - \"REFRESH_TOKEN_AUTH\",\ - \"REFRESH_TOKEN\",\ - \"CUSTOM_AUTH\",\ - \"ADMIN_NO_SRP_AUTH\",\ - \"USER_PASSWORD_AUTH\"\ - ]\ - },\ - \"AuthParametersType\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"StringType\"},\ - \"value\":{\"shape\":\"StringType\"}\ - },\ - \"AuthenticationResultType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - },\ - \"ExpiresIn\":{\ - \"shape\":\"IntegerType\",\ - \"documentation\":\"

The expiration period of the authentication result in seconds.

\"\ - },\ - \"TokenType\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The token type.

\"\ - },\ - \"RefreshToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The refresh token.

\"\ - },\ - \"IdToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The ID token.

\"\ - },\ - \"NewDeviceMetadata\":{\ - \"shape\":\"NewDeviceMetadataType\",\ - \"documentation\":\"

The new device metadata from an authentication result.

\"\ - }\ - },\ - \"documentation\":\"

The authentication result.

\"\ - },\ - \"BlockedIPRangeListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"StringType\"},\ - \"max\":20\ - },\ - \"BooleanType\":{\"type\":\"boolean\"},\ - \"CSSType\":{\"type\":\"string\"},\ - \"CSSVersionType\":{\"type\":\"string\"},\ - \"CallbackURLsListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"RedirectUrlType\"},\ - \"max\":100,\ - \"min\":0\ - },\ - \"ChallengeName\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Password\",\ - \"Mfa\"\ - ]\ - },\ - \"ChallengeNameType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"SMS_MFA\",\ - \"SOFTWARE_TOKEN_MFA\",\ - \"SELECT_MFA_TYPE\",\ - \"MFA_SETUP\",\ - \"PASSWORD_VERIFIER\",\ - \"CUSTOM_CHALLENGE\",\ - \"DEVICE_SRP_AUTH\",\ - \"DEVICE_PASSWORD_VERIFIER\",\ - \"ADMIN_NO_SRP_AUTH\",\ - \"NEW_PASSWORD_REQUIRED\"\ - ]\ - },\ - \"ChallengeParametersType\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"StringType\"},\ - \"value\":{\"shape\":\"StringType\"}\ - },\ - \"ChallengeResponse\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Success\",\ - \"Failure\"\ - ]\ - },\ - \"ChallengeResponseListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ChallengeResponseType\"}\ - },\ - \"ChallengeResponseType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ChallengeName\":{\ - \"shape\":\"ChallengeName\",\ - \"documentation\":\"

The challenge name

\"\ - },\ - \"ChallengeResponse\":{\ - \"shape\":\"ChallengeResponse\",\ - \"documentation\":\"

The challenge response.

\"\ - }\ - },\ - \"documentation\":\"

The challenge response type.

\"\ - },\ - \"ChallengeResponsesType\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"StringType\"},\ - \"value\":{\"shape\":\"StringType\"}\ - },\ - \"ChangePasswordRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"PreviousPassword\",\ - \"ProposedPassword\",\ - \"AccessToken\"\ - ],\ - \"members\":{\ - \"PreviousPassword\":{\ - \"shape\":\"PasswordType\",\ - \"documentation\":\"

The old password.

\"\ - },\ - \"ProposedPassword\":{\ - \"shape\":\"PasswordType\",\ - \"documentation\":\"

The new password.

\"\ - },\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to change a user password.

\"\ - },\ - \"ChangePasswordResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

The response from the server to the change password request.

\"\ - },\ - \"ClientIdType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w+]+\",\ - \"sensitive\":true\ - },\ - \"ClientMetadataType\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"StringType\"},\ - \"value\":{\"shape\":\"StringType\"}\ - },\ - \"ClientNameType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w\\\\s+=,.@-]+\"\ - },\ - \"ClientPermissionListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ClientPermissionType\"}\ - },\ - \"ClientPermissionType\":{\ - \"type\":\"string\",\ - \"max\":2048,\ - \"min\":1\ - },\ - \"ClientSecretType\":{\ - \"type\":\"string\",\ - \"max\":64,\ - \"min\":1,\ - \"pattern\":\"[\\\\w+]+\",\ - \"sensitive\":true\ - },\ - \"CodeDeliveryDetailsListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"CodeDeliveryDetailsType\"}\ - },\ - \"CodeDeliveryDetailsType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Destination\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The destination for the code delivery details.

\"\ - },\ - \"DeliveryMedium\":{\ - \"shape\":\"DeliveryMediumType\",\ - \"documentation\":\"

The delivery medium (email message or phone number).

\"\ - },\ - \"AttributeName\":{\ - \"shape\":\"AttributeNameType\",\ - \"documentation\":\"

The attribute name.

\"\ - }\ - },\ - \"documentation\":\"

The code delivery details being returned from the server.

\"\ - },\ - \"CodeDeliveryFailureException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message sent when a verification code fails to deliver successfully.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a verification code fails to deliver successfully.

\",\ - \"exception\":true\ - },\ - \"CodeMismatchException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message provided when the code mismatch exception is thrown.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown if the provided code does not match what the server was expecting.

\",\ - \"exception\":true\ - },\ - \"CompletionMessageType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w]+\"\ - },\ - \"CompromisedCredentialsActionsType\":{\ - \"type\":\"structure\",\ - \"required\":[\"EventAction\"],\ - \"members\":{\ - \"EventAction\":{\ - \"shape\":\"CompromisedCredentialsEventActionType\",\ - \"documentation\":\"

The event action.

\"\ - }\ - },\ - \"documentation\":\"

The compromised credentials actions type

\"\ - },\ - \"CompromisedCredentialsEventActionType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"BLOCK\",\ - \"NO_ACTION\"\ - ]\ - },\ - \"CompromisedCredentialsRiskConfigurationType\":{\ - \"type\":\"structure\",\ - \"required\":[\"Actions\"],\ - \"members\":{\ - \"EventFilter\":{\ - \"shape\":\"EventFiltersType\",\ - \"documentation\":\"

Perform the action for these events. The default is to perform all events if no event filter is specified.

\"\ - },\ - \"Actions\":{\ - \"shape\":\"CompromisedCredentialsActionsType\",\ - \"documentation\":\"

The compromised credentials risk configuration actions.

\"\ - }\ - },\ - \"documentation\":\"

The compromised credentials risk configuration type.

\"\ - },\ - \"ConcurrentModificationException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message provided when the concurrent exception is thrown.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown if two or more modifications are happening concurrently.

\",\ - \"exception\":true\ - },\ - \"ConfirmDeviceRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"AccessToken\",\ - \"DeviceKey\"\ - ],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - },\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - },\ - \"DeviceSecretVerifierConfig\":{\ - \"shape\":\"DeviceSecretVerifierConfigType\",\ - \"documentation\":\"

The configuration of the device secret verifier.

\"\ - },\ - \"DeviceName\":{\ - \"shape\":\"DeviceNameType\",\ - \"documentation\":\"

The device name.

\"\ - }\ - },\ - \"documentation\":\"

Confirms the device request.

\"\ - },\ - \"ConfirmDeviceResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserConfirmationNecessary\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Indicates whether the user confirmation is necessary to confirm the device response.

\"\ - }\ - },\ - \"documentation\":\"

Confirms the device response.

\"\ - },\ - \"ConfirmForgotPasswordRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ClientId\",\ - \"Username\",\ - \"ConfirmationCode\",\ - \"Password\"\ - ],\ - \"members\":{\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID of the app associated with the user pool.

\"\ - },\ - \"SecretHash\":{\ - \"shape\":\"SecretHashType\",\ - \"documentation\":\"

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user for whom you want to enter a code to retrieve a forgotten password.

\"\ - },\ - \"ConfirmationCode\":{\ - \"shape\":\"ConfirmationCodeType\",\ - \"documentation\":\"

The confirmation code sent by a user's request to retrieve a forgotten password. For more information, see

\"\ - },\ - \"Password\":{\ - \"shape\":\"PasswordType\",\ - \"documentation\":\"

The password sent by a user's request to retrieve a forgotten password.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmForgotPassword calls.

\"\ - },\ - \"UserContextData\":{\ - \"shape\":\"UserContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

The request representing the confirmation for a password reset.

\"\ - },\ - \"ConfirmForgotPasswordResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

The response from the server that results from a user's request to retrieve a forgotten password.

\"\ - },\ - \"ConfirmSignUpRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ClientId\",\ - \"Username\",\ - \"ConfirmationCode\"\ - ],\ - \"members\":{\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The ID of the app client associated with the user pool.

\"\ - },\ - \"SecretHash\":{\ - \"shape\":\"SecretHashType\",\ - \"documentation\":\"

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user whose registration you wish to confirm.

\"\ - },\ - \"ConfirmationCode\":{\ - \"shape\":\"ConfirmationCodeType\",\ - \"documentation\":\"

The confirmation code sent by a user's request to confirm registration.

\"\ - },\ - \"ForceAliasCreation\":{\ - \"shape\":\"ForceAliasCreation\",\ - \"documentation\":\"

Boolean to be specified to force user confirmation irrespective of existing alias. By default set to False. If this parameter is set to True and the phone number/email used for sign up confirmation already exists as an alias with a different user, the API call will migrate the alias from the previous user to the newly created user being confirmed. If set to False, the API will throw an AliasExistsException error.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics metadata for collecting metrics for ConfirmSignUp calls.

\"\ - },\ - \"UserContextData\":{\ - \"shape\":\"UserContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to confirm registration of a user.

\"\ - },\ - \"ConfirmSignUpResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server for the registration confirmation.

\"\ - },\ - \"ConfirmationCodeType\":{\ - \"type\":\"string\",\ - \"max\":2048,\ - \"min\":1,\ - \"pattern\":\"[\\\\S]+\"\ - },\ - \"ContextDataType\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IpAddress\",\ - \"ServerName\",\ - \"ServerPath\",\ - \"HttpHeaders\"\ - ],\ - \"members\":{\ - \"IpAddress\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

Source IP address of your user.

\"\ - },\ - \"ServerName\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

Your server endpoint where this API is invoked.

\"\ - },\ - \"ServerPath\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

Your server path where this API is invoked.

\"\ - },\ - \"HttpHeaders\":{\ - \"shape\":\"HttpHeaderList\",\ - \"documentation\":\"

HttpHeaders received on your server in same order.

\"\ - },\ - \"EncodedData\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

Encoded data containing device fingerprinting details, collected using the Amazon Cognito context data collection library.

\"\ - }\ - },\ - \"documentation\":\"

Contextual user data type used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - },\ - \"CreateGroupRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"GroupName\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The name of the group. Must be unique.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Description\":{\ - \"shape\":\"DescriptionType\",\ - \"documentation\":\"

A string containing the description of the group.

\"\ - },\ - \"RoleArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The role ARN for the group.

\"\ - },\ - \"Precedence\":{\ - \"shape\":\"PrecedenceType\",\ - \"documentation\":\"

A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. Zero is the highest precedence value. Groups with lower Precedence values take precedence over groups with higher or null Precedence values. If a user belongs to two or more groups, it is the group with the lowest precedence value whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens.

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens.

The default Precedence value is null.

\"\ - }\ - }\ - },\ - \"CreateGroupResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Group\":{\ - \"shape\":\"GroupType\",\ - \"documentation\":\"

The group object for the group.

\"\ - }\ - }\ - },\ - \"CreateIdentityProviderRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ProviderName\",\ - \"ProviderType\",\ - \"ProviderDetails\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ProviderName\":{\ - \"shape\":\"ProviderNameTypeV1\",\ - \"documentation\":\"

The identity provider name.

\"\ - },\ - \"ProviderType\":{\ - \"shape\":\"IdentityProviderTypeType\",\ - \"documentation\":\"

The identity provider type.

\"\ - },\ - \"ProviderDetails\":{\ - \"shape\":\"ProviderDetailsType\",\ - \"documentation\":\"

The identity provider details, such as MetadataURL and MetadataFile.

\"\ - },\ - \"AttributeMapping\":{\ - \"shape\":\"AttributeMappingType\",\ - \"documentation\":\"

A mapping of identity provider attributes to standard and custom user pool attributes.

\"\ - },\ - \"IdpIdentifiers\":{\ - \"shape\":\"IdpIdentifiersListType\",\ - \"documentation\":\"

A list of identity provider identifiers.

\"\ - }\ - }\ - },\ - \"CreateIdentityProviderResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityProvider\"],\ - \"members\":{\ - \"IdentityProvider\":{\ - \"shape\":\"IdentityProviderType\",\ - \"documentation\":\"

The newly created identity provider object.

\"\ - }\ - }\ - },\ - \"CreateResourceServerRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Identifier\",\ - \"Name\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Identifier\":{\ - \"shape\":\"ResourceServerIdentifierType\",\ - \"documentation\":\"

A unique resource server identifier for the resource server. This could be an HTTPS endpoint where the resource server is located. For example, https://my-weather-api.example.com.

\"\ - },\ - \"Name\":{\ - \"shape\":\"ResourceServerNameType\",\ - \"documentation\":\"

A friendly name for the resource server.

\"\ - },\ - \"Scopes\":{\ - \"shape\":\"ResourceServerScopeListType\",\ - \"documentation\":\"

A list of scopes. Each scope is map, where the keys are name and description.

\"\ - }\ - }\ - },\ - \"CreateResourceServerResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"ResourceServer\"],\ - \"members\":{\ - \"ResourceServer\":{\ - \"shape\":\"ResourceServerType\",\ - \"documentation\":\"

The newly created resource server.

\"\ - }\ - }\ - },\ - \"CreateUserImportJobRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"JobName\",\ - \"UserPoolId\",\ - \"CloudWatchLogsRoleArn\"\ - ],\ - \"members\":{\ - \"JobName\":{\ - \"shape\":\"UserImportJobNameType\",\ - \"documentation\":\"

The job name for the user import job.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are being imported into.

\"\ - },\ - \"CloudWatchLogsRoleArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The role ARN for the Amazon CloudWatch Logging role for the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to create the user import job.

\"\ - },\ - \"CreateUserImportJobResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserImportJob\":{\ - \"shape\":\"UserImportJobType\",\ - \"documentation\":\"

The job object that represents the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to create the user import job.

\"\ - },\ - \"CreateUserPoolClientRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ClientName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to create a user pool client.

\"\ - },\ - \"ClientName\":{\ - \"shape\":\"ClientNameType\",\ - \"documentation\":\"

The client name for the user pool client you would like to create.

\"\ - },\ - \"GenerateSecret\":{\ - \"shape\":\"GenerateSecret\",\ - \"documentation\":\"

Boolean to specify whether you want to generate a secret for the user pool client being created.

\"\ - },\ - \"RefreshTokenValidity\":{\ - \"shape\":\"RefreshTokenValidityType\",\ - \"documentation\":\"

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

\"\ - },\ - \"ReadAttributes\":{\ - \"shape\":\"ClientPermissionListType\",\ - \"documentation\":\"

The read attributes.

\"\ - },\ - \"WriteAttributes\":{\ - \"shape\":\"ClientPermissionListType\",\ - \"documentation\":\"

The user pool attributes that the app client can write to.

If your app client allows users to sign in through an identity provider, this array must include all attributes that are mapped to identity provider attributes. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If your app client lacks write access to a mapped attribute, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

\"\ - },\ - \"ExplicitAuthFlows\":{\ - \"shape\":\"ExplicitAuthFlowsListType\",\ - \"documentation\":\"

The explicit authentication flows.

\"\ - },\ - \"SupportedIdentityProviders\":{\ - \"shape\":\"SupportedIdentityProvidersListType\",\ - \"documentation\":\"

A list of provider names for the identity providers that are supported on this client.

\"\ - },\ - \"CallbackURLs\":{\ - \"shape\":\"CallbackURLsListType\",\ - \"documentation\":\"

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

\"\ - },\ - \"LogoutURLs\":{\ - \"shape\":\"LogoutURLsListType\",\ - \"documentation\":\"

A list of allowed logout URLs for the identity providers.

\"\ - },\ - \"DefaultRedirectURI\":{\ - \"shape\":\"RedirectUrlType\",\ - \"documentation\":\"

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

\"\ - },\ - \"AllowedOAuthFlows\":{\ - \"shape\":\"OAuthFlowsType\",\ - \"documentation\":\"

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

\"\ - },\ - \"AllowedOAuthScopes\":{\ - \"shape\":\"ScopeListType\",\ - \"documentation\":\"

A list of allowed OAuth scopes. Currently supported values are \\\"phone\\\", \\\"email\\\", \\\"openid\\\", and \\\"Cognito\\\".

\"\ - },\ - \"AllowedOAuthFlowsUserPoolClient\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Set to True if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

\"\ - },\ - \"AnalyticsConfiguration\":{\ - \"shape\":\"AnalyticsConfigurationType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to create a user pool client.

\"\ - },\ - \"CreateUserPoolClientResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolClient\":{\ - \"shape\":\"UserPoolClientType\",\ - \"documentation\":\"

The user pool client that was just created.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to create a user pool client.

\"\ - },\ - \"CreateUserPoolDomainRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Domain\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"Domain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

The domain string.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"CustomDomainConfig\":{\ - \"shape\":\"CustomDomainConfigType\",\ - \"documentation\":\"

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

Provide this parameter only if you want to use a custom domain for your user pool. Otherwise, you can exclude this parameter and use the Amazon Cognito hosted domain instead.

For more information about the hosted domain and custom domains, see Configuring a User Pool Domain.

\"\ - }\ - }\ - },\ - \"CreateUserPoolDomainResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"CloudFrontDomain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

The Amazon CloudFront endpoint that you use as the target of the alias that you set up with your Domain Name Service (DNS) provider.

\"\ - }\ - }\ - },\ - \"CreateUserPoolRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"PoolName\"],\ - \"members\":{\ - \"PoolName\":{\ - \"shape\":\"UserPoolNameType\",\ - \"documentation\":\"

A string used to name the user pool.

\"\ - },\ - \"Policies\":{\ - \"shape\":\"UserPoolPolicyType\",\ - \"documentation\":\"

The policies associated with the new user pool.

\"\ - },\ - \"LambdaConfig\":{\ - \"shape\":\"LambdaConfigType\",\ - \"documentation\":\"

The Lambda trigger configuration information for the new user pool.

In a push model, event sources (such as Amazon S3 and custom applications) need permission to invoke a function. So you will need to make an extra call to add permission for these event sources to invoke your Lambda function.

For more information on using the Lambda API to add permission, see AddPermission .

For adding permission using the AWS CLI, see add-permission .

\"\ - },\ - \"AutoVerifiedAttributes\":{\ - \"shape\":\"VerifiedAttributesListType\",\ - \"documentation\":\"

The attributes to be auto-verified. Possible values: email, phone_number.

\"\ - },\ - \"AliasAttributes\":{\ - \"shape\":\"AliasAttributesListType\",\ - \"documentation\":\"

Attributes supported as an alias for this user pool. Possible values: phone_number, email, or preferred_username.

\"\ - },\ - \"UsernameAttributes\":{\ - \"shape\":\"UsernameAttributesListType\",\ - \"documentation\":\"

Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

\"\ - },\ - \"SmsVerificationMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

A string representing the SMS verification message.

\"\ - },\ - \"EmailVerificationMessage\":{\ - \"shape\":\"EmailVerificationMessageType\",\ - \"documentation\":\"

A string representing the email verification message.

\"\ - },\ - \"EmailVerificationSubject\":{\ - \"shape\":\"EmailVerificationSubjectType\",\ - \"documentation\":\"

A string representing the email verification subject.

\"\ - },\ - \"VerificationMessageTemplate\":{\ - \"shape\":\"VerificationMessageTemplateType\",\ - \"documentation\":\"

The template for the verification message that the user sees when the app requests permission to access the user's information.

\"\ - },\ - \"SmsAuthenticationMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

A string representing the SMS authentication message.

\"\ - },\ - \"MfaConfiguration\":{\ - \"shape\":\"UserPoolMfaType\",\ - \"documentation\":\"

Specifies MFA configuration details.

\"\ - },\ - \"DeviceConfiguration\":{\ - \"shape\":\"DeviceConfigurationType\",\ - \"documentation\":\"

The device configuration.

\"\ - },\ - \"EmailConfiguration\":{\ - \"shape\":\"EmailConfigurationType\",\ - \"documentation\":\"

The email configuration.

\"\ - },\ - \"SmsConfiguration\":{\ - \"shape\":\"SmsConfigurationType\",\ - \"documentation\":\"

The SMS configuration.

\"\ - },\ - \"UserPoolTags\":{\ - \"shape\":\"UserPoolTagsType\",\ - \"documentation\":\"

The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool

\"\ - },\ - \"AdminCreateUserConfig\":{\ - \"shape\":\"AdminCreateUserConfigType\",\ - \"documentation\":\"

The configuration for AdminCreateUser requests.

\"\ - },\ - \"Schema\":{\ - \"shape\":\"SchemaAttributesListType\",\ - \"documentation\":\"

An array of schema attributes for the new user pool. These attributes can be standard or custom attributes.

\"\ - },\ - \"UserPoolAddOns\":{\ - \"shape\":\"UserPoolAddOnsType\",\ - \"documentation\":\"

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value \\\"AUDIT\\\".

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to create a user pool.

\"\ - },\ - \"CreateUserPoolResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPool\":{\ - \"shape\":\"UserPoolType\",\ - \"documentation\":\"

A container for the user pool details.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server for the request to create a user pool.

\"\ - },\ - \"CustomAttributeNameType\":{\ - \"type\":\"string\",\ - \"max\":20,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\"\ - },\ - \"CustomAttributesListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"SchemaAttributeType\"},\ - \"max\":25,\ - \"min\":1\ - },\ - \"CustomDomainConfigType\":{\ - \"type\":\"structure\",\ - \"required\":[\"CertificateArn\"],\ - \"members\":{\ - \"CertificateArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The Amazon Resource Name (ARN) of an AWS Certificate Manager SSL certificate. You use this certificate for the subdomain of your custom domain.

\"\ - }\ - },\ - \"documentation\":\"

The configuration for a custom domain that hosts the sign-up and sign-in webpages for your application.

\"\ - },\ - \"DateType\":{\"type\":\"timestamp\"},\ - \"DefaultEmailOptionType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"CONFIRM_WITH_LINK\",\ - \"CONFIRM_WITH_CODE\"\ - ]\ - },\ - \"DeleteGroupRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"GroupName\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The name of the group.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - }\ - }\ - },\ - \"DeleteIdentityProviderRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ProviderName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ProviderName\":{\ - \"shape\":\"ProviderNameType\",\ - \"documentation\":\"

The identity provider name.

\"\ - }\ - }\ - },\ - \"DeleteResourceServerRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Identifier\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that hosts the resource server.

\"\ - },\ - \"Identifier\":{\ - \"shape\":\"ResourceServerIdentifierType\",\ - \"documentation\":\"

The identifier for the resource server.

\"\ - }\ - }\ - },\ - \"DeleteUserAttributesRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserAttributeNames\",\ - \"AccessToken\"\ - ],\ - \"members\":{\ - \"UserAttributeNames\":{\ - \"shape\":\"AttributeNameListType\",\ - \"documentation\":\"

An array of strings representing the user attribute names you wish to delete.

For custom attributes, you must prepend the custom: prefix to the attribute name.

\"\ - },\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token used in the request to delete user attributes.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to delete user attributes.

\"\ - },\ - \"DeleteUserAttributesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server to delete user attributes.

\"\ - },\ - \"DeleteUserPoolClientRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ClientId\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to delete the client.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID of the app associated with the user pool.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to delete a user pool client.

\"\ - },\ - \"DeleteUserPoolDomainRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Domain\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"Domain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

The domain string.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - }\ - }\ - },\ - \"DeleteUserPoolDomainResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - }\ - },\ - \"DeleteUserPoolRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool you want to delete.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to delete a user pool.

\"\ - },\ - \"DeleteUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"AccessToken\"],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token from a request to delete a user.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to delete a user.

\"\ - },\ - \"DeliveryMediumListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"DeliveryMediumType\"}\ - },\ - \"DeliveryMediumType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"SMS\",\ - \"EMAIL\"\ - ]\ - },\ - \"DescribeIdentityProviderRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ProviderName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ProviderName\":{\ - \"shape\":\"ProviderNameType\",\ - \"documentation\":\"

The identity provider name.

\"\ - }\ - }\ - },\ - \"DescribeIdentityProviderResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityProvider\"],\ - \"members\":{\ - \"IdentityProvider\":{\ - \"shape\":\"IdentityProviderType\",\ - \"documentation\":\"

The identity provider that was deleted.

\"\ - }\ - }\ - },\ - \"DescribeResourceServerRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Identifier\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that hosts the resource server.

\"\ - },\ - \"Identifier\":{\ - \"shape\":\"ResourceServerIdentifierType\",\ - \"documentation\":\"

The identifier for the resource server

\"\ - }\ - }\ - },\ - \"DescribeResourceServerResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"ResourceServer\"],\ - \"members\":{\ - \"ResourceServer\":{\ - \"shape\":\"ResourceServerType\",\ - \"documentation\":\"

The resource server.

\"\ - }\ - }\ - },\ - \"DescribeRiskConfigurationRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID.

\"\ - }\ - }\ - },\ - \"DescribeRiskConfigurationResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"RiskConfiguration\"],\ - \"members\":{\ - \"RiskConfiguration\":{\ - \"shape\":\"RiskConfigurationType\",\ - \"documentation\":\"

The risk configuration.

\"\ - }\ - }\ - },\ - \"DescribeUserImportJobRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"JobId\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are being imported into.

\"\ - },\ - \"JobId\":{\ - \"shape\":\"UserImportJobIdType\",\ - \"documentation\":\"

The job ID for the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to describe the user import job.

\"\ - },\ - \"DescribeUserImportJobResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserImportJob\":{\ - \"shape\":\"UserImportJobType\",\ - \"documentation\":\"

The job object that represents the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to describe the user import job.

\"\ - },\ - \"DescribeUserPoolClientRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ClientId\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool you want to describe.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID of the app associated with the user pool.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to describe a user pool client.

\"\ - },\ - \"DescribeUserPoolClientResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolClient\":{\ - \"shape\":\"UserPoolClientType\",\ - \"documentation\":\"

The user pool client from a server response to describe the user pool client.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server from a request to describe the user pool client.

\"\ - },\ - \"DescribeUserPoolDomainRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"Domain\"],\ - \"members\":{\ - \"Domain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

The domain string.

\"\ - }\ - }\ - },\ - \"DescribeUserPoolDomainResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"DomainDescription\":{\ - \"shape\":\"DomainDescriptionType\",\ - \"documentation\":\"

A domain description object containing information about the domain.

\"\ - }\ - }\ - },\ - \"DescribeUserPoolRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool you want to describe.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to describe the user pool.

\"\ - },\ - \"DescribeUserPoolResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPool\":{\ - \"shape\":\"UserPoolType\",\ - \"documentation\":\"

The container of metadata returned by the server to describe the pool.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response to describe the user pool.

\"\ - },\ - \"DescriptionType\":{\ - \"type\":\"string\",\ - \"max\":2048\ - },\ - \"DeviceConfigurationType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ChallengeRequiredOnNewDevice\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Indicates whether a challenge is required on a new device. Only applicable to a new device.

\"\ - },\ - \"DeviceOnlyRememberedOnUserPrompt\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

If true, a device is only remembered on user prompt.

\"\ - }\ - },\ - \"documentation\":\"

The configuration for the user pool's device tracking.

\"\ - },\ - \"DeviceKeyType\":{\ - \"type\":\"string\",\ - \"max\":55,\ - \"min\":1,\ - \"pattern\":\"[\\\\w-]+_[0-9a-f-]+\"\ - },\ - \"DeviceListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"DeviceType\"}\ - },\ - \"DeviceNameType\":{\ - \"type\":\"string\",\ - \"max\":1024,\ - \"min\":1\ - },\ - \"DeviceRememberedStatusType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"remembered\",\ - \"not_remembered\"\ - ]\ - },\ - \"DeviceSecretVerifierConfigType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"PasswordVerifier\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The password verifier.

\"\ - },\ - \"Salt\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The salt.

\"\ - }\ - },\ - \"documentation\":\"

The device verifier against which it will be authenticated.

\"\ - },\ - \"DeviceType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - },\ - \"DeviceAttributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

The device attributes.

\"\ - },\ - \"DeviceCreateDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The creation date of the device.

\"\ - },\ - \"DeviceLastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The last modified date of the device.

\"\ - },\ - \"DeviceLastAuthenticatedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date in which the device was last authenticated.

\"\ - }\ - },\ - \"documentation\":\"

The device type.

\"\ - },\ - \"DomainDescriptionType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"AWSAccountId\":{\ - \"shape\":\"AWSAccountIdType\",\ - \"documentation\":\"

The AWS account ID for the user pool owner.

\"\ - },\ - \"Domain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

The domain string.

\"\ - },\ - \"S3Bucket\":{\ - \"shape\":\"S3BucketType\",\ - \"documentation\":\"

The S3 bucket where the static files for this domain are stored.

\"\ - },\ - \"CloudFrontDistribution\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The ARN of the CloudFront distribution.

\"\ - },\ - \"Version\":{\ - \"shape\":\"DomainVersionType\",\ - \"documentation\":\"

The app version.

\"\ - },\ - \"Status\":{\ - \"shape\":\"DomainStatusType\",\ - \"documentation\":\"

The domain status.

\"\ - },\ - \"CustomDomainConfig\":{\"shape\":\"CustomDomainConfigType\"}\ - },\ - \"documentation\":\"

A container for information about a domain.

\"\ - },\ - \"DomainStatusType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"CREATING\",\ - \"DELETING\",\ - \"UPDATING\",\ - \"ACTIVE\",\ - \"FAILED\"\ - ]\ - },\ - \"DomainType\":{\ - \"type\":\"string\",\ - \"max\":63,\ - \"min\":1,\ - \"pattern\":\"^[a-z0-9](?:[a-z0-9\\\\-]{0,61}[a-z0-9])?$\"\ - },\ - \"DomainVersionType\":{\ - \"type\":\"string\",\ - \"max\":20,\ - \"min\":1\ - },\ - \"DuplicateProviderException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when the provider is already supported by the user pool.

\",\ - \"exception\":true\ - },\ - \"EmailAddressType\":{\ - \"type\":\"string\",\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+@[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\"\ - },\ - \"EmailConfigurationType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"SourceArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The Amazon Resource Name (ARN) of the email source.

\"\ - },\ - \"ReplyToEmailAddress\":{\ - \"shape\":\"EmailAddressType\",\ - \"documentation\":\"

The destination to which the receiver of the email should reply to.

\"\ - }\ - },\ - \"documentation\":\"

The email configuration type.

\"\ - },\ - \"EmailNotificationBodyType\":{\ - \"type\":\"string\",\ - \"max\":20000,\ - \"min\":6,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s*]+\"\ - },\ - \"EmailNotificationSubjectType\":{\ - \"type\":\"string\",\ - \"max\":140,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s]+\"\ - },\ - \"EmailVerificationMessageByLinkType\":{\ - \"type\":\"string\",\ - \"max\":20000,\ - \"min\":6,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s*]*\\\\{##[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s*]*##\\\\}[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s*]*\"\ - },\ - \"EmailVerificationMessageType\":{\ - \"type\":\"string\",\ - \"max\":20000,\ - \"min\":6,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s*]*\\\\{####\\\\}[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s*]*\"\ - },\ - \"EmailVerificationSubjectByLinkType\":{\ - \"type\":\"string\",\ - \"max\":140,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s]+\"\ - },\ - \"EmailVerificationSubjectType\":{\ - \"type\":\"string\",\ - \"max\":140,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}\\\\s]+\"\ - },\ - \"EnableSoftwareTokenMFAException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when there is a code mismatch and the service fails to configure the software token TOTP multi-factor authentication (MFA).

\",\ - \"exception\":true\ - },\ - \"EventContextDataType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IpAddress\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user's IP address.

\"\ - },\ - \"DeviceName\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user's device name.

\"\ - },\ - \"Timezone\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user's time zone.

\"\ - },\ - \"City\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user's city.

\"\ - },\ - \"Country\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user's country.

\"\ - }\ - },\ - \"documentation\":\"

Specifies the user context data captured at the time of an event request.

\"\ - },\ - \"EventFeedbackType\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"FeedbackValue\",\ - \"Provider\"\ - ],\ - \"members\":{\ - \"FeedbackValue\":{\ - \"shape\":\"FeedbackValueType\",\ - \"documentation\":\"

The event feedback value.

\"\ - },\ - \"Provider\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The provider.

\"\ - },\ - \"FeedbackDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The event feedback date.

\"\ - }\ - },\ - \"documentation\":\"

Specifies the event feedback type.

\"\ - },\ - \"EventFilterType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"SIGN_IN\",\ - \"PASSWORD_CHANGE\",\ - \"SIGN_UP\"\ - ]\ - },\ - \"EventFiltersType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"EventFilterType\"}\ - },\ - \"EventIdType\":{\ - \"type\":\"string\",\ - \"max\":50,\ - \"min\":1,\ - \"pattern\":\"[\\\\w+-]+\"\ - },\ - \"EventResponseType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Success\",\ - \"Failure\"\ - ]\ - },\ - \"EventRiskType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"RiskDecision\":{\ - \"shape\":\"RiskDecisionType\",\ - \"documentation\":\"

The risk decision.

\"\ - },\ - \"RiskLevel\":{\ - \"shape\":\"RiskLevelType\",\ - \"documentation\":\"

The risk level.

\"\ - }\ - },\ - \"documentation\":\"

The event risk type.

\"\ - },\ - \"EventType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"SignIn\",\ - \"SignUp\",\ - \"ForgotPassword\"\ - ]\ - },\ - \"ExpiredCodeException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the expired code exception is thrown.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown if a code has expired.

\",\ - \"exception\":true\ - },\ - \"ExplicitAuthFlowsListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ExplicitAuthFlowsType\"}\ - },\ - \"ExplicitAuthFlowsType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"ADMIN_NO_SRP_AUTH\",\ - \"CUSTOM_AUTH_FLOW_ONLY\",\ - \"USER_PASSWORD_AUTH\"\ - ]\ - },\ - \"FeedbackValueType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Valid\",\ - \"Invalid\"\ - ]\ - },\ - \"ForceAliasCreation\":{\"type\":\"boolean\"},\ - \"ForgetDeviceRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"DeviceKey\"],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token for the forgotten device request.

\"\ - },\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to forget the device.

\"\ - },\ - \"ForgotPasswordRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ClientId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The ID of the client associated with the user pool.

\"\ - },\ - \"SecretHash\":{\ - \"shape\":\"SecretHashType\",\ - \"documentation\":\"

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

\"\ - },\ - \"UserContextData\":{\ - \"shape\":\"UserContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user for whom you want to enter a code to reset a forgotten password.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics metadata for collecting metrics for ForgotPassword calls.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to reset a user's password.

\"\ - },\ - \"ForgotPasswordResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"CodeDeliveryDetails\":{\ - \"shape\":\"CodeDeliveryDetailsType\",\ - \"documentation\":\"

The code delivery details returned by the server in response to the request to reset a password.

\"\ - }\ - },\ - \"documentation\":\"

Respresents the response from the server regarding the request to reset a password.

\"\ - },\ - \"GenerateSecret\":{\"type\":\"boolean\"},\ - \"GetCSVHeaderRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are to be imported into.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to get the header information for the .csv file for the user import job.

\"\ - },\ - \"GetCSVHeaderResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are to be imported into.

\"\ - },\ - \"CSVHeader\":{\ - \"shape\":\"ListOfStringTypes\",\ - \"documentation\":\"

The header information for the .csv file for the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to get the header information for the .csv file for the user import job.

\"\ - },\ - \"GetDeviceRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"DeviceKey\"],\ - \"members\":{\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - },\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to get the device.

\"\ - },\ - \"GetDeviceResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"Device\"],\ - \"members\":{\ - \"Device\":{\ - \"shape\":\"DeviceType\",\ - \"documentation\":\"

The device.

\"\ - }\ - },\ - \"documentation\":\"

Gets the device response.

\"\ - },\ - \"GetGroupRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"GroupName\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The name of the group.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - }\ - }\ - },\ - \"GetGroupResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Group\":{\ - \"shape\":\"GroupType\",\ - \"documentation\":\"

The group object for the group.

\"\ - }\ - }\ - },\ - \"GetIdentityProviderByIdentifierRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"IdpIdentifier\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"IdpIdentifier\":{\ - \"shape\":\"IdpIdentifierType\",\ - \"documentation\":\"

The identity provider ID.

\"\ - }\ - }\ - },\ - \"GetIdentityProviderByIdentifierResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityProvider\"],\ - \"members\":{\ - \"IdentityProvider\":{\ - \"shape\":\"IdentityProviderType\",\ - \"documentation\":\"

The identity provider object.

\"\ - }\ - }\ - },\ - \"GetSigningCertificateRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - }\ - },\ - \"documentation\":\"

Request to get a signing certificate from Cognito.

\"\ - },\ - \"GetSigningCertificateResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Certificate\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The signing certificate.

\"\ - }\ - },\ - \"documentation\":\"

Response from Cognito for a signing certificate request.

\"\ - },\ - \"GetUICustomizationRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The client ID for the client app.

\"\ - }\ - }\ - },\ - \"GetUICustomizationResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"UICustomization\"],\ - \"members\":{\ - \"UICustomization\":{\ - \"shape\":\"UICustomizationType\",\ - \"documentation\":\"

The UI customization information.

\"\ - }\ - }\ - },\ - \"GetUserAttributeVerificationCodeRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"AccessToken\",\ - \"AttributeName\"\ - ],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token returned by the server response to get the user attribute verification code.

\"\ - },\ - \"AttributeName\":{\ - \"shape\":\"AttributeNameType\",\ - \"documentation\":\"

The attribute name returned by the server response to get the user attribute verification code.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to get user attribute verification.

\"\ - },\ - \"GetUserAttributeVerificationCodeResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"CodeDeliveryDetails\":{\ - \"shape\":\"CodeDeliveryDetailsType\",\ - \"documentation\":\"

The code delivery details returned by the server in response to the request to get the user attribute verification code.

\"\ - }\ - },\ - \"documentation\":\"

The verification code response returned by the server response to get the user attribute verification code.

\"\ - },\ - \"GetUserPoolMfaConfigRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - }\ - }\ - },\ - \"GetUserPoolMfaConfigResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"SmsMfaConfiguration\":{\ - \"shape\":\"SmsMfaConfigType\",\ - \"documentation\":\"

The SMS text message multi-factor (MFA) configuration.

\"\ - },\ - \"SoftwareTokenMfaConfiguration\":{\ - \"shape\":\"SoftwareTokenMfaConfigType\",\ - \"documentation\":\"

The software token multi-factor (MFA) configuration.

\"\ - },\ - \"MfaConfiguration\":{\ - \"shape\":\"UserPoolMfaType\",\ - \"documentation\":\"

The multi-factor (MFA) configuration.

\"\ - }\ - }\ - },\ - \"GetUserRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"AccessToken\"],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token returned by the server response to get information about the user.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to get information about the user.

\"\ - },\ - \"GetUserResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Username\",\ - \"UserAttributes\"\ - ],\ - \"members\":{\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user you wish to retrieve from the get user request.

\"\ - },\ - \"UserAttributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

\"\ - },\ - \"MFAOptions\":{\ - \"shape\":\"MFAOptionListType\",\ - \"documentation\":\"

Specifies the options for MFA (e.g., email or phone number).

\"\ - },\ - \"PreferredMfaSetting\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The user's preferred MFA setting.

\"\ - },\ - \"UserMFASettingList\":{\ - \"shape\":\"UserMFASettingListType\",\ - \"documentation\":\"

The list of the user's MFA settings.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server from the request to get information about the user.

\"\ - },\ - \"GlobalSignOutRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"AccessToken\"],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to sign out all devices.

\"\ - },\ - \"GlobalSignOutResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

The response to the request to sign out all devices.

\"\ - },\ - \"GroupExistsException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when Amazon Cognito encounters a group that already exists in the user pool.

\",\ - \"exception\":true\ - },\ - \"GroupListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"GroupType\"}\ - },\ - \"GroupNameType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\"\ - },\ - \"GroupType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The name of the group.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Description\":{\ - \"shape\":\"DescriptionType\",\ - \"documentation\":\"

A string containing the description of the group.

\"\ - },\ - \"RoleArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The role ARN for the group.

\"\ - },\ - \"Precedence\":{\ - \"shape\":\"PrecedenceType\",\ - \"documentation\":\"

A nonnegative integer value that specifies the precedence of this group relative to the other groups that a user can belong to in the user pool. If a user belongs to two or more groups, it is the group with the highest precedence whose role ARN will be used in the cognito:roles and cognito:preferred_role claims in the user's tokens. Groups with higher Precedence values take precedence over groups with lower Precedence values or with null Precedence values.

Two groups can have the same Precedence value. If this happens, neither group takes precedence over the other. If two groups with the same Precedence have the same role ARN, that role is used in the cognito:preferred_role claim in tokens for users in each group. If the two groups have different role ARNs, the cognito:preferred_role claim is not set in users' tokens.

The default Precedence value is null.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the group was last modified.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the group was created.

\"\ - }\ - },\ - \"documentation\":\"

The group type.

\"\ - },\ - \"HexStringType\":{\ - \"type\":\"string\",\ - \"pattern\":\"^[0-9a-fA-F]+$\"\ - },\ - \"HttpHeader\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"headerName\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The header name

\"\ - },\ - \"headerValue\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The header value.

\"\ - }\ - },\ - \"documentation\":\"

The HTTP header.

\"\ - },\ - \"HttpHeaderList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"HttpHeader\"}\ - },\ - \"IdentityProviderType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ProviderName\":{\ - \"shape\":\"ProviderNameType\",\ - \"documentation\":\"

The identity provider name.

\"\ - },\ - \"ProviderType\":{\ - \"shape\":\"IdentityProviderTypeType\",\ - \"documentation\":\"

The identity provider type.

\"\ - },\ - \"ProviderDetails\":{\ - \"shape\":\"ProviderDetailsType\",\ - \"documentation\":\"

The identity provider details, such as MetadataURL and MetadataFile.

\"\ - },\ - \"AttributeMapping\":{\ - \"shape\":\"AttributeMappingType\",\ - \"documentation\":\"

A mapping of identity provider attributes to standard and custom user pool attributes.

\"\ - },\ - \"IdpIdentifiers\":{\ - \"shape\":\"IdpIdentifiersListType\",\ - \"documentation\":\"

A list of identity provider identifiers.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the identity provider was last modified.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the identity provider was created.

\"\ - }\ - },\ - \"documentation\":\"

A container for information about an identity provider.

\"\ - },\ - \"IdentityProviderTypeType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"SAML\",\ - \"Facebook\",\ - \"Google\",\ - \"LoginWithAmazon\",\ - \"OIDC\"\ - ]\ - },\ - \"IdpIdentifierType\":{\ - \"type\":\"string\",\ - \"max\":40,\ - \"min\":1,\ - \"pattern\":\"[\\\\w\\\\s+=.@-]+\"\ - },\ - \"IdpIdentifiersListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"IdpIdentifierType\"},\ - \"max\":50,\ - \"min\":0\ - },\ - \"ImageFileType\":{\"type\":\"blob\"},\ - \"ImageUrlType\":{\"type\":\"string\"},\ - \"InitiateAuthRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"AuthFlow\",\ - \"ClientId\"\ - ],\ - \"members\":{\ - \"AuthFlow\":{\ - \"shape\":\"AuthFlowType\",\ - \"documentation\":\"

The authentication flow for this call to execute. The API action will depend on this value. For example:

  • REFRESH_TOKEN_AUTH will take in a valid refresh token and return new tokens.

  • USER_SRP_AUTH will take in USERNAME and SRP_A and return the SRP variables to be used for next challenge execution.

  • USER_PASSWORD_AUTH will take in USERNAME and PASSWORD and return the next challenge or tokens.

Valid values include:

  • USER_SRP_AUTH: Authentication flow for the Secure Remote Password (SRP) protocol.

  • REFRESH_TOKEN_AUTH/REFRESH_TOKEN: Authentication flow for refreshing the access token and ID token by supplying a valid refresh token.

  • CUSTOM_AUTH: Custom authentication flow.

  • USER_PASSWORD_AUTH: Non-SRP authentication flow; USERNAME and PASSWORD are passed directly. If a user migration Lambda trigger is set, this flow will invoke the user migration Lambda if the USERNAME is not found in the user pool.

ADMIN_NO_SRP_AUTH is not a valid value.

\"\ - },\ - \"AuthParameters\":{\ - \"shape\":\"AuthParametersType\",\ - \"documentation\":\"

The authentication parameters. These are inputs corresponding to the AuthFlow that you are invoking. The required values depend on the value of AuthFlow:

  • For USER_SRP_AUTH: USERNAME (required), SRP_A (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For REFRESH_TOKEN_AUTH/REFRESH_TOKEN: REFRESH_TOKEN (required), SECRET_HASH (required if the app client is configured with a client secret), DEVICE_KEY

  • For CUSTOM_AUTH: USERNAME (required), SECRET_HASH (if app client is configured with client secret), DEVICE_KEY

\"\ - },\ - \"ClientMetadata\":{\ - \"shape\":\"ClientMetadataType\",\ - \"documentation\":\"

This is a random key-value pair map which can contain any key and will be passed to your PreAuthentication Lambda trigger as-is. It can be used to implement additional validations around authentication.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics metadata for collecting metrics for InitiateAuth calls.

\"\ - },\ - \"UserContextData\":{\ - \"shape\":\"UserContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

Initiates the authentication request.

\"\ - },\ - \"InitiateAuthResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ChallengeName\":{\ - \"shape\":\"ChallengeNameType\",\ - \"documentation\":\"

The name of the challenge which you are responding to with this call. This is returned to you in the AdminInitiateAuth response if you need to pass another challenge.

Valid values include the following. Note that all of these challenges require USERNAME and SECRET_HASH (if applicable) in the parameters.

  • SMS_MFA: Next challenge is to supply an SMS_MFA_CODE, delivered via SMS.

  • PASSWORD_VERIFIER: Next challenge is to supply PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, and TIMESTAMP after the client-side SRP calculations.

  • CUSTOM_CHALLENGE: This is returned if your custom authentication flow determines that the user should pass another challenge before tokens are issued.

  • DEVICE_SRP_AUTH: If device tracking was enabled on your user pool and the previous challenges were passed, this challenge is returned so that Amazon Cognito can start tracking this device.

  • DEVICE_PASSWORD_VERIFIER: Similar to PASSWORD_VERIFIER, but for devices only.

  • NEW_PASSWORD_REQUIRED: For users which are required to change their passwords after successful first login. This challenge should be passed with NEW_PASSWORD and any other required attributes.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. If the or API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

\"\ - },\ - \"ChallengeParameters\":{\ - \"shape\":\"ChallengeParametersType\",\ - \"documentation\":\"

The challenge parameters. These are returned to you in the InitiateAuth response if you need to pass another challenge. The responses in this parameter should be used to compute inputs to the next call (RespondToAuthChallenge).

All challenges require USERNAME and SECRET_HASH (if applicable).

\"\ - },\ - \"AuthenticationResult\":{\ - \"shape\":\"AuthenticationResultType\",\ - \"documentation\":\"

The result of the authentication response. This is only returned if the caller does not need to pass another challenge. If the caller does need to pass another challenge before it gets tokens, ChallengeName, ChallengeParameters, and Session are returned.

\"\ - }\ - },\ - \"documentation\":\"

Initiates the authentication response.

\"\ - },\ - \"IntegerType\":{\"type\":\"integer\"},\ - \"InternalErrorException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when Amazon Cognito throws an internal error exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when Amazon Cognito encounters an internal error.

\",\ - \"exception\":true,\ - \"fault\":true\ - },\ - \"InvalidEmailRoleAccessPolicyException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when you have an unverified email address or the identity policy is not set on an email address that Amazon Cognito can access.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when Amazon Cognito is not allowed to use your email identity. HTTP status code: 400.

\",\ - \"exception\":true\ - },\ - \"InvalidLambdaResponseException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service throws an invalid AWS Lambda response exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the Amazon Cognito service encounters an invalid AWS Lambda response.

\",\ - \"exception\":true\ - },\ - \"InvalidOAuthFlowException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when the specified OAuth flow is invalid.

\",\ - \"exception\":true\ - },\ - \"InvalidParameterException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service throws an invalid parameter exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the Amazon Cognito service encounters an invalid parameter.

\",\ - \"exception\":true\ - },\ - \"InvalidPasswordException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service throws an invalid user password exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the Amazon Cognito service encounters an invalid password.

\",\ - \"exception\":true\ - },\ - \"InvalidSmsRoleAccessPolicyException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message retuned when the invalid SMS role access policy exception is thrown.

\"\ - }\ - },\ - \"documentation\":\"

This exception is returned when the role provided for SMS configuration does not have permission to publish using Amazon SNS.

\",\ - \"exception\":true\ - },\ - \"InvalidSmsRoleTrustRelationshipException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the role trust relationship for the SMS message is invalid.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the trust relationship is invalid for the role provided for SMS configuration. This can happen if you do not trust cognito-idp.amazonaws.com or the external ID provided in the role does not match what is provided in the SMS configuration for the user pool.

\",\ - \"exception\":true\ - },\ - \"InvalidUserPoolConfigurationException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the user pool configuration is invalid.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the user pool configuration is invalid.

\",\ - \"exception\":true\ - },\ - \"LambdaConfigType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"PreSignUp\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

A pre-registration AWS Lambda trigger.

\"\ - },\ - \"CustomMessage\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

A custom Message AWS Lambda trigger.

\"\ - },\ - \"PostConfirmation\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

A post-confirmation AWS Lambda trigger.

\"\ - },\ - \"PreAuthentication\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

A pre-authentication AWS Lambda trigger.

\"\ - },\ - \"PostAuthentication\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

A post-authentication AWS Lambda trigger.

\"\ - },\ - \"DefineAuthChallenge\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

Defines the authentication challenge.

\"\ - },\ - \"CreateAuthChallenge\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

Creates an authentication challenge.

\"\ - },\ - \"VerifyAuthChallengeResponse\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

Verifies the authentication challenge response.

\"\ - },\ - \"PreTokenGeneration\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

A Lambda trigger that is invoked before token generation.

\"\ - },\ - \"UserMigration\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The user migration Lambda config type.

\"\ - }\ - },\ - \"documentation\":\"

Specifies the configuration for AWS Lambda triggers.

\"\ - },\ - \"LimitExceededException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when Amazon Cognito throws a limit exceeded exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a user exceeds the limit for a requested AWS resource.

\",\ - \"exception\":true\ - },\ - \"ListDevicesRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"AccessToken\"],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access tokens for the request to list devices.

\"\ - },\ - \"Limit\":{\ - \"shape\":\"QueryLimitType\",\ - \"documentation\":\"

The limit of the device request.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"SearchPaginationTokenType\",\ - \"documentation\":\"

The pagination token for the list request.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to list the devices.

\"\ - },\ - \"ListDevicesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Devices\":{\ - \"shape\":\"DeviceListType\",\ - \"documentation\":\"

The devices returned in the list devices response.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"SearchPaginationTokenType\",\ - \"documentation\":\"

The pagination token for the list device response.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response to list devices.

\"\ - },\ - \"ListGroupsRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Limit\":{\ - \"shape\":\"QueryLimitType\",\ - \"documentation\":\"

The limit of the request to list groups.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - }\ - },\ - \"ListGroupsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Groups\":{\ - \"shape\":\"GroupListType\",\ - \"documentation\":\"

The group objects for the groups.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - }\ - },\ - \"ListIdentityProvidersRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"ListProvidersLimitType\",\ - \"documentation\":\"

The maximum number of identity providers to return.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - }\ - },\ - \"ListIdentityProvidersResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"Providers\"],\ - \"members\":{\ - \"Providers\":{\ - \"shape\":\"ProvidersListType\",\ - \"documentation\":\"

A list of identity provider objects.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - }\ - },\ - \"ListOfStringTypes\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"StringType\"}\ - },\ - \"ListProvidersLimitType\":{\ - \"type\":\"integer\",\ - \"max\":60,\ - \"min\":1\ - },\ - \"ListResourceServersLimitType\":{\ - \"type\":\"integer\",\ - \"max\":50,\ - \"min\":1\ - },\ - \"ListResourceServersRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"ListResourceServersLimitType\",\ - \"documentation\":\"

The maximum number of resource servers to return.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - }\ - },\ - \"ListResourceServersResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"ResourceServers\"],\ - \"members\":{\ - \"ResourceServers\":{\ - \"shape\":\"ResourceServersListType\",\ - \"documentation\":\"

The resource servers.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - }\ - },\ - \"ListUserImportJobsRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"MaxResults\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are being imported into.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"PoolQueryLimitType\",\ - \"documentation\":\"

The maximum number of import jobs you want the request to return.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

An identifier that was returned from the previous call to ListUserImportJobs, which can be used to return the next set of import jobs in the list.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to list the user import jobs.

\"\ - },\ - \"ListUserImportJobsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserImportJobs\":{\ - \"shape\":\"UserImportJobsListType\",\ - \"documentation\":\"

The user import jobs.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

An identifier that can be used to return the next set of user import jobs in the list.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to list the user import jobs.

\"\ - },\ - \"ListUserPoolClientsRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to list user pool clients.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"QueryLimit\",\ - \"documentation\":\"

The maximum number of results you want the request to return when listing the user pool clients.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to list the user pool clients.

\"\ - },\ - \"ListUserPoolClientsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolClients\":{\ - \"shape\":\"UserPoolClientListType\",\ - \"documentation\":\"

The user pool clients in the response that lists user pool clients.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server that lists user pool clients.

\"\ - },\ - \"ListUserPoolsRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"MaxResults\"],\ - \"members\":{\ - \"NextToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"PoolQueryLimitType\",\ - \"documentation\":\"

The maximum number of results you want the request to return when listing the user pools.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to list user pools.

\"\ - },\ - \"ListUserPoolsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPools\":{\ - \"shape\":\"UserPoolListType\",\ - \"documentation\":\"

The user pools from the response to list users.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKeyType\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response to list user pools.

\"\ - },\ - \"ListUsersInGroupRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"GroupName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The name of the group.

\"\ - },\ - \"Limit\":{\ - \"shape\":\"QueryLimitType\",\ - \"documentation\":\"

The limit of the request to list users.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - }\ - },\ - \"ListUsersInGroupResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Users\":{\ - \"shape\":\"UsersListType\",\ - \"documentation\":\"

The users returned in the request to list users.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - }\ - },\ - \"ListUsersRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool on which the search should be performed.

\"\ - },\ - \"AttributesToGet\":{\ - \"shape\":\"SearchedAttributeNamesListType\",\ - \"documentation\":\"

An array of strings, where each string is the name of a user attribute to be returned for each user in the search results. If the array is null, all attributes are returned.

\"\ - },\ - \"Limit\":{\ - \"shape\":\"QueryLimitType\",\ - \"documentation\":\"

Maximum number of users to be returned.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"SearchPaginationTokenType\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - },\ - \"Filter\":{\ - \"shape\":\"UserFilterType\",\ - \"documentation\":\"

A filter string of the form \\\"AttributeName Filter-Type \\\"AttributeValue\\\"\\\". Quotation marks within the filter string must be escaped using the backslash (\\\\) character. For example, \\\"family_name = \\\\\\\"Reddy\\\\\\\"\\\".

  • AttributeName: The name of the attribute to search for. You can only search for one attribute at a time.

  • Filter-Type: For an exact match, use =, for example, \\\"given_name = \\\\\\\"Jon\\\\\\\"\\\". For a prefix (\\\"starts with\\\") match, use ^=, for example, \\\"given_name ^= \\\\\\\"Jon\\\\\\\"\\\".

  • AttributeValue: The attribute value that must be matched for each user.

If the filter string is empty, ListUsers returns all users in the user pool.

You can only search for the following standard attributes:

  • username (case-sensitive)

  • email

  • phone_number

  • name

  • given_name

  • family_name

  • preferred_username

  • cognito:user_status (called Status in the Console) (case-insensitive)

  • status (called Enabled in the Console) (case-sensitive)

  • sub

Custom attributes are not searchable.

For more information, see Searching for Users Using the ListUsers API and Examples of Using the ListUsers API in the Amazon Cognito Developer Guide.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to list users.

\"\ - },\ - \"ListUsersResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Users\":{\ - \"shape\":\"UsersListType\",\ - \"documentation\":\"

The users returned in the request to list users.

\"\ - },\ - \"PaginationToken\":{\ - \"shape\":\"SearchPaginationTokenType\",\ - \"documentation\":\"

An identifier that was returned from the previous call to this operation, which can be used to return the next set of items in the list.

\"\ - }\ - },\ - \"documentation\":\"

The response from the request to list users.

\"\ - },\ - \"LogoutURLsListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"RedirectUrlType\"},\ - \"max\":100,\ - \"min\":0\ - },\ - \"LongType\":{\"type\":\"long\"},\ - \"MFAMethodNotFoundException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when Amazon Cognito throws an MFA method not found exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when Amazon Cognito cannot find a multi-factor authentication (MFA) method.

\",\ - \"exception\":true\ - },\ - \"MFAOptionListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"MFAOptionType\"}\ - },\ - \"MFAOptionType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"DeliveryMedium\":{\ - \"shape\":\"DeliveryMediumType\",\ - \"documentation\":\"

The delivery medium (email message or SMS message) to send the MFA code.

\"\ - },\ - \"AttributeName\":{\ - \"shape\":\"AttributeNameType\",\ - \"documentation\":\"

The attribute name of the MFA option type.

\"\ - }\ - },\ - \"documentation\":\"

Specifies the different settings for multi-factor authentication (MFA).

\"\ - },\ - \"MessageActionType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"RESEND\",\ - \"SUPPRESS\"\ - ]\ - },\ - \"MessageTemplateType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"SMSMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

The message template for SMS messages.

\"\ - },\ - \"EmailMessage\":{\ - \"shape\":\"EmailVerificationMessageType\",\ - \"documentation\":\"

The message template for email messages.

\"\ - },\ - \"EmailSubject\":{\ - \"shape\":\"EmailVerificationSubjectType\",\ - \"documentation\":\"

The subject line for email messages.

\"\ - }\ - },\ - \"documentation\":\"

The message template structure.

\"\ - },\ - \"MessageType\":{\"type\":\"string\"},\ - \"NewDeviceMetadataType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - },\ - \"DeviceGroupKey\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The device group key.

\"\ - }\ - },\ - \"documentation\":\"

The new device metadata type.

\"\ - },\ - \"NotAuthorizedException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service returns a not authorized exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a user is not authorized.

\",\ - \"exception\":true\ - },\ - \"NotifyConfigurationType\":{\ - \"type\":\"structure\",\ - \"required\":[\"SourceArn\"],\ - \"members\":{\ - \"From\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The email address that is sending the email. It must be either individually verified with Amazon SES, or from a domain that has been verified with Amazon SES.

\"\ - },\ - \"ReplyTo\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The destination to which the receiver of an email should reply to.

\"\ - },\ - \"SourceArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The Amazon Resource Name (ARN) of the identity that is associated with the sending authorization policy. It permits Amazon Cognito to send for the email address specified in the From parameter.

\"\ - },\ - \"BlockEmail\":{\ - \"shape\":\"NotifyEmailType\",\ - \"documentation\":\"

Email template used when a detected risk event is blocked.

\"\ - },\ - \"NoActionEmail\":{\ - \"shape\":\"NotifyEmailType\",\ - \"documentation\":\"

The email template used when a detected risk event is allowed.

\"\ - },\ - \"MfaEmail\":{\ - \"shape\":\"NotifyEmailType\",\ - \"documentation\":\"

The MFA email template used when MFA is challenged as part of a detected risk.

\"\ - }\ - },\ - \"documentation\":\"

The notify configuration type.

\"\ - },\ - \"NotifyEmailType\":{\ - \"type\":\"structure\",\ - \"required\":[\"Subject\"],\ - \"members\":{\ - \"Subject\":{\ - \"shape\":\"EmailNotificationSubjectType\",\ - \"documentation\":\"

The subject.

\"\ - },\ - \"HtmlBody\":{\ - \"shape\":\"EmailNotificationBodyType\",\ - \"documentation\":\"

The HTML body.

\"\ - },\ - \"TextBody\":{\ - \"shape\":\"EmailNotificationBodyType\",\ - \"documentation\":\"

The text body.

\"\ - }\ - },\ - \"documentation\":\"

The notify email type.

\"\ - },\ - \"NumberAttributeConstraintsType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"MinValue\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The minimum value of an attribute that is of the number data type.

\"\ - },\ - \"MaxValue\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The maximum value of an attribute that is of the number data type.

\"\ - }\ - },\ - \"documentation\":\"

The minimum and maximum value of an attribute that is of the number data type.

\"\ - },\ - \"OAuthFlowType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"code\",\ - \"implicit\",\ - \"client_credentials\"\ - ]\ - },\ - \"OAuthFlowsType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"OAuthFlowType\"},\ - \"max\":3,\ - \"min\":0\ - },\ - \"PaginationKey\":{\ - \"type\":\"string\",\ - \"min\":1,\ - \"pattern\":\"[\\\\S]+\"\ - },\ - \"PaginationKeyType\":{\ - \"type\":\"string\",\ - \"min\":1,\ - \"pattern\":\"[\\\\S]+\"\ - },\ - \"PasswordPolicyMinLengthType\":{\ - \"type\":\"integer\",\ - \"max\":99,\ - \"min\":6\ - },\ - \"PasswordPolicyType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"MinimumLength\":{\ - \"shape\":\"PasswordPolicyMinLengthType\",\ - \"documentation\":\"

The minimum length of the password policy that you have set. Cannot be less than 6.

\"\ - },\ - \"RequireUppercase\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

In the password policy that you have set, refers to whether you have required users to use at least one uppercase letter in their password.

\"\ - },\ - \"RequireLowercase\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

In the password policy that you have set, refers to whether you have required users to use at least one lowercase letter in their password.

\"\ - },\ - \"RequireNumbers\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

In the password policy that you have set, refers to whether you have required users to use at least one number in their password.

\"\ - },\ - \"RequireSymbols\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

In the password policy that you have set, refers to whether you have required users to use at least one symbol in their password.

\"\ - }\ - },\ - \"documentation\":\"

The password policy type.

\"\ - },\ - \"PasswordResetRequiredException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when a password reset is required.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a password reset is required.

\",\ - \"exception\":true\ - },\ - \"PasswordType\":{\ - \"type\":\"string\",\ - \"max\":256,\ - \"min\":6,\ - \"pattern\":\"[\\\\S]+\",\ - \"sensitive\":true\ - },\ - \"PoolQueryLimitType\":{\ - \"type\":\"integer\",\ - \"max\":60,\ - \"min\":1\ - },\ - \"PreSignedUrlType\":{\ - \"type\":\"string\",\ - \"max\":2048,\ - \"min\":0\ - },\ - \"PrecedenceType\":{\ - \"type\":\"integer\",\ - \"min\":0\ - },\ - \"PreconditionNotMetException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when a precondition is not met.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a precondition is not met.

\",\ - \"exception\":true\ - },\ - \"ProviderDescription\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ProviderName\":{\ - \"shape\":\"ProviderNameType\",\ - \"documentation\":\"

The identity provider name.

\"\ - },\ - \"ProviderType\":{\ - \"shape\":\"IdentityProviderTypeType\",\ - \"documentation\":\"

The identity provider type.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the provider was last modified.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the provider was added to the user pool.

\"\ - }\ - },\ - \"documentation\":\"

A container for identity provider details.

\"\ - },\ - \"ProviderDetailsType\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"StringType\"},\ - \"value\":{\"shape\":\"StringType\"}\ - },\ - \"ProviderNameType\":{\ - \"type\":\"string\",\ - \"max\":32,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\"\ - },\ - \"ProviderNameTypeV1\":{\ - \"type\":\"string\",\ - \"max\":32,\ - \"min\":1,\ - \"pattern\":\"[^_][\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}][^_]+\"\ - },\ - \"ProviderUserIdentifierType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ProviderName\":{\ - \"shape\":\"ProviderNameType\",\ - \"documentation\":\"

The name of the provider, for example, Facebook, Google, or Login with Amazon.

\"\ - },\ - \"ProviderAttributeName\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The name of the provider attribute to link to, for example, NameID.

\"\ - },\ - \"ProviderAttributeValue\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The value of the provider attribute to link to, for example, xxxxx_account.

\"\ - }\ - },\ - \"documentation\":\"

A container for information about an identity provider for a user pool.

\"\ - },\ - \"ProvidersListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ProviderDescription\"},\ - \"max\":50,\ - \"min\":0\ - },\ - \"QueryLimit\":{\ - \"type\":\"integer\",\ - \"max\":60,\ - \"min\":1\ - },\ - \"QueryLimitType\":{\ - \"type\":\"integer\",\ - \"max\":60,\ - \"min\":0\ - },\ - \"RedirectUrlType\":{\ - \"type\":\"string\",\ - \"max\":1024,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\"\ - },\ - \"RefreshTokenValidityType\":{\ - \"type\":\"integer\",\ - \"max\":3650,\ - \"min\":0\ - },\ - \"ResendConfirmationCodeRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ClientId\",\ - \"Username\"\ - ],\ - \"members\":{\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The ID of the client associated with the user pool.

\"\ - },\ - \"SecretHash\":{\ - \"shape\":\"SecretHashType\",\ - \"documentation\":\"

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

\"\ - },\ - \"UserContextData\":{\ - \"shape\":\"UserContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user to whom you wish to resend a confirmation code.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics metadata for collecting metrics for ResendConfirmationCode calls.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to resend the confirmation code.

\"\ - },\ - \"ResendConfirmationCodeResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"CodeDeliveryDetails\":{\ - \"shape\":\"CodeDeliveryDetailsType\",\ - \"documentation\":\"

The code delivery details returned by the server in response to the request to resend the confirmation code.

\"\ - }\ - },\ - \"documentation\":\"

The response from the server when the Amazon Cognito Your User Pools service makes the request to resend a confirmation code.

\"\ - },\ - \"ResourceNotFoundException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service returns a resource not found exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the Amazon Cognito service cannot find the requested resource.

\",\ - \"exception\":true\ - },\ - \"ResourceServerIdentifierType\":{\ - \"type\":\"string\",\ - \"max\":256,\ - \"min\":1,\ - \"pattern\":\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]+\"\ - },\ - \"ResourceServerNameType\":{\ - \"type\":\"string\",\ - \"max\":256,\ - \"min\":1,\ - \"pattern\":\"[\\\\w\\\\s+=,.@-]+\"\ - },\ - \"ResourceServerScopeDescriptionType\":{\ - \"type\":\"string\",\ - \"max\":256,\ - \"min\":1\ - },\ - \"ResourceServerScopeListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ResourceServerScopeType\"},\ - \"max\":25\ - },\ - \"ResourceServerScopeNameType\":{\ - \"type\":\"string\",\ - \"max\":256,\ - \"min\":1,\ - \"pattern\":\"[\\\\x21\\\\x23-\\\\x2E\\\\x30-\\\\x5B\\\\x5D-\\\\x7E]+\"\ - },\ - \"ResourceServerScopeType\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ScopeName\",\ - \"ScopeDescription\"\ - ],\ - \"members\":{\ - \"ScopeName\":{\ - \"shape\":\"ResourceServerScopeNameType\",\ - \"documentation\":\"

The name of the scope.

\"\ - },\ - \"ScopeDescription\":{\ - \"shape\":\"ResourceServerScopeDescriptionType\",\ - \"documentation\":\"

A description of the scope.

\"\ - }\ - },\ - \"documentation\":\"

A resource server scope.

\"\ - },\ - \"ResourceServerType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that hosts the resource server.

\"\ - },\ - \"Identifier\":{\ - \"shape\":\"ResourceServerIdentifierType\",\ - \"documentation\":\"

The identifier for the resource server.

\"\ - },\ - \"Name\":{\ - \"shape\":\"ResourceServerNameType\",\ - \"documentation\":\"

The name of the resource server.

\"\ - },\ - \"Scopes\":{\ - \"shape\":\"ResourceServerScopeListType\",\ - \"documentation\":\"

A list of scopes that are defined for the resource server.

\"\ - }\ - },\ - \"documentation\":\"

A container for information about a resource server for a user pool.

\"\ - },\ - \"ResourceServersListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ResourceServerType\"}\ - },\ - \"RespondToAuthChallengeRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ClientId\",\ - \"ChallengeName\"\ - ],\ - \"members\":{\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID.

\"\ - },\ - \"ChallengeName\":{\ - \"shape\":\"ChallengeNameType\",\ - \"documentation\":\"

The challenge name. For more information, see .

ADMIN_NO_SRP_AUTH is not a valid value.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. If InitiateAuth or RespondToAuthChallenge API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

\"\ - },\ - \"ChallengeResponses\":{\ - \"shape\":\"ChallengeResponsesType\",\ - \"documentation\":\"

The challenge responses. These are inputs corresponding to the value of ChallengeName, for example:

  • SMS_MFA: SMS_MFA_CODE, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • PASSWORD_VERIFIER: PASSWORD_CLAIM_SIGNATURE, PASSWORD_CLAIM_SECRET_BLOCK, TIMESTAMP, USERNAME, SECRET_HASH (if app client is configured with client secret).

  • NEW_PASSWORD_REQUIRED: NEW_PASSWORD, any other required attributes, USERNAME, SECRET_HASH (if app client is configured with client secret).

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics metadata for collecting metrics for RespondToAuthChallenge calls.

\"\ - },\ - \"UserContextData\":{\ - \"shape\":\"UserContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

The request to respond to an authentication challenge.

\"\ - },\ - \"RespondToAuthChallengeResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ChallengeName\":{\ - \"shape\":\"ChallengeNameType\",\ - \"documentation\":\"

The challenge name. For more information, see .

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service. If the or API call determines that the caller needs to go through another challenge, they return a session with other challenge parameters. This session should be passed as it is to the next RespondToAuthChallenge API call.

\"\ - },\ - \"ChallengeParameters\":{\ - \"shape\":\"ChallengeParametersType\",\ - \"documentation\":\"

The challenge parameters. For more information, see .

\"\ - },\ - \"AuthenticationResult\":{\ - \"shape\":\"AuthenticationResultType\",\ - \"documentation\":\"

The result returned by the server in response to the request to respond to the authentication challenge.

\"\ - }\ - },\ - \"documentation\":\"

The response to respond to the authentication challenge.

\"\ - },\ - \"RiskConfigurationType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID.

\"\ - },\ - \"CompromisedCredentialsRiskConfiguration\":{\ - \"shape\":\"CompromisedCredentialsRiskConfigurationType\",\ - \"documentation\":\"

The compromised credentials risk configuration object including the EventFilter and the EventAction

\"\ - },\ - \"AccountTakeoverRiskConfiguration\":{\ - \"shape\":\"AccountTakeoverRiskConfigurationType\",\ - \"documentation\":\"

The account takeover risk configuration object including the NotifyConfiguration object and Actions to take in the case of an account takeover.

\"\ - },\ - \"RiskExceptionConfiguration\":{\ - \"shape\":\"RiskExceptionConfigurationType\",\ - \"documentation\":\"

The configuration to override the risk decision.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The last modified date.

\"\ - }\ - },\ - \"documentation\":\"

The risk configuration type.

\"\ - },\ - \"RiskDecisionType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"NoRisk\",\ - \"AccountTakeover\",\ - \"Block\"\ - ]\ - },\ - \"RiskExceptionConfigurationType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"BlockedIPRangeList\":{\ - \"shape\":\"BlockedIPRangeListType\",\ - \"documentation\":\"

Overrides the risk decision to always block the pre-authentication requests. The IP range is in CIDR notation: a compact representation of an IP address and its associated routing prefix.

\"\ - },\ - \"SkippedIPRangeList\":{\ - \"shape\":\"SkippedIPRangeListType\",\ - \"documentation\":\"

Risk detection is not performed on the IP addresses in the range list. The IP range is in CIDR notation.

\"\ - }\ - },\ - \"documentation\":\"

The type of the configuration to override the risk decision.

\"\ - },\ - \"RiskLevelType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Low\",\ - \"Medium\",\ - \"High\"\ - ]\ - },\ - \"S3BucketType\":{\ - \"type\":\"string\",\ - \"max\":1024,\ - \"min\":3,\ - \"pattern\":\"^[0-9A-Za-z\\\\.\\\\-_]*(?Specifies whether SMS text message MFA is enabled.

\"\ - },\ - \"PreferredMfa\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

The preferred MFA method.

\"\ - }\ - },\ - \"documentation\":\"

The SMS multi-factor authentication (MFA) settings type.

\"\ - },\ - \"SchemaAttributeType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Name\":{\ - \"shape\":\"CustomAttributeNameType\",\ - \"documentation\":\"

A schema attribute of the name type.

\"\ - },\ - \"AttributeDataType\":{\ - \"shape\":\"AttributeDataType\",\ - \"documentation\":\"

The attribute data type.

\"\ - },\ - \"DeveloperOnlyAttribute\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Specifies whether the attribute type is developer only.

\",\ - \"box\":true\ - },\ - \"Mutable\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Specifies whether the value of the attribute can be changed.

For any user pool attribute that's mapped to an identity provider attribute, you must set this parameter to true. Amazon Cognito updates mapped attributes when users sign in to your application through an identity provider. If an attribute is immutable, Amazon Cognito throws an error when it attempts to update the attribute. For more information, see Specifying Identity Provider Attribute Mappings for Your User Pool.

\",\ - \"box\":true\ - },\ - \"Required\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Specifies whether a user pool attribute is required. If the attribute is required and the user does not provide a value, registration or sign-in will fail.

\",\ - \"box\":true\ - },\ - \"NumberAttributeConstraints\":{\ - \"shape\":\"NumberAttributeConstraintsType\",\ - \"documentation\":\"

Specifies the constraints for an attribute of the number type.

\"\ - },\ - \"StringAttributeConstraints\":{\ - \"shape\":\"StringAttributeConstraintsType\",\ - \"documentation\":\"

Specifies the constraints for an attribute of the string type.

\"\ - }\ - },\ - \"documentation\":\"

Contains information about the schema attribute.

\"\ - },\ - \"SchemaAttributesListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"SchemaAttributeType\"},\ - \"max\":50,\ - \"min\":1\ - },\ - \"ScopeDoesNotExistException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when the specified scope does not exist.

\",\ - \"exception\":true\ - },\ - \"ScopeListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ScopeType\"},\ - \"max\":25\ - },\ - \"ScopeType\":{\ - \"type\":\"string\",\ - \"max\":256,\ - \"min\":1,\ - \"pattern\":\"[\\\\x21\\\\x23-\\\\x5B\\\\x5D-\\\\x7E]+\"\ - },\ - \"SearchPaginationTokenType\":{\ - \"type\":\"string\",\ - \"min\":1,\ - \"pattern\":\"[\\\\S]+\"\ - },\ - \"SearchedAttributeNamesListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"AttributeNameType\"}\ - },\ - \"SecretCodeType\":{\ - \"type\":\"string\",\ - \"min\":16,\ - \"pattern\":\"[A-Za-z0-9]+\",\ - \"sensitive\":true\ - },\ - \"SecretHashType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w+=/]+\",\ - \"sensitive\":true\ - },\ - \"SessionType\":{\ - \"type\":\"string\",\ - \"max\":2048,\ - \"min\":20\ - },\ - \"SetRiskConfigurationRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The app client ID. If ClientId is null, then the risk configuration is mapped to userPoolId. When the client ID is null, the same risk configuration is applied to all the clients in the userPool.

Otherwise, ClientId is mapped to the client. When the client ID is not null, the user pool configuration is overridden and the risk configuration for the client is used instead.

\"\ - },\ - \"CompromisedCredentialsRiskConfiguration\":{\ - \"shape\":\"CompromisedCredentialsRiskConfigurationType\",\ - \"documentation\":\"

The compromised credentials risk configuration.

\"\ - },\ - \"AccountTakeoverRiskConfiguration\":{\ - \"shape\":\"AccountTakeoverRiskConfigurationType\",\ - \"documentation\":\"

The account takeover risk configuration.

\"\ - },\ - \"RiskExceptionConfiguration\":{\ - \"shape\":\"RiskExceptionConfigurationType\",\ - \"documentation\":\"

The configuration to override the risk decision.

\"\ - }\ - }\ - },\ - \"SetRiskConfigurationResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"RiskConfiguration\"],\ - \"members\":{\ - \"RiskConfiguration\":{\ - \"shape\":\"RiskConfigurationType\",\ - \"documentation\":\"

The risk configuration.

\"\ - }\ - }\ - },\ - \"SetUICustomizationRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The client ID for the client app.

\"\ - },\ - \"CSS\":{\ - \"shape\":\"CSSType\",\ - \"documentation\":\"

The CSS values in the UI customization.

\"\ - },\ - \"ImageFile\":{\ - \"shape\":\"ImageFileType\",\ - \"documentation\":\"

The uploaded logo image for the UI customization.

\"\ - }\ - }\ - },\ - \"SetUICustomizationResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"UICustomization\"],\ - \"members\":{\ - \"UICustomization\":{\ - \"shape\":\"UICustomizationType\",\ - \"documentation\":\"

The UI customization information.

\"\ - }\ - }\ - },\ - \"SetUserMFAPreferenceRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"AccessToken\"],\ - \"members\":{\ - \"SMSMfaSettings\":{\ - \"shape\":\"SMSMfaSettingsType\",\ - \"documentation\":\"

The SMS text message multi-factor authentication (MFA) settings.

\"\ - },\ - \"SoftwareTokenMfaSettings\":{\ - \"shape\":\"SoftwareTokenMfaSettingsType\",\ - \"documentation\":\"

The time-based one-time password software token MFA settings.

\"\ - },\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - }\ - }\ - },\ - \"SetUserMFAPreferenceResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - }\ - },\ - \"SetUserPoolMfaConfigRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"SmsMfaConfiguration\":{\ - \"shape\":\"SmsMfaConfigType\",\ - \"documentation\":\"

The SMS text message MFA configuration.

\"\ - },\ - \"SoftwareTokenMfaConfiguration\":{\ - \"shape\":\"SoftwareTokenMfaConfigType\",\ - \"documentation\":\"

The software token MFA configuration.

\"\ - },\ - \"MfaConfiguration\":{\ - \"shape\":\"UserPoolMfaType\",\ - \"documentation\":\"

The MFA configuration.

\"\ - }\ - }\ - },\ - \"SetUserPoolMfaConfigResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"SmsMfaConfiguration\":{\ - \"shape\":\"SmsMfaConfigType\",\ - \"documentation\":\"

The SMS text message MFA configuration.

\"\ - },\ - \"SoftwareTokenMfaConfiguration\":{\ - \"shape\":\"SoftwareTokenMfaConfigType\",\ - \"documentation\":\"

The software token MFA configuration.

\"\ - },\ - \"MfaConfiguration\":{\ - \"shape\":\"UserPoolMfaType\",\ - \"documentation\":\"

The MFA configuration.

\"\ - }\ - }\ - },\ - \"SetUserSettingsRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"AccessToken\",\ - \"MFAOptions\"\ - ],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token for the set user settings request.

\"\ - },\ - \"MFAOptions\":{\ - \"shape\":\"MFAOptionListType\",\ - \"documentation\":\"

Specifies the options for MFA (e.g., email or phone number).

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to set user settings.

\"\ - },\ - \"SetUserSettingsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

The response from the server for a set user settings request.

\"\ - },\ - \"SignUpRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"ClientId\",\ - \"Username\",\ - \"Password\"\ - ],\ - \"members\":{\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The ID of the client associated with the user pool.

\"\ - },\ - \"SecretHash\":{\ - \"shape\":\"SecretHashType\",\ - \"documentation\":\"

A keyed-hash message authentication code (HMAC) calculated using the secret key of a user pool client and username plus the client ID in the message.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user you wish to register.

\"\ - },\ - \"Password\":{\ - \"shape\":\"PasswordType\",\ - \"documentation\":\"

The password of the user you wish to register.

\"\ - },\ - \"UserAttributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

\"\ - },\ - \"ValidationData\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

The validation data in the request to register a user.

\"\ - },\ - \"AnalyticsMetadata\":{\ - \"shape\":\"AnalyticsMetadataType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics metadata for collecting metrics for SignUp calls.

\"\ - },\ - \"UserContextData\":{\ - \"shape\":\"UserContextDataType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to register a user.

\"\ - },\ - \"SignUpResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserConfirmed\",\ - \"UserSub\"\ - ],\ - \"members\":{\ - \"UserConfirmed\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

A response from the server indicating that a user registration has been confirmed.

\"\ - },\ - \"CodeDeliveryDetails\":{\ - \"shape\":\"CodeDeliveryDetailsType\",\ - \"documentation\":\"

The code delivery details returned by the server response to the user registration request.

\"\ - },\ - \"UserSub\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The UUID of the authenticated user. This is not the same as username.

\"\ - }\ - },\ - \"documentation\":\"

The response from the server for a registration request.

\"\ - },\ - \"SkippedIPRangeListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"StringType\"},\ - \"max\":20\ - },\ - \"SmsConfigurationType\":{\ - \"type\":\"structure\",\ - \"required\":[\"SnsCallerArn\"],\ - \"members\":{\ - \"SnsCallerArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The Amazon Resource Name (ARN) of the Amazon Simple Notification Service (SNS) caller.

\"\ - },\ - \"ExternalId\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The external ID.

\"\ - }\ - },\ - \"documentation\":\"

The SMS configuration type.

\"\ - },\ - \"SmsMfaConfigType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"SmsAuthenticationMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

The SMS authentication message.

\"\ - },\ - \"SmsConfiguration\":{\ - \"shape\":\"SmsConfigurationType\",\ - \"documentation\":\"

The SMS configuration.

\"\ - }\ - },\ - \"documentation\":\"

The SMS text message multi-factor authentication (MFA) configuration type.

\"\ - },\ - \"SmsVerificationMessageType\":{\ - \"type\":\"string\",\ - \"max\":140,\ - \"min\":6,\ - \"pattern\":\".*\\\\{####\\\\}.*\"\ - },\ - \"SoftwareTokenMFANotFoundException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when the software token TOTP multi-factor authentication (MFA) is not enabled for the user pool.

\",\ - \"exception\":true\ - },\ - \"SoftwareTokenMFAUserCodeType\":{\ - \"type\":\"string\",\ - \"max\":6,\ - \"min\":6,\ - \"pattern\":\"[0-9]+\"\ - },\ - \"SoftwareTokenMfaConfigType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Enabled\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Specifies whether software token MFA is enabled.

\"\ - }\ - },\ - \"documentation\":\"

The type used for enabling software token MFA at the user pool level.

\"\ - },\ - \"SoftwareTokenMfaSettingsType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Enabled\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Specifies whether software token MFA is enabled.

\"\ - },\ - \"PreferredMfa\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

The preferred MFA method.

\"\ - }\ - },\ - \"documentation\":\"

The type used for enabling software token MFA at the user level.

\"\ - },\ - \"StartUserImportJobRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"JobId\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are being imported into.

\"\ - },\ - \"JobId\":{\ - \"shape\":\"UserImportJobIdType\",\ - \"documentation\":\"

The job ID for the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to start the user import job.

\"\ - },\ - \"StartUserImportJobResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserImportJob\":{\ - \"shape\":\"UserImportJobType\",\ - \"documentation\":\"

The job object that represents the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to start the user import job.

\"\ - },\ - \"StatusType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Enabled\",\ - \"Disabled\"\ - ]\ - },\ - \"StopUserImportJobRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"JobId\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are being imported into.

\"\ - },\ - \"JobId\":{\ - \"shape\":\"UserImportJobIdType\",\ - \"documentation\":\"

The job ID for the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to stop the user import job.

\"\ - },\ - \"StopUserImportJobResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserImportJob\":{\ - \"shape\":\"UserImportJobType\",\ - \"documentation\":\"

The job object that represents the user import job.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to stop the user import job.

\"\ - },\ - \"StringAttributeConstraintsType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"MinLength\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The minimum length.

\"\ - },\ - \"MaxLength\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The maximum length.

\"\ - }\ - },\ - \"documentation\":\"

The constraints associated with a string attribute.

\"\ - },\ - \"StringType\":{\"type\":\"string\"},\ - \"SupportedIdentityProvidersListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ProviderNameType\"}\ - },\ - \"TokenModelType\":{\ - \"type\":\"string\",\ - \"pattern\":\"[A-Za-z0-9-_=.]+\",\ - \"sensitive\":true\ - },\ - \"TooManyFailedAttemptsException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service returns a too many failed attempts exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the user has made too many failed attempts for a given action (e.g., sign in).

\",\ - \"exception\":true\ - },\ - \"TooManyRequestsException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service returns a too many requests exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the user has made too many requests for a given operation.

\",\ - \"exception\":true\ - },\ - \"UICustomizationType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The client ID for the client app.

\"\ - },\ - \"ImageUrl\":{\ - \"shape\":\"ImageUrlType\",\ - \"documentation\":\"

The logo image for the UI customization.

\"\ - },\ - \"CSS\":{\ - \"shape\":\"CSSType\",\ - \"documentation\":\"

The CSS values in the UI customization.

\"\ - },\ - \"CSSVersion\":{\ - \"shape\":\"CSSVersionType\",\ - \"documentation\":\"

The CSS version number.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The last-modified date for the UI customization.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The creation date for the UI customization.

\"\ - }\ - },\ - \"documentation\":\"

A container for the UI customization information for a user pool's built-in app UI.

\"\ - },\ - \"UnexpectedLambdaException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service returns an unexpected AWS Lambda exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the Amazon Cognito service encounters an unexpected exception with the AWS Lambda service.

\",\ - \"exception\":true\ - },\ - \"UnsupportedIdentityProviderException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when the specified identifier is not supported.

\",\ - \"exception\":true\ - },\ - \"UnsupportedUserStateException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the user is in an unsupported state.

\"\ - }\ - },\ - \"documentation\":\"

The request failed because the user is in an unsupported state.

\",\ - \"exception\":true\ - },\ - \"UpdateAuthEventFeedbackRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Username\",\ - \"EventId\",\ - \"FeedbackToken\",\ - \"FeedbackValue\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user pool username.

\"\ - },\ - \"EventId\":{\ - \"shape\":\"EventIdType\",\ - \"documentation\":\"

The event ID.

\"\ - },\ - \"FeedbackToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The feedback token.

\"\ - },\ - \"FeedbackValue\":{\ - \"shape\":\"FeedbackValueType\",\ - \"documentation\":\"

The authentication event feedback value.

\"\ - }\ - }\ - },\ - \"UpdateAuthEventFeedbackResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - }\ - },\ - \"UpdateDeviceStatusRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"AccessToken\",\ - \"DeviceKey\"\ - ],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - },\ - \"DeviceKey\":{\ - \"shape\":\"DeviceKeyType\",\ - \"documentation\":\"

The device key.

\"\ - },\ - \"DeviceRememberedStatus\":{\ - \"shape\":\"DeviceRememberedStatusType\",\ - \"documentation\":\"

The status of whether a device is remembered.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to update the device status.

\"\ - },\ - \"UpdateDeviceStatusResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

The response to the request to update the device status.

\"\ - },\ - \"UpdateGroupRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"GroupName\",\ - \"UserPoolId\"\ - ],\ - \"members\":{\ - \"GroupName\":{\ - \"shape\":\"GroupNameType\",\ - \"documentation\":\"

The name of the group.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Description\":{\ - \"shape\":\"DescriptionType\",\ - \"documentation\":\"

A string containing the new description of the group.

\"\ - },\ - \"RoleArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The new role ARN for the group. This is used for setting the cognito:roles and cognito:preferred_role claims in the token.

\"\ - },\ - \"Precedence\":{\ - \"shape\":\"PrecedenceType\",\ - \"documentation\":\"

The new precedence value for the group. For more information about this parameter, see .

\"\ - }\ - }\ - },\ - \"UpdateGroupResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Group\":{\ - \"shape\":\"GroupType\",\ - \"documentation\":\"

The group object for the group.

\"\ - }\ - }\ - },\ - \"UpdateIdentityProviderRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ProviderName\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID.

\"\ - },\ - \"ProviderName\":{\ - \"shape\":\"ProviderNameType\",\ - \"documentation\":\"

The identity provider name.

\"\ - },\ - \"ProviderDetails\":{\ - \"shape\":\"ProviderDetailsType\",\ - \"documentation\":\"

The identity provider details to be updated, such as MetadataURL and MetadataFile.

\"\ - },\ - \"AttributeMapping\":{\ - \"shape\":\"AttributeMappingType\",\ - \"documentation\":\"

The identity provider attribute mapping to be changed.

\"\ - },\ - \"IdpIdentifiers\":{\ - \"shape\":\"IdpIdentifiersListType\",\ - \"documentation\":\"

A list of identity provider identifiers.

\"\ - }\ - }\ - },\ - \"UpdateIdentityProviderResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityProvider\"],\ - \"members\":{\ - \"IdentityProvider\":{\ - \"shape\":\"IdentityProviderType\",\ - \"documentation\":\"

The identity provider object.

\"\ - }\ - }\ - },\ - \"UpdateResourceServerRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"Identifier\",\ - \"Name\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool.

\"\ - },\ - \"Identifier\":{\ - \"shape\":\"ResourceServerIdentifierType\",\ - \"documentation\":\"

The identifier for the resource server.

\"\ - },\ - \"Name\":{\ - \"shape\":\"ResourceServerNameType\",\ - \"documentation\":\"

The name of the resource server.

\"\ - },\ - \"Scopes\":{\ - \"shape\":\"ResourceServerScopeListType\",\ - \"documentation\":\"

The scope values to be set for the resource server.

\"\ - }\ - }\ - },\ - \"UpdateResourceServerResponse\":{\ - \"type\":\"structure\",\ - \"required\":[\"ResourceServer\"],\ - \"members\":{\ - \"ResourceServer\":{\ - \"shape\":\"ResourceServerType\",\ - \"documentation\":\"

The resource server.

\"\ - }\ - }\ - },\ - \"UpdateUserAttributesRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserAttributes\",\ - \"AccessToken\"\ - ],\ - \"members\":{\ - \"UserAttributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

An array of name-value pairs representing user attributes.

For custom attributes, you must prepend the custom: prefix to the attribute name.

\"\ - },\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token for the request to update user attributes.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to update user attributes.

\"\ - },\ - \"UpdateUserAttributesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"CodeDeliveryDetailsList\":{\ - \"shape\":\"CodeDeliveryDetailsListType\",\ - \"documentation\":\"

The code delivery details list from the server for the request to update user attributes.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server for the request to update user attributes.

\"\ - },\ - \"UpdateUserPoolClientRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"UserPoolId\",\ - \"ClientId\"\ - ],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to update the user pool client.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The ID of the client associated with the user pool.

\"\ - },\ - \"ClientName\":{\ - \"shape\":\"ClientNameType\",\ - \"documentation\":\"

The client name from the update user pool client request.

\"\ - },\ - \"RefreshTokenValidity\":{\ - \"shape\":\"RefreshTokenValidityType\",\ - \"documentation\":\"

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

\"\ - },\ - \"ReadAttributes\":{\ - \"shape\":\"ClientPermissionListType\",\ - \"documentation\":\"

The read-only attributes of the user pool.

\"\ - },\ - \"WriteAttributes\":{\ - \"shape\":\"ClientPermissionListType\",\ - \"documentation\":\"

The writeable attributes of the user pool.

\"\ - },\ - \"ExplicitAuthFlows\":{\ - \"shape\":\"ExplicitAuthFlowsListType\",\ - \"documentation\":\"

Explicit authentication flows.

\"\ - },\ - \"SupportedIdentityProviders\":{\ - \"shape\":\"SupportedIdentityProvidersListType\",\ - \"documentation\":\"

A list of provider names for the identity providers that are supported on this client.

\"\ - },\ - \"CallbackURLs\":{\ - \"shape\":\"CallbackURLsListType\",\ - \"documentation\":\"

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

\"\ - },\ - \"LogoutURLs\":{\ - \"shape\":\"LogoutURLsListType\",\ - \"documentation\":\"

A list of allowed logout URLs for the identity providers.

\"\ - },\ - \"DefaultRedirectURI\":{\ - \"shape\":\"RedirectUrlType\",\ - \"documentation\":\"

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

\"\ - },\ - \"AllowedOAuthFlows\":{\ - \"shape\":\"OAuthFlowsType\",\ - \"documentation\":\"

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

\"\ - },\ - \"AllowedOAuthScopes\":{\ - \"shape\":\"ScopeListType\",\ - \"documentation\":\"

A list of allowed OAuth scopes. Currently supported values are \\\"phone\\\", \\\"email\\\", \\\"openid\\\", and \\\"Cognito\\\".

\"\ - },\ - \"AllowedOAuthFlowsUserPoolClient\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Set to TRUE if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

\"\ - },\ - \"AnalyticsConfiguration\":{\ - \"shape\":\"AnalyticsConfigurationType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics configuration for collecting metrics for this user pool.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to update the user pool client.

\"\ - },\ - \"UpdateUserPoolClientResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolClient\":{\ - \"shape\":\"UserPoolClientType\",\ - \"documentation\":\"

The user pool client value from the response from the server when an update user pool client request is made.

\"\ - }\ - },\ - \"documentation\":\"

Represents the response from the server to the request to update the user pool client.

\"\ - },\ - \"UpdateUserPoolDomainRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Domain\",\ - \"UserPoolId\",\ - \"CustomDomainConfig\"\ - ],\ - \"members\":{\ - \"Domain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

The domain name for the custom domain that hosts the sign-up and sign-in pages for your application. For example: auth.example.com.

This string can include only lowercase letters, numbers, and hyphens. Do not use a hyphen for the first or last character. Use periods to separate subdomain names.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The ID of the user pool that is associated with the custom domain that you are updating the certificate for.

\"\ - },\ - \"CustomDomainConfig\":{\ - \"shape\":\"CustomDomainConfigType\",\ - \"documentation\":\"

The configuration for a custom domain that hosts the sign-up and sign-in pages for your application. Use this object to specify an SSL certificate that is managed by ACM.

\"\ - }\ - },\ - \"documentation\":\"

The UpdateUserPoolDomain request input.

\"\ - },\ - \"UpdateUserPoolDomainResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"CloudFrontDomain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

The Amazon CloudFront endpoint that Amazon Cognito set up when you added the custom domain to your user pool.

\"\ - }\ - },\ - \"documentation\":\"

The UpdateUserPoolDomain response output.

\"\ - },\ - \"UpdateUserPoolRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserPoolId\"],\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool you want to update.

\"\ - },\ - \"Policies\":{\ - \"shape\":\"UserPoolPolicyType\",\ - \"documentation\":\"

A container with the policies you wish to update in a user pool.

\"\ - },\ - \"LambdaConfig\":{\ - \"shape\":\"LambdaConfigType\",\ - \"documentation\":\"

The AWS Lambda configuration information from the request to update the user pool.

\"\ - },\ - \"AutoVerifiedAttributes\":{\ - \"shape\":\"VerifiedAttributesListType\",\ - \"documentation\":\"

The attributes that are automatically verified when the Amazon Cognito service makes a request to update user pools.

\"\ - },\ - \"SmsVerificationMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

A container with information about the SMS verification message.

\"\ - },\ - \"EmailVerificationMessage\":{\ - \"shape\":\"EmailVerificationMessageType\",\ - \"documentation\":\"

The contents of the email verification message.

\"\ - },\ - \"EmailVerificationSubject\":{\ - \"shape\":\"EmailVerificationSubjectType\",\ - \"documentation\":\"

The subject of the email verification message.

\"\ - },\ - \"VerificationMessageTemplate\":{\ - \"shape\":\"VerificationMessageTemplateType\",\ - \"documentation\":\"

The template for verification messages.

\"\ - },\ - \"SmsAuthenticationMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

The contents of the SMS authentication message.

\"\ - },\ - \"MfaConfiguration\":{\ - \"shape\":\"UserPoolMfaType\",\ - \"documentation\":\"

Can be one of the following values:

  • OFF - MFA tokens are not required and cannot be specified during user registration.

  • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

  • OPTIONAL - Users have the option when registering to create an MFA token.

\"\ - },\ - \"DeviceConfiguration\":{\ - \"shape\":\"DeviceConfigurationType\",\ - \"documentation\":\"

Device configuration.

\"\ - },\ - \"EmailConfiguration\":{\ - \"shape\":\"EmailConfigurationType\",\ - \"documentation\":\"

Email configuration.

\"\ - },\ - \"SmsConfiguration\":{\ - \"shape\":\"SmsConfigurationType\",\ - \"documentation\":\"

SMS configuration.

\"\ - },\ - \"UserPoolTags\":{\ - \"shape\":\"UserPoolTagsType\",\ - \"documentation\":\"

The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool

\"\ - },\ - \"AdminCreateUserConfig\":{\ - \"shape\":\"AdminCreateUserConfigType\",\ - \"documentation\":\"

The configuration for AdminCreateUser requests.

\"\ - },\ - \"UserPoolAddOns\":{\ - \"shape\":\"UserPoolAddOnsType\",\ - \"documentation\":\"

Used to enable advanced security risk detection. Set the key AdvancedSecurityMode to the value \\\"AUDIT\\\".

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to update the user pool.

\"\ - },\ - \"UpdateUserPoolResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

Represents the response from the server when you make a request to update the user pool.

\"\ - },\ - \"UserContextDataType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"EncodedData\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - }\ - },\ - \"documentation\":\"

Contextual data such as the user's device fingerprint, IP address, or location used for evaluating the risk of an unexpected event by Amazon Cognito advanced security.

\"\ - },\ - \"UserFilterType\":{\ - \"type\":\"string\",\ - \"max\":256\ - },\ - \"UserImportInProgressException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the user pool has an import job running.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when you are trying to modify a user pool while a user import job is in progress for that pool.

\",\ - \"exception\":true\ - },\ - \"UserImportJobIdType\":{\ - \"type\":\"string\",\ - \"max\":55,\ - \"min\":1,\ - \"pattern\":\"import-[0-9a-zA-Z-]+\"\ - },\ - \"UserImportJobNameType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w\\\\s+=,.@-]+\"\ - },\ - \"UserImportJobStatusType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Created\",\ - \"Pending\",\ - \"InProgress\",\ - \"Stopping\",\ - \"Expired\",\ - \"Stopped\",\ - \"Failed\",\ - \"Succeeded\"\ - ]\ - },\ - \"UserImportJobType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"JobName\":{\ - \"shape\":\"UserImportJobNameType\",\ - \"documentation\":\"

The job name for the user import job.

\"\ - },\ - \"JobId\":{\ - \"shape\":\"UserImportJobIdType\",\ - \"documentation\":\"

The job ID for the user import job.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool that the users are being imported into.

\"\ - },\ - \"PreSignedUrl\":{\ - \"shape\":\"PreSignedUrlType\",\ - \"documentation\":\"

The pre-signed URL to be used to upload the .csv file.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user import job was created.

\"\ - },\ - \"StartDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date when the user import job was started.

\"\ - },\ - \"CompletionDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date when the user import job was completed.

\"\ - },\ - \"Status\":{\ - \"shape\":\"UserImportJobStatusType\",\ - \"documentation\":\"

The status of the user import job. One of the following:

  • Created - The job was created but not started.

  • Pending - A transition state. You have started the job, but it has not begun importing users yet.

  • InProgress - The job has started, and users are being imported.

  • Stopping - You have stopped the job, but the job has not stopped importing users yet.

  • Stopped - You have stopped the job, and the job has stopped importing users.

  • Succeeded - The job has completed successfully.

  • Failed - The job has stopped due to an error.

  • Expired - You created a job, but did not start the job within 24-48 hours. All data associated with the job was deleted, and the job cannot be started.

\"\ - },\ - \"CloudWatchLogsRoleArn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The role ARN for the Amazon CloudWatch Logging role for the user import job. For more information, see \\\"Creating the CloudWatch Logs IAM Role\\\" in the Amazon Cognito Developer Guide.

\"\ - },\ - \"ImportedUsers\":{\ - \"shape\":\"LongType\",\ - \"documentation\":\"

The number of users that were successfully imported.

\"\ - },\ - \"SkippedUsers\":{\ - \"shape\":\"LongType\",\ - \"documentation\":\"

The number of users that were skipped.

\"\ - },\ - \"FailedUsers\":{\ - \"shape\":\"LongType\",\ - \"documentation\":\"

The number of users that could not be imported.

\"\ - },\ - \"CompletionMessage\":{\ - \"shape\":\"CompletionMessageType\",\ - \"documentation\":\"

The message returned when the user import job is completed.

\"\ - }\ - },\ - \"documentation\":\"

The user import job type.

\"\ - },\ - \"UserImportJobsListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"UserImportJobType\"},\ - \"max\":50,\ - \"min\":1\ - },\ - \"UserLambdaValidationException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when the Amazon Cognito service returns a user validation exception with the AWS Lambda service.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when the Amazon Cognito service encounters a user validation exception with the AWS Lambda service.

\",\ - \"exception\":true\ - },\ - \"UserMFASettingListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"StringType\"}\ - },\ - \"UserNotConfirmedException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when a user is not confirmed successfully.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a user is not confirmed successfully.

\",\ - \"exception\":true\ - },\ - \"UserNotFoundException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when a user is not found.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when a user is not found.

\",\ - \"exception\":true\ - },\ - \"UserPoolAddOnNotEnabledException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when user pool add-ons are not enabled.

\",\ - \"exception\":true\ - },\ - \"UserPoolAddOnsType\":{\ - \"type\":\"structure\",\ - \"required\":[\"AdvancedSecurityMode\"],\ - \"members\":{\ - \"AdvancedSecurityMode\":{\ - \"shape\":\"AdvancedSecurityModeType\",\ - \"documentation\":\"

The advanced security mode.

\"\ - }\ - },\ - \"documentation\":\"

The user pool add-ons type.

\"\ - },\ - \"UserPoolClientDescription\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The ID of the client associated with the user pool.

\"\ - },\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool where you want to describe the user pool client.

\"\ - },\ - \"ClientName\":{\ - \"shape\":\"ClientNameType\",\ - \"documentation\":\"

The client name from the user pool client description.

\"\ - }\ - },\ - \"documentation\":\"

The description of the user pool client.

\"\ - },\ - \"UserPoolClientListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"UserPoolClientDescription\"}\ - },\ - \"UserPoolClientType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UserPoolId\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The user pool ID for the user pool client.

\"\ - },\ - \"ClientName\":{\ - \"shape\":\"ClientNameType\",\ - \"documentation\":\"

The client name from the user pool request of the client type.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"ClientIdType\",\ - \"documentation\":\"

The ID of the client associated with the user pool.

\"\ - },\ - \"ClientSecret\":{\ - \"shape\":\"ClientSecretType\",\ - \"documentation\":\"

The client secret from the user pool request of the client type.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user pool client was last modified.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user pool client was created.

\"\ - },\ - \"RefreshTokenValidity\":{\ - \"shape\":\"RefreshTokenValidityType\",\ - \"documentation\":\"

The time limit, in days, after which the refresh token is no longer valid and cannot be used.

\"\ - },\ - \"ReadAttributes\":{\ - \"shape\":\"ClientPermissionListType\",\ - \"documentation\":\"

The Read-only attributes.

\"\ - },\ - \"WriteAttributes\":{\ - \"shape\":\"ClientPermissionListType\",\ - \"documentation\":\"

The writeable attributes.

\"\ - },\ - \"ExplicitAuthFlows\":{\ - \"shape\":\"ExplicitAuthFlowsListType\",\ - \"documentation\":\"

The explicit authentication flows.

\"\ - },\ - \"SupportedIdentityProviders\":{\ - \"shape\":\"SupportedIdentityProvidersListType\",\ - \"documentation\":\"

A list of provider names for the identity providers that are supported on this client.

\"\ - },\ - \"CallbackURLs\":{\ - \"shape\":\"CallbackURLsListType\",\ - \"documentation\":\"

A list of allowed redirect (callback) URLs for the identity providers.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

\"\ - },\ - \"LogoutURLs\":{\ - \"shape\":\"LogoutURLsListType\",\ - \"documentation\":\"

A list of allowed logout URLs for the identity providers.

\"\ - },\ - \"DefaultRedirectURI\":{\ - \"shape\":\"RedirectUrlType\",\ - \"documentation\":\"

The default redirect URI. Must be in the CallbackURLs list.

A redirect URI must:

  • Be an absolute URI.

  • Be registered with the authorization server.

  • Not include a fragment component.

See OAuth 2.0 - Redirection Endpoint.

Amazon Cognito requires HTTPS over HTTP except for http://localhost for testing purposes only.

App callback URLs such as myapp://example are also supported.

\"\ - },\ - \"AllowedOAuthFlows\":{\ - \"shape\":\"OAuthFlowsType\",\ - \"documentation\":\"

Set to code to initiate a code grant flow, which provides an authorization code as the response. This code can be exchanged for access tokens with the token endpoint.

Set to token to specify that the client should get the access token (and, optionally, ID token, based on scopes) directly.

\"\ - },\ - \"AllowedOAuthScopes\":{\ - \"shape\":\"ScopeListType\",\ - \"documentation\":\"

A list of allowed OAuth scopes. Currently supported values are \\\"phone\\\", \\\"email\\\", \\\"openid\\\", and \\\"Cognito\\\".

\"\ - },\ - \"AllowedOAuthFlowsUserPoolClient\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Set to TRUE if the client is allowed to follow the OAuth protocol when interacting with Cognito user pools.

\",\ - \"box\":true\ - },\ - \"AnalyticsConfiguration\":{\ - \"shape\":\"AnalyticsConfigurationType\",\ - \"documentation\":\"

The Amazon Pinpoint analytics configuration for the user pool client.

\"\ - }\ - },\ - \"documentation\":\"

Contains information about a user pool client.

\"\ - },\ - \"UserPoolDescriptionType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Id\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The ID in a user pool description.

\"\ - },\ - \"Name\":{\ - \"shape\":\"UserPoolNameType\",\ - \"documentation\":\"

The name in a user pool description.

\"\ - },\ - \"LambdaConfig\":{\ - \"shape\":\"LambdaConfigType\",\ - \"documentation\":\"

The AWS Lambda configuration information in a user pool description.

\"\ - },\ - \"Status\":{\ - \"shape\":\"StatusType\",\ - \"documentation\":\"

The user pool status in a user pool description.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user pool description was last modified.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user pool description was created.

\"\ - }\ - },\ - \"documentation\":\"

A user pool description.

\"\ - },\ - \"UserPoolIdType\":{\ - \"type\":\"string\",\ - \"max\":55,\ - \"min\":1,\ - \"pattern\":\"[\\\\w-]+_[0-9a-zA-Z]+\"\ - },\ - \"UserPoolListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"UserPoolDescriptionType\"}\ - },\ - \"UserPoolMfaType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"OFF\",\ - \"ON\",\ - \"OPTIONAL\"\ - ]\ - },\ - \"UserPoolNameType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w\\\\s+=,.@-]+\"\ - },\ - \"UserPoolPolicyType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"PasswordPolicy\":{\ - \"shape\":\"PasswordPolicyType\",\ - \"documentation\":\"

The password policy.

\"\ - }\ - },\ - \"documentation\":\"

The policy associated with a user pool.

\"\ - },\ - \"UserPoolTaggingException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\"shape\":\"MessageType\"}\ - },\ - \"documentation\":\"

This exception is thrown when a user pool tag cannot be set or updated.

\",\ - \"exception\":true\ - },\ - \"UserPoolTagsType\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"StringType\"},\ - \"value\":{\"shape\":\"StringType\"}\ - },\ - \"UserPoolType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Id\":{\ - \"shape\":\"UserPoolIdType\",\ - \"documentation\":\"

The ID of the user pool.

\"\ - },\ - \"Name\":{\ - \"shape\":\"UserPoolNameType\",\ - \"documentation\":\"

The name of the user pool.

\"\ - },\ - \"Policies\":{\ - \"shape\":\"UserPoolPolicyType\",\ - \"documentation\":\"

The policies associated with the user pool.

\"\ - },\ - \"LambdaConfig\":{\ - \"shape\":\"LambdaConfigType\",\ - \"documentation\":\"

The AWS Lambda triggers associated with the user pool.

\"\ - },\ - \"Status\":{\ - \"shape\":\"StatusType\",\ - \"documentation\":\"

The status of a user pool.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user pool was last modified.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date the user pool was created.

\"\ - },\ - \"SchemaAttributes\":{\ - \"shape\":\"SchemaAttributesListType\",\ - \"documentation\":\"

A container with the schema attributes of a user pool.

\"\ - },\ - \"AutoVerifiedAttributes\":{\ - \"shape\":\"VerifiedAttributesListType\",\ - \"documentation\":\"

Specifies the attributes that are auto-verified in a user pool.

\"\ - },\ - \"AliasAttributes\":{\ - \"shape\":\"AliasAttributesListType\",\ - \"documentation\":\"

Specifies the attributes that are aliased in a user pool.

\"\ - },\ - \"UsernameAttributes\":{\ - \"shape\":\"UsernameAttributesListType\",\ - \"documentation\":\"

Specifies whether email addresses or phone numbers can be specified as usernames when a user signs up.

\"\ - },\ - \"SmsVerificationMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

The contents of the SMS verification message.

\"\ - },\ - \"EmailVerificationMessage\":{\ - \"shape\":\"EmailVerificationMessageType\",\ - \"documentation\":\"

The contents of the email verification message.

\"\ - },\ - \"EmailVerificationSubject\":{\ - \"shape\":\"EmailVerificationSubjectType\",\ - \"documentation\":\"

The subject of the email verification message.

\"\ - },\ - \"VerificationMessageTemplate\":{\ - \"shape\":\"VerificationMessageTemplateType\",\ - \"documentation\":\"

The template for verification messages.

\"\ - },\ - \"SmsAuthenticationMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

The contents of the SMS authentication message.

\"\ - },\ - \"MfaConfiguration\":{\ - \"shape\":\"UserPoolMfaType\",\ - \"documentation\":\"

Can be one of the following values:

  • OFF - MFA tokens are not required and cannot be specified during user registration.

  • ON - MFA tokens are required for all user registrations. You can only specify required when you are initially creating a user pool.

  • OPTIONAL - Users have the option when registering to create an MFA token.

\"\ - },\ - \"DeviceConfiguration\":{\ - \"shape\":\"DeviceConfigurationType\",\ - \"documentation\":\"

The device configuration.

\"\ - },\ - \"EstimatedNumberOfUsers\":{\ - \"shape\":\"IntegerType\",\ - \"documentation\":\"

A number estimating the size of the user pool.

\"\ - },\ - \"EmailConfiguration\":{\ - \"shape\":\"EmailConfigurationType\",\ - \"documentation\":\"

The email configuration.

\"\ - },\ - \"SmsConfiguration\":{\ - \"shape\":\"SmsConfigurationType\",\ - \"documentation\":\"

The SMS configuration.

\"\ - },\ - \"UserPoolTags\":{\ - \"shape\":\"UserPoolTagsType\",\ - \"documentation\":\"

The cost allocation tags for the user pool. For more information, see Adding Cost Allocation Tags to Your User Pool

\"\ - },\ - \"SmsConfigurationFailure\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The reason why the SMS configuration cannot send the messages to your users.

\"\ - },\ - \"EmailConfigurationFailure\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The reason why the email configuration cannot send the messages to your users.

\"\ - },\ - \"Domain\":{\ - \"shape\":\"DomainType\",\ - \"documentation\":\"

Holds the domain prefix if the user pool has a domain associated with it.

\"\ - },\ - \"CustomDomain\":{\"shape\":\"DomainType\"},\ - \"AdminCreateUserConfig\":{\ - \"shape\":\"AdminCreateUserConfigType\",\ - \"documentation\":\"

The configuration for AdminCreateUser requests.

\"\ - },\ - \"UserPoolAddOns\":{\ - \"shape\":\"UserPoolAddOnsType\",\ - \"documentation\":\"

The user pool add-ons.

\"\ - },\ - \"Arn\":{\ - \"shape\":\"ArnType\",\ - \"documentation\":\"

The Amazon Resource Name (ARN) for the user pool.

\"\ - }\ - },\ - \"documentation\":\"

A container for information about the user pool.

\"\ - },\ - \"UserStatusType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"UNCONFIRMED\",\ - \"CONFIRMED\",\ - \"ARCHIVED\",\ - \"COMPROMISED\",\ - \"UNKNOWN\",\ - \"RESET_REQUIRED\",\ - \"FORCE_CHANGE_PASSWORD\"\ - ]\ - },\ - \"UserType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Username\":{\ - \"shape\":\"UsernameType\",\ - \"documentation\":\"

The user name of the user you wish to describe.

\"\ - },\ - \"Attributes\":{\ - \"shape\":\"AttributeListType\",\ - \"documentation\":\"

A container with information about the user type attributes.

\"\ - },\ - \"UserCreateDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The creation date of the user.

\"\ - },\ - \"UserLastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The last modified date of the user.

\"\ - },\ - \"Enabled\":{\ - \"shape\":\"BooleanType\",\ - \"documentation\":\"

Specifies whether the user is enabled.

\"\ - },\ - \"UserStatus\":{\ - \"shape\":\"UserStatusType\",\ - \"documentation\":\"

The user status. Can be one of the following:

  • UNCONFIRMED - User has been created but not confirmed.

  • CONFIRMED - User has been confirmed.

  • ARCHIVED - User is no longer active.

  • COMPROMISED - User is disabled due to a potential security threat.

  • UNKNOWN - User status is not known.

\"\ - },\ - \"MFAOptions\":{\ - \"shape\":\"MFAOptionListType\",\ - \"documentation\":\"

The MFA options for the user.

\"\ - }\ - },\ - \"documentation\":\"

The user type.

\"\ - },\ - \"UsernameAttributeType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"phone_number\",\ - \"email\"\ - ]\ - },\ - \"UsernameAttributesListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"UsernameAttributeType\"}\ - },\ - \"UsernameExistsException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"MessageType\",\ - \"documentation\":\"

The message returned when Amazon Cognito throws a user name exists exception.

\"\ - }\ - },\ - \"documentation\":\"

This exception is thrown when Amazon Cognito encounters a user name that already exists in the user pool.

\",\ - \"exception\":true\ - },\ - \"UsernameType\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\",\ - \"sensitive\":true\ - },\ - \"UsersListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"UserType\"}\ - },\ - \"VerificationMessageTemplateType\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"SmsMessage\":{\ - \"shape\":\"SmsVerificationMessageType\",\ - \"documentation\":\"

The SMS message template.

\"\ - },\ - \"EmailMessage\":{\ - \"shape\":\"EmailVerificationMessageType\",\ - \"documentation\":\"

The email message template.

\"\ - },\ - \"EmailSubject\":{\ - \"shape\":\"EmailVerificationSubjectType\",\ - \"documentation\":\"

The subject line for the email message template.

\"\ - },\ - \"EmailMessageByLink\":{\ - \"shape\":\"EmailVerificationMessageByLinkType\",\ - \"documentation\":\"

The email message template for sending a confirmation link to the user.

\"\ - },\ - \"EmailSubjectByLink\":{\ - \"shape\":\"EmailVerificationSubjectByLinkType\",\ - \"documentation\":\"

The subject line for the email message template for sending a confirmation link to the user.

\"\ - },\ - \"DefaultEmailOption\":{\ - \"shape\":\"DefaultEmailOptionType\",\ - \"documentation\":\"

The default email option.

\"\ - }\ - },\ - \"documentation\":\"

The template for verification messages.

\"\ - },\ - \"VerifiedAttributeType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"phone_number\",\ - \"email\"\ - ]\ - },\ - \"VerifiedAttributesListType\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"VerifiedAttributeType\"}\ - },\ - \"VerifySoftwareTokenRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\"UserCode\"],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

The access token.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service.

\"\ - },\ - \"UserCode\":{\ - \"shape\":\"SoftwareTokenMFAUserCodeType\",\ - \"documentation\":\"

The one time password computed using the secret code returned by

\"\ - },\ - \"FriendlyDeviceName\":{\ - \"shape\":\"StringType\",\ - \"documentation\":\"

The friendly device name.

\"\ - }\ - }\ - },\ - \"VerifySoftwareTokenResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"Status\":{\ - \"shape\":\"VerifySoftwareTokenResponseType\",\ - \"documentation\":\"

The status of the verify software token.

\"\ - },\ - \"Session\":{\ - \"shape\":\"SessionType\",\ - \"documentation\":\"

The session which should be passed both ways in challenge-response calls to the service.

\"\ - }\ - }\ - },\ - \"VerifySoftwareTokenResponseType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"SUCCESS\",\ - \"ERROR\"\ - ]\ - },\ - \"VerifyUserAttributeRequest\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"AccessToken\",\ - \"AttributeName\",\ - \"Code\"\ - ],\ - \"members\":{\ - \"AccessToken\":{\ - \"shape\":\"TokenModelType\",\ - \"documentation\":\"

Represents the access token of the request to verify user attributes.

\"\ - },\ - \"AttributeName\":{\ - \"shape\":\"AttributeNameType\",\ - \"documentation\":\"

The attribute name in the request to verify user attributes.

\"\ - },\ - \"Code\":{\ - \"shape\":\"ConfirmationCodeType\",\ - \"documentation\":\"

The verification code in the request to verify user attributes.

\"\ - }\ - },\ - \"documentation\":\"

Represents the request to verify user attributes.

\"\ - },\ - \"VerifyUserAttributeResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - },\ - \"documentation\":\"

A container representing the response from the server from the request to verify user attributes.

\"\ - }\ - },\ - \"documentation\":\"

Using the Amazon Cognito User Pools API, you can create a user pool to manage directories and users. You can authenticate a user to obtain tokens related to user identity and access policies.

This API reference provides information about user pools in Amazon Cognito User Pools.

For more information, see the Amazon Cognito Documentation.

\"\ -}\ -"; -} - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderService.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderService.h deleted file mode 100644 index a7258f6..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderService.h +++ /dev/null @@ -1,2546 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import -#import "AWSCognitoIdentityProviderModel.h" -#import "AWSCognitoIdentityProviderResources.h" - -NS_ASSUME_NONNULL_BEGIN - -//! SDK version for AWSCognitoIdentityProvider -FOUNDATION_EXPORT NSString *const AWSCognitoIdentityProviderSDKVersion; - -/** -

Using the Amazon Cognito User Pools API, you can create a user pool to manage directories and users. You can authenticate a user to obtain tokens related to user identity and access policies.

This API reference provides information about user pools in Amazon Cognito User Pools.

For more information, see the Amazon Cognito Documentation.

- */ -@interface AWSCognitoIdentityProvider : AWSService - -/** - The service configuration used to instantiate this service client. - - @warning Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors. - */ -@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration; - -/** - Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually. - - For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:` - - *Swift* - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") - let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider) - AWSServiceManager.default().defaultServiceConfiguration = configuration - - return true - } - - *Objective-C* - - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 - identityPoolId:@"YourIdentityPoolId"]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 - credentialsProvider:credentialsProvider]; - [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration; - - return YES; - } - - Then call the following to get the default service client: - - *Swift* - - let CognitoIdentityProvider = AWSCognitoIdentityProvider.default() - - *Objective-C* - - AWSCognitoIdentityProvider *CognitoIdentityProvider = [AWSCognitoIdentityProvider defaultCognitoIdentityProvider]; - - @return The default service client. - */ -+ (instancetype)defaultCognitoIdentityProvider; - -/** - Creates a service client with the given service configuration and registers it for the key. - - For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:` - - *Swift* - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") - let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) - AWSCognitoIdentityProvider.register(with: configuration!, forKey: "USWest2CognitoIdentityProvider") - - return true - } - - *Objective-C* - - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 - identityPoolId:@"YourIdentityPoolId"]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 - credentialsProvider:credentialsProvider]; - - [AWSCognitoIdentityProvider registerCognitoIdentityProviderWithConfiguration:configuration forKey:@"USWest2CognitoIdentityProvider"]; - - return YES; - } - - Then call the following to get the service client: - - *Swift* - - let CognitoIdentityProvider = AWSCognitoIdentityProvider(forKey: "USWest2CognitoIdentityProvider") - - *Objective-C* - - AWSCognitoIdentityProvider *CognitoIdentityProvider = [AWSCognitoIdentityProvider CognitoIdentityProviderForKey:@"USWest2CognitoIdentityProvider"]; - - @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors. - - @param configuration A service configuration object. - @param key A string to identify the service client. - */ -+ (void)registerCognitoIdentityProviderWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key; - -/** - Retrieves the service client associated with the key. You need to call `+ registerCognitoIdentityProviderWithConfiguration:forKey:` before invoking this method. - - For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:` - - *Swift* - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") - let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) - AWSCognitoIdentityProvider.register(with: configuration!, forKey: "USWest2CognitoIdentityProvider") - - return true - } - - *Objective-C* - - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 - identityPoolId:@"YourIdentityPoolId"]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 - credentialsProvider:credentialsProvider]; - - [AWSCognitoIdentityProvider registerCognitoIdentityProviderWithConfiguration:configuration forKey:@"USWest2CognitoIdentityProvider"]; - - return YES; - } - - Then call the following to get the service client: - - *Swift* - - let CognitoIdentityProvider = AWSCognitoIdentityProvider(forKey: "USWest2CognitoIdentityProvider") - - *Objective-C* - - AWSCognitoIdentityProvider *CognitoIdentityProvider = [AWSCognitoIdentityProvider CognitoIdentityProviderForKey:@"USWest2CognitoIdentityProvider"]; - - @param key A string to identify the service client. - - @return An instance of the service client. - */ -+ (instancetype)CognitoIdentityProviderForKey:(NSString *)key; - -/** - Removes the service client associated with the key and release it. - - @warning Before calling this method, make sure no method is running on this client. - - @param key A string to identify the service client. - */ -+ (void)removeCognitoIdentityProviderForKey:(NSString *)key; - -/** -

Adds additional user attributes to the user pool schema.

- - @param request A container for the necessary parameters to execute the AddCustomAttributes service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAddCustomAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserImportInProgress`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAddCustomAttributesRequest - @see AWSCognitoIdentityProviderAddCustomAttributesResponse - */ -- (AWSTask *)addCustomAttributes:(AWSCognitoIdentityProviderAddCustomAttributesRequest *)request; - -/** -

Adds additional user attributes to the user pool schema.

- - @param request A container for the necessary parameters to execute the AddCustomAttributes service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserImportInProgress`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAddCustomAttributesRequest - @see AWSCognitoIdentityProviderAddCustomAttributesResponse - */ -- (void)addCustomAttributes:(AWSCognitoIdentityProviderAddCustomAttributesRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAddCustomAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Adds the specified user to the specified group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminAddUserToGroup service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminAddUserToGroupRequest - */ -- (AWSTask *)adminAddUserToGroup:(AWSCognitoIdentityProviderAdminAddUserToGroupRequest *)request; - -/** -

Adds the specified user to the specified group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminAddUserToGroup service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminAddUserToGroupRequest - */ -- (void)adminAddUserToGroup:(AWSCognitoIdentityProviderAdminAddUserToGroupRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Confirms user registration as an admin without using a confirmation code. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminConfirmSignUp service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminConfirmSignUpResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyFailedAttempts`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminConfirmSignUpRequest - @see AWSCognitoIdentityProviderAdminConfirmSignUpResponse - */ -- (AWSTask *)adminConfirmSignUp:(AWSCognitoIdentityProviderAdminConfirmSignUpRequest *)request; - -/** -

Confirms user registration as an admin without using a confirmation code. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminConfirmSignUp service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyFailedAttempts`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminConfirmSignUpRequest - @see AWSCognitoIdentityProviderAdminConfirmSignUpResponse - */ -- (void)adminConfirmSignUp:(AWSCognitoIdentityProviderAdminConfirmSignUpRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminConfirmSignUpResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates a new user in the specified user pool.

If MessageAction is not set, the default is to send a welcome message via email or phone (SMS).

This message is based on a template that you configured in your call to or . This template includes your custom sign-up instructions and placeholders for user name and temporary password.

Alternatively, you can call AdminCreateUser with “SUPPRESS” for the MessageAction parameter, and Amazon Cognito will not send any email.

In either case, the user will be in the FORCE_CHANGE_PASSWORD state until they sign in and change their password.

AdminCreateUser requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminCreateUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminCreateUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUsernameExists`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUnsupportedUserState`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminCreateUserRequest - @see AWSCognitoIdentityProviderAdminCreateUserResponse - */ -- (AWSTask *)adminCreateUser:(AWSCognitoIdentityProviderAdminCreateUserRequest *)request; - -/** -

Creates a new user in the specified user pool.

If MessageAction is not set, the default is to send a welcome message via email or phone (SMS).

This message is based on a template that you configured in your call to or . This template includes your custom sign-up instructions and placeholders for user name and temporary password.

Alternatively, you can call AdminCreateUser with “SUPPRESS” for the MessageAction parameter, and Amazon Cognito will not send any email.

In either case, the user will be in the FORCE_CHANGE_PASSWORD state until they sign in and change their password.

AdminCreateUser requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminCreateUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUsernameExists`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUnsupportedUserState`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminCreateUserRequest - @see AWSCognitoIdentityProviderAdminCreateUserResponse - */ -- (void)adminCreateUser:(AWSCognitoIdentityProviderAdminCreateUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminCreateUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Deletes a user as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminDeleteUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDeleteUserRequest - */ -- (AWSTask *)adminDeleteUser:(AWSCognitoIdentityProviderAdminDeleteUserRequest *)request; - -/** -

Deletes a user as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminDeleteUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDeleteUserRequest - */ -- (void)adminDeleteUser:(AWSCognitoIdentityProviderAdminDeleteUserRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Deletes the user attributes in a user pool as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminDeleteUserAttributes service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest - @see AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse - */ -- (AWSTask *)adminDeleteUserAttributes:(AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest *)request; - -/** -

Deletes the user attributes in a user pool as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminDeleteUserAttributes service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest - @see AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse - */ -- (void)adminDeleteUserAttributes:(AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Disables the user from signing in with the specified external (SAML or social) identity provider. If the user to disable is a Cognito User Pools native username + password user, they are not permitted to use their password to sign-in. If the user to disable is a linked external IdP user, any link between that user and an existing user is removed. The next time the external user (no longer attached to the previously linked DestinationUser) signs in, they must create a new user account. See .

This action is enabled only for admin access and requires developer credentials.

The ProviderName must match the value specified when creating an IdP for the pool.

To disable a native username + password user, the ProviderName value must be Cognito and the ProviderAttributeName must be Cognito_Subject, with the ProviderAttributeValue being the name that is used in the user pool for the user.

The ProviderAttributeName must always be Cognito_Subject for social identity providers. The ProviderAttributeValue must always be the exact subject that was used when the user was originally linked as a source user.

For de-linking a SAML identity, there are two scenarios. If the linked identity has not yet been used to sign-in, the ProviderAttributeName and ProviderAttributeValue must be the same values that were used for the SourceUser when the identities were originally linked in the call. (If the linking was done with ProviderAttributeName set to Cognito_Subject, the same applies here). However, if the user has already signed in, the ProviderAttributeName must be Cognito_Subject and ProviderAttributeValue must be the subject of the SAML assertion.

- - @param request A container for the necessary parameters to execute the AdminDisableProviderForUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminDisableProviderForUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDisableProviderForUserRequest - @see AWSCognitoIdentityProviderAdminDisableProviderForUserResponse - */ -- (AWSTask *)adminDisableProviderForUser:(AWSCognitoIdentityProviderAdminDisableProviderForUserRequest *)request; - -/** -

Disables the user from signing in with the specified external (SAML or social) identity provider. If the user to disable is a Cognito User Pools native username + password user, they are not permitted to use their password to sign-in. If the user to disable is a linked external IdP user, any link between that user and an existing user is removed. The next time the external user (no longer attached to the previously linked DestinationUser) signs in, they must create a new user account. See .

This action is enabled only for admin access and requires developer credentials.

The ProviderName must match the value specified when creating an IdP for the pool.

To disable a native username + password user, the ProviderName value must be Cognito and the ProviderAttributeName must be Cognito_Subject, with the ProviderAttributeValue being the name that is used in the user pool for the user.

The ProviderAttributeName must always be Cognito_Subject for social identity providers. The ProviderAttributeValue must always be the exact subject that was used when the user was originally linked as a source user.

For de-linking a SAML identity, there are two scenarios. If the linked identity has not yet been used to sign-in, the ProviderAttributeName and ProviderAttributeValue must be the same values that were used for the SourceUser when the identities were originally linked in the call. (If the linking was done with ProviderAttributeName set to Cognito_Subject, the same applies here). However, if the user has already signed in, the ProviderAttributeName must be Cognito_Subject and ProviderAttributeValue must be the subject of the SAML assertion.

- - @param request A container for the necessary parameters to execute the AdminDisableProviderForUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDisableProviderForUserRequest - @see AWSCognitoIdentityProviderAdminDisableProviderForUserResponse - */ -- (void)adminDisableProviderForUser:(AWSCognitoIdentityProviderAdminDisableProviderForUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminDisableProviderForUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Disables the specified user as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminDisableUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminDisableUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDisableUserRequest - @see AWSCognitoIdentityProviderAdminDisableUserResponse - */ -- (AWSTask *)adminDisableUser:(AWSCognitoIdentityProviderAdminDisableUserRequest *)request; - -/** -

Disables the specified user as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminDisableUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminDisableUserRequest - @see AWSCognitoIdentityProviderAdminDisableUserResponse - */ -- (void)adminDisableUser:(AWSCognitoIdentityProviderAdminDisableUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminDisableUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Enables the specified user as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminEnableUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminEnableUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminEnableUserRequest - @see AWSCognitoIdentityProviderAdminEnableUserResponse - */ -- (AWSTask *)adminEnableUser:(AWSCognitoIdentityProviderAdminEnableUserRequest *)request; - -/** -

Enables the specified user as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminEnableUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminEnableUserRequest - @see AWSCognitoIdentityProviderAdminEnableUserResponse - */ -- (void)adminEnableUser:(AWSCognitoIdentityProviderAdminEnableUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminEnableUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Forgets the device, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminForgetDevice service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminForgetDeviceRequest - */ -- (AWSTask *)adminForgetDevice:(AWSCognitoIdentityProviderAdminForgetDeviceRequest *)request; - -/** -

Forgets the device, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminForgetDevice service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminForgetDeviceRequest - */ -- (void)adminForgetDevice:(AWSCognitoIdentityProviderAdminForgetDeviceRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Gets the device, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminGetDevice service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminGetDeviceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderAdminGetDeviceRequest - @see AWSCognitoIdentityProviderAdminGetDeviceResponse - */ -- (AWSTask *)adminGetDevice:(AWSCognitoIdentityProviderAdminGetDeviceRequest *)request; - -/** -

Gets the device, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminGetDevice service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderAdminGetDeviceRequest - @see AWSCognitoIdentityProviderAdminGetDeviceResponse - */ -- (void)adminGetDevice:(AWSCognitoIdentityProviderAdminGetDeviceRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminGetDeviceResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the specified user by user name in a user pool as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminGetUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminGetUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminGetUserRequest - @see AWSCognitoIdentityProviderAdminGetUserResponse - */ -- (AWSTask *)adminGetUser:(AWSCognitoIdentityProviderAdminGetUserRequest *)request; - -/** -

Gets the specified user by user name in a user pool as an administrator. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminGetUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminGetUserRequest - @see AWSCognitoIdentityProviderAdminGetUserResponse - */ -- (void)adminGetUser:(AWSCognitoIdentityProviderAdminGetUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminGetUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Initiates the authentication flow, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminInitiateAuth service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminInitiateAuthResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorMFAMethodNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`. - - @see AWSCognitoIdentityProviderAdminInitiateAuthRequest - @see AWSCognitoIdentityProviderAdminInitiateAuthResponse - */ -- (AWSTask *)adminInitiateAuth:(AWSCognitoIdentityProviderAdminInitiateAuthRequest *)request; - -/** -

Initiates the authentication flow, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminInitiateAuth service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorMFAMethodNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`. - - @see AWSCognitoIdentityProviderAdminInitiateAuthRequest - @see AWSCognitoIdentityProviderAdminInitiateAuthResponse - */ -- (void)adminInitiateAuth:(AWSCognitoIdentityProviderAdminInitiateAuthRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminInitiateAuthResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Links an existing user account in a user pool (DestinationUser) to an identity from an external identity provider (SourceUser) based on a specified attribute name and value from the external identity provider. This allows you to create a link from the existing user account to an external federated user identity that has not yet been used to sign in, so that the federated user identity can be used to sign in as the existing user account.

For example, if there is an existing user with a username and password, this API links that user to a federated user identity, so that when the federated user identity is used, the user signs in as the existing user account.

Because this API allows a user with an external federated identity to sign in as an existing user in the user pool, it is critical that it only be used with external identity providers and provider attributes that have been trusted by the application owner.

See also .

This action is enabled only for admin access and requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminLinkProviderForUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminLinkProviderForUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminLinkProviderForUserRequest - @see AWSCognitoIdentityProviderAdminLinkProviderForUserResponse - */ -- (AWSTask *)adminLinkProviderForUser:(AWSCognitoIdentityProviderAdminLinkProviderForUserRequest *)request; - -/** -

Links an existing user account in a user pool (DestinationUser) to an identity from an external identity provider (SourceUser) based on a specified attribute name and value from the external identity provider. This allows you to create a link from the existing user account to an external federated user identity that has not yet been used to sign in, so that the federated user identity can be used to sign in as the existing user account.

For example, if there is an existing user with a username and password, this API links that user to a federated user identity, so that when the federated user identity is used, the user signs in as the existing user account.

Because this API allows a user with an external federated identity to sign in as an existing user in the user pool, it is critical that it only be used with external identity providers and provider attributes that have been trusted by the application owner.

See also .

This action is enabled only for admin access and requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminLinkProviderForUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminLinkProviderForUserRequest - @see AWSCognitoIdentityProviderAdminLinkProviderForUserResponse - */ -- (void)adminLinkProviderForUser:(AWSCognitoIdentityProviderAdminLinkProviderForUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminLinkProviderForUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists devices, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminListDevices service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminListDevicesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderAdminListDevicesRequest - @see AWSCognitoIdentityProviderAdminListDevicesResponse - */ -- (AWSTask *)adminListDevices:(AWSCognitoIdentityProviderAdminListDevicesRequest *)request; - -/** -

Lists devices, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminListDevices service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderAdminListDevicesRequest - @see AWSCognitoIdentityProviderAdminListDevicesResponse - */ -- (void)adminListDevices:(AWSCognitoIdentityProviderAdminListDevicesRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminListDevicesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the groups that the user belongs to.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminListGroupsForUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminListGroupsForUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminListGroupsForUserRequest - @see AWSCognitoIdentityProviderAdminListGroupsForUserResponse - */ -- (AWSTask *)adminListGroupsForUser:(AWSCognitoIdentityProviderAdminListGroupsForUserRequest *)request; - -/** -

Lists the groups that the user belongs to.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminListGroupsForUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminListGroupsForUserRequest - @see AWSCognitoIdentityProviderAdminListGroupsForUserResponse - */ -- (void)adminListGroupsForUser:(AWSCognitoIdentityProviderAdminListGroupsForUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminListGroupsForUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists a history of user activity and any risks detected as part of Amazon Cognito advanced security.

- - @param request A container for the necessary parameters to execute the AdminListUserAuthEvents service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminListUserAuthEventsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminListUserAuthEventsRequest - @see AWSCognitoIdentityProviderAdminListUserAuthEventsResponse - */ -- (AWSTask *)adminListUserAuthEvents:(AWSCognitoIdentityProviderAdminListUserAuthEventsRequest *)request; - -/** -

Lists a history of user activity and any risks detected as part of Amazon Cognito advanced security.

- - @param request A container for the necessary parameters to execute the AdminListUserAuthEvents service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminListUserAuthEventsRequest - @see AWSCognitoIdentityProviderAdminListUserAuthEventsResponse - */ -- (void)adminListUserAuthEvents:(AWSCognitoIdentityProviderAdminListUserAuthEventsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminListUserAuthEventsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Removes the specified user from the specified group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminRemoveUserFromGroup service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest - */ -- (AWSTask *)adminRemoveUserFromGroup:(AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest *)request; - -/** -

Removes the specified user from the specified group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminRemoveUserFromGroup service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest - */ -- (void)adminRemoveUserFromGroup:(AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Resets the specified user's password in a user pool as an administrator. Works on any user.

When a developer calls this API, the current password is invalidated, so it must be changed. If a user tries to sign in after the API is called, the app will get a PasswordResetRequiredException exception back and should direct the user down the flow to reset the password, which is the same as the forgot password flow. In addition, if the user pool has phone verification selected and a verified phone number exists for the user, or if email verification is selected and a verified email exists for the user, calling this API will also result in sending a message to the end user with the code to change their password.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminResetUserPassword service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminResetUserPasswordResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminResetUserPasswordRequest - @see AWSCognitoIdentityProviderAdminResetUserPasswordResponse - */ -- (AWSTask *)adminResetUserPassword:(AWSCognitoIdentityProviderAdminResetUserPasswordRequest *)request; - -/** -

Resets the specified user's password in a user pool as an administrator. Works on any user.

When a developer calls this API, the current password is invalidated, so it must be changed. If a user tries to sign in after the API is called, the app will get a PasswordResetRequiredException exception back and should direct the user down the flow to reset the password, which is the same as the forgot password flow. In addition, if the user pool has phone verification selected and a verified phone number exists for the user, or if email verification is selected and a verified email exists for the user, calling this API will also result in sending a message to the end user with the code to change their password.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminResetUserPassword service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminResetUserPasswordRequest - @see AWSCognitoIdentityProviderAdminResetUserPasswordResponse - */ -- (void)adminResetUserPassword:(AWSCognitoIdentityProviderAdminResetUserPasswordRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminResetUserPasswordResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Responds to an authentication challenge, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminRespondToAuthChallenge service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorMFAMethodNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`. - - @see AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest - @see AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse - */ -- (AWSTask *)adminRespondToAuthChallenge:(AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest *)request; - -/** -

Responds to an authentication challenge, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminRespondToAuthChallenge service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorMFAMethodNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`. - - @see AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest - @see AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse - */ -- (void)adminRespondToAuthChallenge:(AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Sets the user's multi-factor authentication (MFA) preference.

- - @param request A container for the necessary parameters to execute the AdminSetUserMFAPreference service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest - @see AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse - */ -- (AWSTask *)adminSetUserMFAPreference:(AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest *)request; - -/** -

Sets the user's multi-factor authentication (MFA) preference.

- - @param request A container for the necessary parameters to execute the AdminSetUserMFAPreference service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest - @see AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse - */ -- (void)adminSetUserMFAPreference:(AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Sets all the user settings for a specified user name. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminSetUserSettings service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminSetUserSettingsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminSetUserSettingsRequest - @see AWSCognitoIdentityProviderAdminSetUserSettingsResponse - */ -- (AWSTask *)adminSetUserSettings:(AWSCognitoIdentityProviderAdminSetUserSettingsRequest *)request; - -/** -

Sets all the user settings for a specified user name. Works on any user.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminSetUserSettings service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminSetUserSettingsRequest - @see AWSCognitoIdentityProviderAdminSetUserSettingsResponse - */ -- (void)adminSetUserSettings:(AWSCognitoIdentityProviderAdminSetUserSettingsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminSetUserSettingsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Provides feedback for an authentication event as to whether it was from a valid user. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

- - @param request A container for the necessary parameters to execute the AdminUpdateAuthEventFeedback service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest - @see AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse - */ -- (AWSTask *)adminUpdateAuthEventFeedback:(AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest *)request; - -/** -

Provides feedback for an authentication event as to whether it was from a valid user. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

- - @param request A container for the necessary parameters to execute the AdminUpdateAuthEventFeedback service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest - @see AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse - */ -- (void)adminUpdateAuthEventFeedback:(AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the device status as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminUpdateDeviceStatus service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest - @see AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse - */ -- (AWSTask *)adminUpdateDeviceStatus:(AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest *)request; - -/** -

Updates the device status as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminUpdateDeviceStatus service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest - @see AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse - */ -- (void)adminUpdateDeviceStatus:(AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the specified user's attributes, including developer attributes, as an administrator. Works on any user.

For custom attributes, you must prepend the custom: prefix to the attribute name.

In addition to updating user attributes, this API can also be used to mark phone and email as verified.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminUpdateUserAttributes service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest - @see AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse - */ -- (AWSTask *)adminUpdateUserAttributes:(AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest *)request; - -/** -

Updates the specified user's attributes, including developer attributes, as an administrator. Works on any user.

For custom attributes, you must prepend the custom: prefix to the attribute name.

In addition to updating user attributes, this API can also be used to mark phone and email as verified.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminUpdateUserAttributes service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest - @see AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse - */ -- (void)adminUpdateUserAttributes:(AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Signs out users from all devices, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminUserGlobalSignOut service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest - @see AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse - */ -- (AWSTask *)adminUserGlobalSignOut:(AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest *)request; - -/** -

Signs out users from all devices, as an administrator.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the AdminUserGlobalSignOut service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest - @see AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse - */ -- (void)adminUserGlobalSignOut:(AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Returns a unique generated shared secret key code for the user account. The request takes an access token or a session string, but not both.

- - @param request A container for the necessary parameters to execute the AssociateSoftwareToken service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderAssociateSoftwareTokenResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`. - - @see AWSCognitoIdentityProviderAssociateSoftwareTokenRequest - @see AWSCognitoIdentityProviderAssociateSoftwareTokenResponse - */ -- (AWSTask *)associateSoftwareToken:(AWSCognitoIdentityProviderAssociateSoftwareTokenRequest *)request; - -/** -

Returns a unique generated shared secret key code for the user account. The request takes an access token or a session string, but not both.

- - @param request A container for the necessary parameters to execute the AssociateSoftwareToken service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`. - - @see AWSCognitoIdentityProviderAssociateSoftwareTokenRequest - @see AWSCognitoIdentityProviderAssociateSoftwareTokenResponse - */ -- (void)associateSoftwareToken:(AWSCognitoIdentityProviderAssociateSoftwareTokenRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderAssociateSoftwareTokenResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Changes the password for a specified user in a user pool.

- - @param request A container for the necessary parameters to execute the ChangePassword service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderChangePasswordResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderChangePasswordRequest - @see AWSCognitoIdentityProviderChangePasswordResponse - */ -- (AWSTask *)changePassword:(AWSCognitoIdentityProviderChangePasswordRequest *)request; - -/** -

Changes the password for a specified user in a user pool.

- - @param request A container for the necessary parameters to execute the ChangePassword service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderChangePasswordRequest - @see AWSCognitoIdentityProviderChangePasswordResponse - */ -- (void)changePassword:(AWSCognitoIdentityProviderChangePasswordRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderChangePasswordResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Confirms tracking of the device. This API call is the call that begins device tracking.

- - @param request A container for the necessary parameters to execute the ConfirmDevice service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderConfirmDeviceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorUsernameExists`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderConfirmDeviceRequest - @see AWSCognitoIdentityProviderConfirmDeviceResponse - */ -- (AWSTask *)confirmDevice:(AWSCognitoIdentityProviderConfirmDeviceRequest *)request; - -/** -

Confirms tracking of the device. This API call is the call that begins device tracking.

- - @param request A container for the necessary parameters to execute the ConfirmDevice service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorUsernameExists`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderConfirmDeviceRequest - @see AWSCognitoIdentityProviderConfirmDeviceResponse - */ -- (void)confirmDevice:(AWSCognitoIdentityProviderConfirmDeviceRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderConfirmDeviceResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Allows a user to enter a confirmation code to reset a forgotten password.

- - @param request A container for the necessary parameters to execute the ConfirmForgotPassword service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderConfirmForgotPasswordResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorTooManyFailedAttempts`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderConfirmForgotPasswordRequest - @see AWSCognitoIdentityProviderConfirmForgotPasswordResponse - */ -- (AWSTask *)confirmForgotPassword:(AWSCognitoIdentityProviderConfirmForgotPasswordRequest *)request; - -/** -

Allows a user to enter a confirmation code to reset a forgotten password.

- - @param request A container for the necessary parameters to execute the ConfirmForgotPassword service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorTooManyFailedAttempts`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderConfirmForgotPasswordRequest - @see AWSCognitoIdentityProviderConfirmForgotPasswordResponse - */ -- (void)confirmForgotPassword:(AWSCognitoIdentityProviderConfirmForgotPasswordRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderConfirmForgotPasswordResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Confirms registration of a user and handles the existing alias from a previous user.

- - @param request A container for the necessary parameters to execute the ConfirmSignUp service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderConfirmSignUpResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyFailedAttempts`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderConfirmSignUpRequest - @see AWSCognitoIdentityProviderConfirmSignUpResponse - */ -- (AWSTask *)confirmSignUp:(AWSCognitoIdentityProviderConfirmSignUpRequest *)request; - -/** -

Confirms registration of a user and handles the existing alias from a previous user.

- - @param request A container for the necessary parameters to execute the ConfirmSignUp service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyFailedAttempts`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderConfirmSignUpRequest - @see AWSCognitoIdentityProviderConfirmSignUpResponse - */ -- (void)confirmSignUp:(AWSCognitoIdentityProviderConfirmSignUpRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderConfirmSignUpResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates a new group in the specified user pool.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the CreateGroup service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderCreateGroupResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorGroupExists`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateGroupRequest - @see AWSCognitoIdentityProviderCreateGroupResponse - */ -- (AWSTask *)createGroup:(AWSCognitoIdentityProviderCreateGroupRequest *)request; - -/** -

Creates a new group in the specified user pool.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the CreateGroup service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorGroupExists`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateGroupRequest - @see AWSCognitoIdentityProviderCreateGroupResponse - */ -- (void)createGroup:(AWSCognitoIdentityProviderCreateGroupRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderCreateGroupResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates an identity provider for a user pool.

- - @param request A container for the necessary parameters to execute the CreateIdentityProvider service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderCreateIdentityProviderResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorDuplicateProvider`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateIdentityProviderRequest - @see AWSCognitoIdentityProviderCreateIdentityProviderResponse - */ -- (AWSTask *)createIdentityProvider:(AWSCognitoIdentityProviderCreateIdentityProviderRequest *)request; - -/** -

Creates an identity provider for a user pool.

- - @param request A container for the necessary parameters to execute the CreateIdentityProvider service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorDuplicateProvider`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateIdentityProviderRequest - @see AWSCognitoIdentityProviderCreateIdentityProviderResponse - */ -- (void)createIdentityProvider:(AWSCognitoIdentityProviderCreateIdentityProviderRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderCreateIdentityProviderResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates a new OAuth2.0 resource server and defines custom scopes in it.

- - @param request A container for the necessary parameters to execute the CreateResourceServer service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderCreateResourceServerResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateResourceServerRequest - @see AWSCognitoIdentityProviderCreateResourceServerResponse - */ -- (AWSTask *)createResourceServer:(AWSCognitoIdentityProviderCreateResourceServerRequest *)request; - -/** -

Creates a new OAuth2.0 resource server and defines custom scopes in it.

- - @param request A container for the necessary parameters to execute the CreateResourceServer service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateResourceServerRequest - @see AWSCognitoIdentityProviderCreateResourceServerResponse - */ -- (void)createResourceServer:(AWSCognitoIdentityProviderCreateResourceServerRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderCreateResourceServerResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates the user import job.

- - @param request A container for the necessary parameters to execute the CreateUserImportJob service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderCreateUserImportJobResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserImportJobRequest - @see AWSCognitoIdentityProviderCreateUserImportJobResponse - */ -- (AWSTask *)createUserImportJob:(AWSCognitoIdentityProviderCreateUserImportJobRequest *)request; - -/** -

Creates the user import job.

- - @param request A container for the necessary parameters to execute the CreateUserImportJob service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserImportJobRequest - @see AWSCognitoIdentityProviderCreateUserImportJobResponse - */ -- (void)createUserImportJob:(AWSCognitoIdentityProviderCreateUserImportJobRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderCreateUserImportJobResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

- - @param request A container for the necessary parameters to execute the CreateUserPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderCreateUserPoolResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolTagging`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserPoolRequest - @see AWSCognitoIdentityProviderCreateUserPoolResponse - */ -- (AWSTask *)createUserPool:(AWSCognitoIdentityProviderCreateUserPoolRequest *)request; - -/** -

Creates a new Amazon Cognito user pool and sets the password policy for the pool.

- - @param request A container for the necessary parameters to execute the CreateUserPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolTagging`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserPoolRequest - @see AWSCognitoIdentityProviderCreateUserPoolResponse - */ -- (void)createUserPool:(AWSCognitoIdentityProviderCreateUserPoolRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderCreateUserPoolResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates the user pool client.

- - @param request A container for the necessary parameters to execute the CreateUserPoolClient service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderCreateUserPoolClientResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorScopeDoesNotExist`, `AWSCognitoIdentityProviderErrorInvalidOAuthFlow`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserPoolClientRequest - @see AWSCognitoIdentityProviderCreateUserPoolClientResponse - */ -- (AWSTask *)createUserPoolClient:(AWSCognitoIdentityProviderCreateUserPoolClientRequest *)request; - -/** -

Creates the user pool client.

- - @param request A container for the necessary parameters to execute the CreateUserPoolClient service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorScopeDoesNotExist`, `AWSCognitoIdentityProviderErrorInvalidOAuthFlow`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserPoolClientRequest - @see AWSCognitoIdentityProviderCreateUserPoolClientResponse - */ -- (void)createUserPoolClient:(AWSCognitoIdentityProviderCreateUserPoolClientRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderCreateUserPoolClientResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Creates a new domain for a user pool.

- - @param request A container for the necessary parameters to execute the CreateUserPoolDomain service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderCreateUserPoolDomainResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserPoolDomainRequest - @see AWSCognitoIdentityProviderCreateUserPoolDomainResponse - */ -- (AWSTask *)createUserPoolDomain:(AWSCognitoIdentityProviderCreateUserPoolDomainRequest *)request; - -/** -

Creates a new domain for a user pool.

- - @param request A container for the necessary parameters to execute the CreateUserPoolDomain service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderCreateUserPoolDomainRequest - @see AWSCognitoIdentityProviderCreateUserPoolDomainResponse - */ -- (void)createUserPoolDomain:(AWSCognitoIdentityProviderCreateUserPoolDomainRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderCreateUserPoolDomainResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Deletes a group. Currently only groups with no members can be deleted.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the DeleteGroup service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteGroupRequest - */ -- (AWSTask *)deleteGroup:(AWSCognitoIdentityProviderDeleteGroupRequest *)request; - -/** -

Deletes a group. Currently only groups with no members can be deleted.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the DeleteGroup service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteGroupRequest - */ -- (void)deleteGroup:(AWSCognitoIdentityProviderDeleteGroupRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Deletes an identity provider for a user pool.

- - @param request A container for the necessary parameters to execute the DeleteIdentityProvider service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnsupportedIdentityProvider`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteIdentityProviderRequest - */ -- (AWSTask *)deleteIdentityProvider:(AWSCognitoIdentityProviderDeleteIdentityProviderRequest *)request; - -/** -

Deletes an identity provider for a user pool.

- - @param request A container for the necessary parameters to execute the DeleteIdentityProvider service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnsupportedIdentityProvider`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteIdentityProviderRequest - */ -- (void)deleteIdentityProvider:(AWSCognitoIdentityProviderDeleteIdentityProviderRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Deletes a resource server.

- - @param request A container for the necessary parameters to execute the DeleteResourceServer service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteResourceServerRequest - */ -- (AWSTask *)deleteResourceServer:(AWSCognitoIdentityProviderDeleteResourceServerRequest *)request; - -/** -

Deletes a resource server.

- - @param request A container for the necessary parameters to execute the DeleteResourceServer service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteResourceServerRequest - */ -- (void)deleteResourceServer:(AWSCognitoIdentityProviderDeleteResourceServerRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Allows a user to delete himself or herself.

- - @param request A container for the necessary parameters to execute the DeleteUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserRequest - */ -- (AWSTask *)deleteUser:(AWSCognitoIdentityProviderDeleteUserRequest *)request; - -/** -

Allows a user to delete himself or herself.

- - @param request A container for the necessary parameters to execute the DeleteUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserRequest - */ -- (void)deleteUser:(AWSCognitoIdentityProviderDeleteUserRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Deletes the attributes for a user.

- - @param request A container for the necessary parameters to execute the DeleteUserAttributes service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDeleteUserAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserAttributesRequest - @see AWSCognitoIdentityProviderDeleteUserAttributesResponse - */ -- (AWSTask *)deleteUserAttributes:(AWSCognitoIdentityProviderDeleteUserAttributesRequest *)request; - -/** -

Deletes the attributes for a user.

- - @param request A container for the necessary parameters to execute the DeleteUserAttributes service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserAttributesRequest - @see AWSCognitoIdentityProviderDeleteUserAttributesResponse - */ -- (void)deleteUserAttributes:(AWSCognitoIdentityProviderDeleteUserAttributesRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDeleteUserAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Deletes the specified Amazon Cognito user pool.

- - @param request A container for the necessary parameters to execute the DeleteUserPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserImportInProgress`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserPoolRequest - */ -- (AWSTask *)deleteUserPool:(AWSCognitoIdentityProviderDeleteUserPoolRequest *)request; - -/** -

Deletes the specified Amazon Cognito user pool.

- - @param request A container for the necessary parameters to execute the DeleteUserPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserImportInProgress`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserPoolRequest - */ -- (void)deleteUserPool:(AWSCognitoIdentityProviderDeleteUserPoolRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Allows the developer to delete the user pool client.

- - @param request A container for the necessary parameters to execute the DeleteUserPoolClient service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserPoolClientRequest - */ -- (AWSTask *)deleteUserPoolClient:(AWSCognitoIdentityProviderDeleteUserPoolClientRequest *)request; - -/** -

Allows the developer to delete the user pool client.

- - @param request A container for the necessary parameters to execute the DeleteUserPoolClient service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserPoolClientRequest - */ -- (void)deleteUserPoolClient:(AWSCognitoIdentityProviderDeleteUserPoolClientRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Deletes a domain for a user pool.

- - @param request A container for the necessary parameters to execute the DeleteUserPoolDomain service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDeleteUserPoolDomainResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserPoolDomainRequest - @see AWSCognitoIdentityProviderDeleteUserPoolDomainResponse - */ -- (AWSTask *)deleteUserPoolDomain:(AWSCognitoIdentityProviderDeleteUserPoolDomainRequest *)request; - -/** -

Deletes a domain for a user pool.

- - @param request A container for the necessary parameters to execute the DeleteUserPoolDomain service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDeleteUserPoolDomainRequest - @see AWSCognitoIdentityProviderDeleteUserPoolDomainResponse - */ -- (void)deleteUserPoolDomain:(AWSCognitoIdentityProviderDeleteUserPoolDomainRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDeleteUserPoolDomainResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets information about a specific identity provider.

- - @param request A container for the necessary parameters to execute the DescribeIdentityProvider service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDescribeIdentityProviderResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeIdentityProviderRequest - @see AWSCognitoIdentityProviderDescribeIdentityProviderResponse - */ -- (AWSTask *)describeIdentityProvider:(AWSCognitoIdentityProviderDescribeIdentityProviderRequest *)request; - -/** -

Gets information about a specific identity provider.

- - @param request A container for the necessary parameters to execute the DescribeIdentityProvider service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeIdentityProviderRequest - @see AWSCognitoIdentityProviderDescribeIdentityProviderResponse - */ -- (void)describeIdentityProvider:(AWSCognitoIdentityProviderDescribeIdentityProviderRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDescribeIdentityProviderResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Describes a resource server.

- - @param request A container for the necessary parameters to execute the DescribeResourceServer service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDescribeResourceServerResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeResourceServerRequest - @see AWSCognitoIdentityProviderDescribeResourceServerResponse - */ -- (AWSTask *)describeResourceServer:(AWSCognitoIdentityProviderDescribeResourceServerRequest *)request; - -/** -

Describes a resource server.

- - @param request A container for the necessary parameters to execute the DescribeResourceServer service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeResourceServerRequest - @see AWSCognitoIdentityProviderDescribeResourceServerResponse - */ -- (void)describeResourceServer:(AWSCognitoIdentityProviderDescribeResourceServerRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDescribeResourceServerResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Describes the risk configuration.

- - @param request A container for the necessary parameters to execute the DescribeRiskConfiguration service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDescribeRiskConfigurationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeRiskConfigurationRequest - @see AWSCognitoIdentityProviderDescribeRiskConfigurationResponse - */ -- (AWSTask *)describeRiskConfiguration:(AWSCognitoIdentityProviderDescribeRiskConfigurationRequest *)request; - -/** -

Describes the risk configuration.

- - @param request A container for the necessary parameters to execute the DescribeRiskConfiguration service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeRiskConfigurationRequest - @see AWSCognitoIdentityProviderDescribeRiskConfigurationResponse - */ -- (void)describeRiskConfiguration:(AWSCognitoIdentityProviderDescribeRiskConfigurationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDescribeRiskConfigurationResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Describes the user import job.

- - @param request A container for the necessary parameters to execute the DescribeUserImportJob service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDescribeUserImportJobResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserImportJobRequest - @see AWSCognitoIdentityProviderDescribeUserImportJobResponse - */ -- (AWSTask *)describeUserImportJob:(AWSCognitoIdentityProviderDescribeUserImportJobRequest *)request; - -/** -

Describes the user import job.

- - @param request A container for the necessary parameters to execute the DescribeUserImportJob service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserImportJobRequest - @see AWSCognitoIdentityProviderDescribeUserImportJobResponse - */ -- (void)describeUserImportJob:(AWSCognitoIdentityProviderDescribeUserImportJobRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDescribeUserImportJobResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Returns the configuration information and metadata of the specified user pool.

- - @param request A container for the necessary parameters to execute the DescribeUserPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDescribeUserPoolResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolTagging`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserPoolRequest - @see AWSCognitoIdentityProviderDescribeUserPoolResponse - */ -- (AWSTask *)describeUserPool:(AWSCognitoIdentityProviderDescribeUserPoolRequest *)request; - -/** -

Returns the configuration information and metadata of the specified user pool.

- - @param request A container for the necessary parameters to execute the DescribeUserPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolTagging`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserPoolRequest - @see AWSCognitoIdentityProviderDescribeUserPoolResponse - */ -- (void)describeUserPool:(AWSCognitoIdentityProviderDescribeUserPoolRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDescribeUserPoolResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Client method for returning the configuration information and metadata of the specified user pool app client.

- - @param request A container for the necessary parameters to execute the DescribeUserPoolClient service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDescribeUserPoolClientResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserPoolClientRequest - @see AWSCognitoIdentityProviderDescribeUserPoolClientResponse - */ -- (AWSTask *)describeUserPoolClient:(AWSCognitoIdentityProviderDescribeUserPoolClientRequest *)request; - -/** -

Client method for returning the configuration information and metadata of the specified user pool app client.

- - @param request A container for the necessary parameters to execute the DescribeUserPoolClient service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserPoolClientRequest - @see AWSCognitoIdentityProviderDescribeUserPoolClientResponse - */ -- (void)describeUserPoolClient:(AWSCognitoIdentityProviderDescribeUserPoolClientRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDescribeUserPoolClientResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets information about a domain.

- - @param request A container for the necessary parameters to execute the DescribeUserPoolDomain service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderDescribeUserPoolDomainResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserPoolDomainRequest - @see AWSCognitoIdentityProviderDescribeUserPoolDomainResponse - */ -- (AWSTask *)describeUserPoolDomain:(AWSCognitoIdentityProviderDescribeUserPoolDomainRequest *)request; - -/** -

Gets information about a domain.

- - @param request A container for the necessary parameters to execute the DescribeUserPoolDomain service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderDescribeUserPoolDomainRequest - @see AWSCognitoIdentityProviderDescribeUserPoolDomainResponse - */ -- (void)describeUserPoolDomain:(AWSCognitoIdentityProviderDescribeUserPoolDomainRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderDescribeUserPoolDomainResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Forgets the specified device.

- - @param request A container for the necessary parameters to execute the ForgetDevice service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderForgetDeviceRequest - */ -- (AWSTask *)forgetDevice:(AWSCognitoIdentityProviderForgetDeviceRequest *)request; - -/** -

Forgets the specified device.

- - @param request A container for the necessary parameters to execute the ForgetDevice service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderForgetDeviceRequest - */ -- (void)forgetDevice:(AWSCognitoIdentityProviderForgetDeviceRequest *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. For the Username parameter, you can use the username or user alias. If a verified phone number exists for the user, the confirmation code is sent to the phone number. Otherwise, if a verified email exists, the confirmation code is sent to the email. If neither a verified phone number nor a verified email exists, InvalidParameterException is thrown. To use the confirmation code for resetting the password, call .

- - @param request A container for the necessary parameters to execute the ForgotPassword service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderForgotPasswordResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderForgotPasswordRequest - @see AWSCognitoIdentityProviderForgotPasswordResponse - */ -- (AWSTask *)forgotPassword:(AWSCognitoIdentityProviderForgotPasswordRequest *)request; - -/** -

Calling this API causes a message to be sent to the end user with a confirmation code that is required to change the user's password. For the Username parameter, you can use the username or user alias. If a verified phone number exists for the user, the confirmation code is sent to the phone number. Otherwise, if a verified email exists, the confirmation code is sent to the email. If neither a verified phone number nor a verified email exists, InvalidParameterException is thrown. To use the confirmation code for resetting the password, call .

- - @param request A container for the necessary parameters to execute the ForgotPassword service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderForgotPasswordRequest - @see AWSCognitoIdentityProviderForgotPasswordResponse - */ -- (void)forgotPassword:(AWSCognitoIdentityProviderForgotPasswordRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderForgotPasswordResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the header information for the .csv file to be used as input for the user import job.

- - @param request A container for the necessary parameters to execute the GetCSVHeader service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetCSVHeaderResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetCSVHeaderRequest - @see AWSCognitoIdentityProviderGetCSVHeaderResponse - */ -- (AWSTask *)getCSVHeader:(AWSCognitoIdentityProviderGetCSVHeaderRequest *)request; - -/** -

Gets the header information for the .csv file to be used as input for the user import job.

- - @param request A container for the necessary parameters to execute the GetCSVHeader service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetCSVHeaderRequest - @see AWSCognitoIdentityProviderGetCSVHeaderResponse - */ -- (void)getCSVHeader:(AWSCognitoIdentityProviderGetCSVHeaderRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetCSVHeaderResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the device.

- - @param request A container for the necessary parameters to execute the GetDevice service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetDeviceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetDeviceRequest - @see AWSCognitoIdentityProviderGetDeviceResponse - */ -- (AWSTask *)getDevice:(AWSCognitoIdentityProviderGetDeviceRequest *)request; - -/** -

Gets the device.

- - @param request A container for the necessary parameters to execute the GetDevice service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetDeviceRequest - @see AWSCognitoIdentityProviderGetDeviceResponse - */ -- (void)getDevice:(AWSCognitoIdentityProviderGetDeviceRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetDeviceResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets a group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the GetGroup service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetGroupResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetGroupRequest - @see AWSCognitoIdentityProviderGetGroupResponse - */ -- (AWSTask *)getGroup:(AWSCognitoIdentityProviderGetGroupRequest *)request; - -/** -

Gets a group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the GetGroup service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetGroupRequest - @see AWSCognitoIdentityProviderGetGroupResponse - */ -- (void)getGroup:(AWSCognitoIdentityProviderGetGroupRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetGroupResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the specified identity provider.

- - @param request A container for the necessary parameters to execute the GetIdentityProviderByIdentifier service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest - @see AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse - */ -- (AWSTask *)getIdentityProviderByIdentifier:(AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest *)request; - -/** -

Gets the specified identity provider.

- - @param request A container for the necessary parameters to execute the GetIdentityProviderByIdentifier service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest - @see AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse - */ -- (void)getIdentityProviderByIdentifier:(AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

This method takes a user pool ID, and returns the signing certificate.

- - @param request A container for the necessary parameters to execute the GetSigningCertificate service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetSigningCertificateResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorResourceNotFound`. - - @see AWSCognitoIdentityProviderGetSigningCertificateRequest - @see AWSCognitoIdentityProviderGetSigningCertificateResponse - */ -- (AWSTask *)getSigningCertificate:(AWSCognitoIdentityProviderGetSigningCertificateRequest *)request; - -/** -

This method takes a user pool ID, and returns the signing certificate.

- - @param request A container for the necessary parameters to execute the GetSigningCertificate service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorResourceNotFound`. - - @see AWSCognitoIdentityProviderGetSigningCertificateRequest - @see AWSCognitoIdentityProviderGetSigningCertificateResponse - */ -- (void)getSigningCertificate:(AWSCognitoIdentityProviderGetSigningCertificateRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetSigningCertificateResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the UI Customization information for a particular app client's app UI, if there is something set. If nothing is set for the particular client, but there is an existing pool level customization (app clientId will be ALL), then that is returned. If nothing is present, then an empty shape is returned.

- - @param request A container for the necessary parameters to execute the GetUICustomization service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetUICustomizationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUICustomizationRequest - @see AWSCognitoIdentityProviderGetUICustomizationResponse - */ -- (AWSTask *)getUICustomization:(AWSCognitoIdentityProviderGetUICustomizationRequest *)request; - -/** -

Gets the UI Customization information for a particular app client's app UI, if there is something set. If nothing is set for the particular client, but there is an existing pool level customization (app clientId will be ALL), then that is returned. If nothing is present, then an empty shape is returned.

- - @param request A container for the necessary parameters to execute the GetUICustomization service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUICustomizationRequest - @see AWSCognitoIdentityProviderGetUICustomizationResponse - */ -- (void)getUICustomization:(AWSCognitoIdentityProviderGetUICustomizationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetUICustomizationResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the user attributes and metadata for a user.

- - @param request A container for the necessary parameters to execute the GetUser service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetUserResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUserRequest - @see AWSCognitoIdentityProviderGetUserResponse - */ -- (AWSTask *)getUser:(AWSCognitoIdentityProviderGetUserRequest *)request; - -/** -

Gets the user attributes and metadata for a user.

- - @param request A container for the necessary parameters to execute the GetUser service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUserRequest - @see AWSCognitoIdentityProviderGetUserResponse - */ -- (void)getUser:(AWSCognitoIdentityProviderGetUserRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetUserResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the user attribute verification code for the specified attribute name.

- - @param request A container for the necessary parameters to execute the GetUserAttributeVerificationCode service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest - @see AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse - */ -- (AWSTask *)getUserAttributeVerificationCode:(AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest *)request; - -/** -

Gets the user attribute verification code for the specified attribute name.

- - @param request A container for the necessary parameters to execute the GetUserAttributeVerificationCode service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest - @see AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse - */ -- (void)getUserAttributeVerificationCode:(AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the user pool multi-factor authentication (MFA) configuration.

- - @param request A container for the necessary parameters to execute the GetUserPoolMfaConfig service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest - @see AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse - */ -- (AWSTask *)getUserPoolMfaConfig:(AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest *)request; - -/** -

Gets the user pool multi-factor authentication (MFA) configuration.

- - @param request A container for the necessary parameters to execute the GetUserPoolMfaConfig service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest - @see AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse - */ -- (void)getUserPoolMfaConfig:(AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Signs out users from all devices.

- - @param request A container for the necessary parameters to execute the GlobalSignOut service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderGlobalSignOutResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGlobalSignOutRequest - @see AWSCognitoIdentityProviderGlobalSignOutResponse - */ -- (AWSTask *)globalSignOut:(AWSCognitoIdentityProviderGlobalSignOutRequest *)request; - -/** -

Signs out users from all devices.

- - @param request A container for the necessary parameters to execute the GlobalSignOut service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderGlobalSignOutRequest - @see AWSCognitoIdentityProviderGlobalSignOutResponse - */ -- (void)globalSignOut:(AWSCognitoIdentityProviderGlobalSignOutRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderGlobalSignOutResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Initiates the authentication flow.

- - @param request A container for the necessary parameters to execute the InitiateAuth service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderInitiateAuthResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderInitiateAuthRequest - @see AWSCognitoIdentityProviderInitiateAuthResponse - */ -- (AWSTask *)initiateAuth:(AWSCognitoIdentityProviderInitiateAuthRequest *)request; - -/** -

Initiates the authentication flow.

- - @param request A container for the necessary parameters to execute the InitiateAuth service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderInitiateAuthRequest - @see AWSCognitoIdentityProviderInitiateAuthResponse - */ -- (void)initiateAuth:(AWSCognitoIdentityProviderInitiateAuthRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderInitiateAuthResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the devices.

- - @param request A container for the necessary parameters to execute the ListDevices service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListDevicesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListDevicesRequest - @see AWSCognitoIdentityProviderListDevicesResponse - */ -- (AWSTask *)listDevices:(AWSCognitoIdentityProviderListDevicesRequest *)request; - -/** -

Lists the devices.

- - @param request A container for the necessary parameters to execute the ListDevices service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListDevicesRequest - @see AWSCognitoIdentityProviderListDevicesResponse - */ -- (void)listDevices:(AWSCognitoIdentityProviderListDevicesRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListDevicesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the groups associated with a user pool.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the ListGroups service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListGroupsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListGroupsRequest - @see AWSCognitoIdentityProviderListGroupsResponse - */ -- (AWSTask *)listGroups:(AWSCognitoIdentityProviderListGroupsRequest *)request; - -/** -

Lists the groups associated with a user pool.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the ListGroups service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListGroupsRequest - @see AWSCognitoIdentityProviderListGroupsResponse - */ -- (void)listGroups:(AWSCognitoIdentityProviderListGroupsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListGroupsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists information about all identity providers for a user pool.

- - @param request A container for the necessary parameters to execute the ListIdentityProviders service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListIdentityProvidersResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListIdentityProvidersRequest - @see AWSCognitoIdentityProviderListIdentityProvidersResponse - */ -- (AWSTask *)listIdentityProviders:(AWSCognitoIdentityProviderListIdentityProvidersRequest *)request; - -/** -

Lists information about all identity providers for a user pool.

- - @param request A container for the necessary parameters to execute the ListIdentityProviders service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListIdentityProvidersRequest - @see AWSCognitoIdentityProviderListIdentityProvidersResponse - */ -- (void)listIdentityProviders:(AWSCognitoIdentityProviderListIdentityProvidersRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListIdentityProvidersResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the resource servers for a user pool.

- - @param request A container for the necessary parameters to execute the ListResourceServers service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListResourceServersResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListResourceServersRequest - @see AWSCognitoIdentityProviderListResourceServersResponse - */ -- (AWSTask *)listResourceServers:(AWSCognitoIdentityProviderListResourceServersRequest *)request; - -/** -

Lists the resource servers for a user pool.

- - @param request A container for the necessary parameters to execute the ListResourceServers service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListResourceServersRequest - @see AWSCognitoIdentityProviderListResourceServersResponse - */ -- (void)listResourceServers:(AWSCognitoIdentityProviderListResourceServersRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListResourceServersResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the user import jobs.

- - @param request A container for the necessary parameters to execute the ListUserImportJobs service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListUserImportJobsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUserImportJobsRequest - @see AWSCognitoIdentityProviderListUserImportJobsResponse - */ -- (AWSTask *)listUserImportJobs:(AWSCognitoIdentityProviderListUserImportJobsRequest *)request; - -/** -

Lists the user import jobs.

- - @param request A container for the necessary parameters to execute the ListUserImportJobs service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUserImportJobsRequest - @see AWSCognitoIdentityProviderListUserImportJobsResponse - */ -- (void)listUserImportJobs:(AWSCognitoIdentityProviderListUserImportJobsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListUserImportJobsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the clients that have been created for the specified user pool.

- - @param request A container for the necessary parameters to execute the ListUserPoolClients service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListUserPoolClientsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUserPoolClientsRequest - @see AWSCognitoIdentityProviderListUserPoolClientsResponse - */ -- (AWSTask *)listUserPoolClients:(AWSCognitoIdentityProviderListUserPoolClientsRequest *)request; - -/** -

Lists the clients that have been created for the specified user pool.

- - @param request A container for the necessary parameters to execute the ListUserPoolClients service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUserPoolClientsRequest - @see AWSCognitoIdentityProviderListUserPoolClientsResponse - */ -- (void)listUserPoolClients:(AWSCognitoIdentityProviderListUserPoolClientsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListUserPoolClientsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the user pools associated with an AWS account.

- - @param request A container for the necessary parameters to execute the ListUserPools service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListUserPoolsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUserPoolsRequest - @see AWSCognitoIdentityProviderListUserPoolsResponse - */ -- (AWSTask *)listUserPools:(AWSCognitoIdentityProviderListUserPoolsRequest *)request; - -/** -

Lists the user pools associated with an AWS account.

- - @param request A container for the necessary parameters to execute the ListUserPools service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUserPoolsRequest - @see AWSCognitoIdentityProviderListUserPoolsResponse - */ -- (void)listUserPools:(AWSCognitoIdentityProviderListUserPoolsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListUserPoolsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the users in the Amazon Cognito user pool.

- - @param request A container for the necessary parameters to execute the ListUsers service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListUsersResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUsersRequest - @see AWSCognitoIdentityProviderListUsersResponse - */ -- (AWSTask *)listUsers:(AWSCognitoIdentityProviderListUsersRequest *)request; - -/** -

Lists the users in the Amazon Cognito user pool.

- - @param request A container for the necessary parameters to execute the ListUsers service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUsersRequest - @see AWSCognitoIdentityProviderListUsersResponse - */ -- (void)listUsers:(AWSCognitoIdentityProviderListUsersRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListUsersResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the users in the specified group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the ListUsersInGroup service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderListUsersInGroupResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUsersInGroupRequest - @see AWSCognitoIdentityProviderListUsersInGroupResponse - */ -- (AWSTask *)listUsersInGroup:(AWSCognitoIdentityProviderListUsersInGroupRequest *)request; - -/** -

Lists the users in the specified group.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the ListUsersInGroup service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderListUsersInGroupRequest - @see AWSCognitoIdentityProviderListUsersInGroupResponse - */ -- (void)listUsersInGroup:(AWSCognitoIdentityProviderListUsersInGroupRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderListUsersInGroupResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Resends the confirmation (for confirmation of registration) to a specific user in the user pool.

- - @param request A container for the necessary parameters to execute the ResendConfirmationCode service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderResendConfirmationCodeResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderResendConfirmationCodeRequest - @see AWSCognitoIdentityProviderResendConfirmationCodeResponse - */ -- (AWSTask *)resendConfirmationCode:(AWSCognitoIdentityProviderResendConfirmationCodeRequest *)request; - -/** -

Resends the confirmation (for confirmation of registration) to a specific user in the user pool.

- - @param request A container for the necessary parameters to execute the ResendConfirmationCode service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderResendConfirmationCodeRequest - @see AWSCognitoIdentityProviderResendConfirmationCodeResponse - */ -- (void)resendConfirmationCode:(AWSCognitoIdentityProviderResendConfirmationCodeRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderResendConfirmationCodeResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Responds to the authentication challenge.

- - @param request A container for the necessary parameters to execute the RespondToAuthChallenge service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderRespondToAuthChallengeResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorMFAMethodNotFound`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`. - - @see AWSCognitoIdentityProviderRespondToAuthChallengeRequest - @see AWSCognitoIdentityProviderRespondToAuthChallengeResponse - */ -- (AWSTask *)respondToAuthChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeRequest *)request; - -/** -

Responds to the authentication challenge.

- - @param request A container for the necessary parameters to execute the RespondToAuthChallenge service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorMFAMethodNotFound`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`. - - @see AWSCognitoIdentityProviderRespondToAuthChallengeRequest - @see AWSCognitoIdentityProviderRespondToAuthChallengeResponse - */ -- (void)respondToAuthChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderRespondToAuthChallengeResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Configures actions on detected risks. To delete the risk configuration for UserPoolId or ClientId, pass null values for all four configuration types.

To enable Amazon Cognito advanced security features, update the user pool to include the UserPoolAddOns keyAdvancedSecurityMode.

See .

- - @param request A container for the necessary parameters to execute the SetRiskConfiguration service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderSetRiskConfigurationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetRiskConfigurationRequest - @see AWSCognitoIdentityProviderSetRiskConfigurationResponse - */ -- (AWSTask *)setRiskConfiguration:(AWSCognitoIdentityProviderSetRiskConfigurationRequest *)request; - -/** -

Configures actions on detected risks. To delete the risk configuration for UserPoolId or ClientId, pass null values for all four configuration types.

To enable Amazon Cognito advanced security features, update the user pool to include the UserPoolAddOns keyAdvancedSecurityMode.

See .

- - @param request A container for the necessary parameters to execute the SetRiskConfiguration service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetRiskConfigurationRequest - @see AWSCognitoIdentityProviderSetRiskConfigurationResponse - */ -- (void)setRiskConfiguration:(AWSCognitoIdentityProviderSetRiskConfigurationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderSetRiskConfigurationResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Sets the UI customization information for a user pool's built-in app UI.

You can specify app UI customization settings for a single client (with a specific clientId) or for all clients (by setting the clientId to ALL). If you specify ALL, the default configuration will be used for every client that has no UI customization set previously. If you specify UI customization settings for a particular client, it will no longer fall back to the ALL configuration.

To use this API, your user pool must have a domain associated with it. Otherwise, there is no place to host the app's pages, and the service will throw an error.

- - @param request A container for the necessary parameters to execute the SetUICustomization service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderSetUICustomizationResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUICustomizationRequest - @see AWSCognitoIdentityProviderSetUICustomizationResponse - */ -- (AWSTask *)setUICustomization:(AWSCognitoIdentityProviderSetUICustomizationRequest *)request; - -/** -

Sets the UI customization information for a user pool's built-in app UI.

You can specify app UI customization settings for a single client (with a specific clientId) or for all clients (by setting the clientId to ALL). If you specify ALL, the default configuration will be used for every client that has no UI customization set previously. If you specify UI customization settings for a particular client, it will no longer fall back to the ALL configuration.

To use this API, your user pool must have a domain associated with it. Otherwise, there is no place to host the app's pages, and the service will throw an error.

- - @param request A container for the necessary parameters to execute the SetUICustomization service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUICustomizationRequest - @see AWSCognitoIdentityProviderSetUICustomizationResponse - */ -- (void)setUICustomization:(AWSCognitoIdentityProviderSetUICustomizationRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderSetUICustomizationResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Set the user's multi-factor authentication (MFA) method preference.

- - @param request A container for the necessary parameters to execute the SetUserMFAPreference service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderSetUserMFAPreferenceResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUserMFAPreferenceRequest - @see AWSCognitoIdentityProviderSetUserMFAPreferenceResponse - */ -- (AWSTask *)setUserMFAPreference:(AWSCognitoIdentityProviderSetUserMFAPreferenceRequest *)request; - -/** -

Set the user's multi-factor authentication (MFA) method preference.

- - @param request A container for the necessary parameters to execute the SetUserMFAPreference service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUserMFAPreferenceRequest - @see AWSCognitoIdentityProviderSetUserMFAPreferenceResponse - */ -- (void)setUserMFAPreference:(AWSCognitoIdentityProviderSetUserMFAPreferenceRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderSetUserMFAPreferenceResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Set the user pool MFA configuration.

- - @param request A container for the necessary parameters to execute the SetUserPoolMfaConfig service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest - @see AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse - */ -- (AWSTask *)setUserPoolMfaConfig:(AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest *)request; - -/** -

Set the user pool MFA configuration.

- - @param request A container for the necessary parameters to execute the SetUserPoolMfaConfig service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest - @see AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse - */ -- (void)setUserPoolMfaConfig:(AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Sets the user settings like multi-factor authentication (MFA). If MFA is to be removed for a particular attribute pass the attribute with code delivery as null. If null list is passed, all MFA options are removed.

- - @param request A container for the necessary parameters to execute the SetUserSettings service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderSetUserSettingsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUserSettingsRequest - @see AWSCognitoIdentityProviderSetUserSettingsResponse - */ -- (AWSTask *)setUserSettings:(AWSCognitoIdentityProviderSetUserSettingsRequest *)request; - -/** -

Sets the user settings like multi-factor authentication (MFA). If MFA is to be removed for a particular attribute pass the attribute with code delivery as null. If null list is passed, all MFA options are removed.

- - @param request A container for the necessary parameters to execute the SetUserSettings service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderSetUserSettingsRequest - @see AWSCognitoIdentityProviderSetUserSettingsResponse - */ -- (void)setUserSettings:(AWSCognitoIdentityProviderSetUserSettingsRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderSetUserSettingsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Registers the user in the specified user pool and creates a user name, password, and user attributes.

- - @param request A container for the necessary parameters to execute the SignUp service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderSignUpResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorUsernameExists`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`. - - @see AWSCognitoIdentityProviderSignUpRequest - @see AWSCognitoIdentityProviderSignUpResponse - */ -- (AWSTask *)signUp:(AWSCognitoIdentityProviderSignUpRequest *)request; - -/** -

Registers the user in the specified user pool and creates a user name, password, and user attributes.

- - @param request A container for the necessary parameters to execute the SignUp service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidPassword`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorUsernameExists`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`. - - @see AWSCognitoIdentityProviderSignUpRequest - @see AWSCognitoIdentityProviderSignUpResponse - */ -- (void)signUp:(AWSCognitoIdentityProviderSignUpRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderSignUpResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Starts the user import.

- - @param request A container for the necessary parameters to execute the StartUserImportJob service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderStartUserImportJobResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderStartUserImportJobRequest - @see AWSCognitoIdentityProviderStartUserImportJobResponse - */ -- (AWSTask *)startUserImportJob:(AWSCognitoIdentityProviderStartUserImportJobRequest *)request; - -/** -

Starts the user import.

- - @param request A container for the necessary parameters to execute the StartUserImportJob service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderStartUserImportJobRequest - @see AWSCognitoIdentityProviderStartUserImportJobResponse - */ -- (void)startUserImportJob:(AWSCognitoIdentityProviderStartUserImportJobRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderStartUserImportJobResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Stops the user import job.

- - @param request A container for the necessary parameters to execute the StopUserImportJob service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderStopUserImportJobResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderStopUserImportJobRequest - @see AWSCognitoIdentityProviderStopUserImportJobResponse - */ -- (AWSTask *)stopUserImportJob:(AWSCognitoIdentityProviderStopUserImportJobRequest *)request; - -/** -

Stops the user import job.

- - @param request A container for the necessary parameters to execute the StopUserImportJob service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorPreconditionNotMet`, `AWSCognitoIdentityProviderErrorNotAuthorized`. - - @see AWSCognitoIdentityProviderStopUserImportJobRequest - @see AWSCognitoIdentityProviderStopUserImportJobResponse - */ -- (void)stopUserImportJob:(AWSCognitoIdentityProviderStopUserImportJobRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderStopUserImportJobResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Provides the feedback for an authentication event whether it was from a valid user or not. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

- - @param request A container for the necessary parameters to execute the UpdateAuthEventFeedback service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest - @see AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse - */ -- (AWSTask *)updateAuthEventFeedback:(AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest *)request; - -/** -

Provides the feedback for an authentication event whether it was from a valid user or not. This feedback is used for improving the risk evaluation decision for the user pool as part of Amazon Cognito advanced security.

- - @param request A container for the necessary parameters to execute the UpdateAuthEventFeedback service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest - @see AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse - */ -- (void)updateAuthEventFeedback:(AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the device status.

- - @param request A container for the necessary parameters to execute the UpdateDeviceStatus service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateDeviceStatusResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateDeviceStatusRequest - @see AWSCognitoIdentityProviderUpdateDeviceStatusResponse - */ -- (AWSTask *)updateDeviceStatus:(AWSCognitoIdentityProviderUpdateDeviceStatusRequest *)request; - -/** -

Updates the device status.

- - @param request A container for the necessary parameters to execute the UpdateDeviceStatus service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateDeviceStatusRequest - @see AWSCognitoIdentityProviderUpdateDeviceStatusResponse - */ -- (void)updateDeviceStatus:(AWSCognitoIdentityProviderUpdateDeviceStatusRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateDeviceStatusResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the specified group with the specified attributes.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the UpdateGroup service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateGroupResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateGroupRequest - @see AWSCognitoIdentityProviderUpdateGroupResponse - */ -- (AWSTask *)updateGroup:(AWSCognitoIdentityProviderUpdateGroupRequest *)request; - -/** -

Updates the specified group with the specified attributes.

Requires developer credentials.

- - @param request A container for the necessary parameters to execute the UpdateGroup service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateGroupRequest - @see AWSCognitoIdentityProviderUpdateGroupResponse - */ -- (void)updateGroup:(AWSCognitoIdentityProviderUpdateGroupRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateGroupResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates identity provider information for a user pool.

- - @param request A container for the necessary parameters to execute the UpdateIdentityProvider service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateIdentityProviderResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnsupportedIdentityProvider`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateIdentityProviderRequest - @see AWSCognitoIdentityProviderUpdateIdentityProviderResponse - */ -- (AWSTask *)updateIdentityProvider:(AWSCognitoIdentityProviderUpdateIdentityProviderRequest *)request; - -/** -

Updates identity provider information for a user pool.

- - @param request A container for the necessary parameters to execute the UpdateIdentityProvider service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorUnsupportedIdentityProvider`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateIdentityProviderRequest - @see AWSCognitoIdentityProviderUpdateIdentityProviderResponse - */ -- (void)updateIdentityProvider:(AWSCognitoIdentityProviderUpdateIdentityProviderRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateIdentityProviderResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the name and scopes of resource server. All other fields are read-only.

- - @param request A container for the necessary parameters to execute the UpdateResourceServer service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateResourceServerResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateResourceServerRequest - @see AWSCognitoIdentityProviderUpdateResourceServerResponse - */ -- (AWSTask *)updateResourceServer:(AWSCognitoIdentityProviderUpdateResourceServerRequest *)request; - -/** -

Updates the name and scopes of resource server. All other fields are read-only.

- - @param request A container for the necessary parameters to execute the UpdateResourceServer service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateResourceServerRequest - @see AWSCognitoIdentityProviderUpdateResourceServerResponse - */ -- (void)updateResourceServer:(AWSCognitoIdentityProviderUpdateResourceServerRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateResourceServerResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Allows a user to update a specific attribute (one at a time).

- - @param request A container for the necessary parameters to execute the UpdateUserAttributes service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateUserAttributesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateUserAttributesRequest - @see AWSCognitoIdentityProviderUpdateUserAttributesResponse - */ -- (AWSTask *)updateUserAttributes:(AWSCognitoIdentityProviderUpdateUserAttributesRequest *)request; - -/** -

Allows a user to update a specific attribute (one at a time).

- - @param request A container for the necessary parameters to execute the UpdateUserAttributes service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUnexpectedLambda`, `AWSCognitoIdentityProviderErrorUserLambdaValidation`, `AWSCognitoIdentityProviderErrorInvalidLambdaResponse`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorAliasExists`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorCodeDeliveryFailure`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateUserAttributesRequest - @see AWSCognitoIdentityProviderUpdateUserAttributesResponse - */ -- (void)updateUserAttributes:(AWSCognitoIdentityProviderUpdateUserAttributesRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateUserAttributesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the specified user pool with the specified attributes. If you don't provide a value for an attribute, it will be set to the default value. You can get a list of the current user pool settings with .

- - @param request A container for the necessary parameters to execute the UpdateUserPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateUserPoolResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorConcurrentModification`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserImportInProgress`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorUserPoolTagging`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`. - - @see AWSCognitoIdentityProviderUpdateUserPoolRequest - @see AWSCognitoIdentityProviderUpdateUserPoolResponse - */ -- (AWSTask *)updateUserPool:(AWSCognitoIdentityProviderUpdateUserPoolRequest *)request; - -/** -

Updates the specified user pool with the specified attributes. If you don't provide a value for an attribute, it will be set to the default value. You can get a list of the current user pool settings with .

- - @param request A container for the necessary parameters to execute the UpdateUserPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorConcurrentModification`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorUserImportInProgress`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy`, `AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship`, `AWSCognitoIdentityProviderErrorUserPoolTagging`, `AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy`. - - @see AWSCognitoIdentityProviderUpdateUserPoolRequest - @see AWSCognitoIdentityProviderUpdateUserPoolResponse - */ -- (void)updateUserPool:(AWSCognitoIdentityProviderUpdateUserPoolRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateUserPoolResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the specified user pool app client with the specified attributes. If you don't provide a value for an attribute, it will be set to the default value. You can get a list of the current user pool app client settings with .

- - @param request A container for the necessary parameters to execute the UpdateUserPoolClient service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateUserPoolClientResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorConcurrentModification`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorScopeDoesNotExist`, `AWSCognitoIdentityProviderErrorInvalidOAuthFlow`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateUserPoolClientRequest - @see AWSCognitoIdentityProviderUpdateUserPoolClientResponse - */ -- (AWSTask *)updateUserPoolClient:(AWSCognitoIdentityProviderUpdateUserPoolClientRequest *)request; - -/** -

Updates the specified user pool app client with the specified attributes. If you don't provide a value for an attribute, it will be set to the default value. You can get a list of the current user pool app client settings with .

- - @param request A container for the necessary parameters to execute the UpdateUserPoolClient service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorConcurrentModification`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorScopeDoesNotExist`, `AWSCognitoIdentityProviderErrorInvalidOAuthFlow`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateUserPoolClientRequest - @see AWSCognitoIdentityProviderUpdateUserPoolClientResponse - */ -- (void)updateUserPoolClient:(AWSCognitoIdentityProviderUpdateUserPoolClientRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateUserPoolClientResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user pool.

You can use this operation to provide the Amazon Resource Name (ARN) of a new certificate to Amazon Cognito. You cannot use it to change the domain for a user pool.

A custom domain is used to host the Amazon Cognito hosted UI, which provides sign-up and sign-in pages for your application. When you set up a custom domain, you provide a certificate that you manage with AWS Certificate Manager (ACM). When necessary, you can use this operation to change the certificate that you applied to your custom domain.

Usually, this is unnecessary following routine certificate renewal with ACM. When you renew your existing certificate in ACM, the ARN for your certificate remains the same, and your custom domain uses the new certificate automatically.

However, if you replace your existing certificate with a new one, ACM gives the new certificate a new ARN. To apply the new certificate to your custom domain, you must provide this ARN to Amazon Cognito.

When you add your new certificate in ACM, you must choose US East (N. Virginia) as the AWS Region.

After you submit your request, Amazon Cognito requires up to 1 hour to distribute your new certificate to your custom domain.

For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

- - @param request A container for the necessary parameters to execute the UpdateUserPoolDomain service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderUpdateUserPoolDomainResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateUserPoolDomainRequest - @see AWSCognitoIdentityProviderUpdateUserPoolDomainResponse - */ -- (AWSTask *)updateUserPoolDomain:(AWSCognitoIdentityProviderUpdateUserPoolDomainRequest *)request; - -/** -

Updates the Secure Sockets Layer (SSL) certificate for the custom domain for your user pool.

You can use this operation to provide the Amazon Resource Name (ARN) of a new certificate to Amazon Cognito. You cannot use it to change the domain for a user pool.

A custom domain is used to host the Amazon Cognito hosted UI, which provides sign-up and sign-in pages for your application. When you set up a custom domain, you provide a certificate that you manage with AWS Certificate Manager (ACM). When necessary, you can use this operation to change the certificate that you applied to your custom domain.

Usually, this is unnecessary following routine certificate renewal with ACM. When you renew your existing certificate in ACM, the ARN for your certificate remains the same, and your custom domain uses the new certificate automatically.

However, if you replace your existing certificate with a new one, ACM gives the new certificate a new ARN. To apply the new certificate to your custom domain, you must provide this ARN to Amazon Cognito.

When you add your new certificate in ACM, you must choose US East (N. Virginia) as the AWS Region.

After you submit your request, Amazon Cognito requires up to 1 hour to distribute your new certificate to your custom domain.

For more information about adding a custom domain to your user pool, see Using Your Own Domain for the Hosted UI.

- - @param request A container for the necessary parameters to execute the UpdateUserPoolDomain service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderUpdateUserPoolDomainRequest - @see AWSCognitoIdentityProviderUpdateUserPoolDomainResponse - */ -- (void)updateUserPoolDomain:(AWSCognitoIdentityProviderUpdateUserPoolDomainRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderUpdateUserPoolDomainResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Use this API to register a user's entered TOTP code and mark the user's software token MFA status as "verified" if successful. The request takes an access token or a session string, but not both.

- - @param request A container for the necessary parameters to execute the VerifySoftwareToken service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderVerifySoftwareTokenResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorEnableSoftwareTokenMFA`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`, `AWSCognitoIdentityProviderErrorCodeMismatch`. - - @see AWSCognitoIdentityProviderVerifySoftwareTokenRequest - @see AWSCognitoIdentityProviderVerifySoftwareTokenResponse - */ -- (AWSTask *)verifySoftwareToken:(AWSCognitoIdentityProviderVerifySoftwareTokenRequest *)request; - -/** -

Use this API to register a user's entered TOTP code and mark the user's software token MFA status as "verified" if successful. The request takes an access token or a session string, but not both.

- - @param request A container for the necessary parameters to execute the VerifySoftwareToken service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`, `AWSCognitoIdentityProviderErrorEnableSoftwareTokenMFA`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound`, `AWSCognitoIdentityProviderErrorCodeMismatch`. - - @see AWSCognitoIdentityProviderVerifySoftwareTokenRequest - @see AWSCognitoIdentityProviderVerifySoftwareTokenResponse - */ -- (void)verifySoftwareToken:(AWSCognitoIdentityProviderVerifySoftwareTokenRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderVerifySoftwareTokenResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Verifies the specified user attributes in the user pool.

- - @param request A container for the necessary parameters to execute the VerifyUserAttribute service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityProviderVerifyUserAttributeResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderVerifyUserAttributeRequest - @see AWSCognitoIdentityProviderVerifyUserAttributeResponse - */ -- (AWSTask *)verifyUserAttribute:(AWSCognitoIdentityProviderVerifyUserAttributeRequest *)request; - -/** -

Verifies the specified user attributes in the user pool.

- - @param request A container for the necessary parameters to execute the VerifyUserAttribute service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityProviderErrorDomain` domain and the following error code: `AWSCognitoIdentityProviderErrorResourceNotFound`, `AWSCognitoIdentityProviderErrorInvalidParameter`, `AWSCognitoIdentityProviderErrorCodeMismatch`, `AWSCognitoIdentityProviderErrorExpiredCode`, `AWSCognitoIdentityProviderErrorNotAuthorized`, `AWSCognitoIdentityProviderErrorTooManyRequests`, `AWSCognitoIdentityProviderErrorLimitExceeded`, `AWSCognitoIdentityProviderErrorPasswordResetRequired`, `AWSCognitoIdentityProviderErrorUserNotFound`, `AWSCognitoIdentityProviderErrorUserNotConfirmed`, `AWSCognitoIdentityProviderErrorInternalError`. - - @see AWSCognitoIdentityProviderVerifyUserAttributeRequest - @see AWSCognitoIdentityProviderVerifyUserAttributeResponse - */ -- (void)verifyUserAttribute:(AWSCognitoIdentityProviderVerifyUserAttributeRequest *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityProviderVerifyUserAttributeResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderService.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderService.m deleted file mode 100644 index 5910fca..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/CognitoIdentityProvider/AWSCognitoIdentityProviderService.m +++ /dev/null @@ -1,2513 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentityProviderService.h" -#import -#import -#import -#import -#import -#import -#import -#import -#import -#import "AWSCognitoIdentityProviderResources.h" - -static NSString *const AWSInfoCognitoIdentityProvider = @"CognitoIdentityProvider"; -NSString *const AWSCognitoIdentityProviderSDKVersion = @"2.9.3"; - - -@interface AWSCognitoIdentityProviderResponseSerializer : AWSJSONResponseSerializer - -@end - -@implementation AWSCognitoIdentityProviderResponseSerializer - -#pragma mark - Service errors - -static NSDictionary *errorCodeDictionary = nil; -+ (void)initialize { - errorCodeDictionary = @{ - @"AliasExistsException" : @(AWSCognitoIdentityProviderErrorAliasExists), - @"CodeDeliveryFailureException" : @(AWSCognitoIdentityProviderErrorCodeDeliveryFailure), - @"CodeMismatchException" : @(AWSCognitoIdentityProviderErrorCodeMismatch), - @"ConcurrentModificationException" : @(AWSCognitoIdentityProviderErrorConcurrentModification), - @"DuplicateProviderException" : @(AWSCognitoIdentityProviderErrorDuplicateProvider), - @"EnableSoftwareTokenMFAException" : @(AWSCognitoIdentityProviderErrorEnableSoftwareTokenMFA), - @"ExpiredCodeException" : @(AWSCognitoIdentityProviderErrorExpiredCode), - @"GroupExistsException" : @(AWSCognitoIdentityProviderErrorGroupExists), - @"InternalErrorException" : @(AWSCognitoIdentityProviderErrorInternalError), - @"InvalidEmailRoleAccessPolicyException" : @(AWSCognitoIdentityProviderErrorInvalidEmailRoleAccessPolicy), - @"InvalidLambdaResponseException" : @(AWSCognitoIdentityProviderErrorInvalidLambdaResponse), - @"InvalidOAuthFlowException" : @(AWSCognitoIdentityProviderErrorInvalidOAuthFlow), - @"InvalidParameterException" : @(AWSCognitoIdentityProviderErrorInvalidParameter), - @"InvalidPasswordException" : @(AWSCognitoIdentityProviderErrorInvalidPassword), - @"InvalidSmsRoleAccessPolicyException" : @(AWSCognitoIdentityProviderErrorInvalidSmsRoleAccessPolicy), - @"InvalidSmsRoleTrustRelationshipException" : @(AWSCognitoIdentityProviderErrorInvalidSmsRoleTrustRelationship), - @"InvalidUserPoolConfigurationException" : @(AWSCognitoIdentityProviderErrorInvalidUserPoolConfiguration), - @"LimitExceededException" : @(AWSCognitoIdentityProviderErrorLimitExceeded), - @"MFAMethodNotFoundException" : @(AWSCognitoIdentityProviderErrorMFAMethodNotFound), - @"NotAuthorizedException" : @(AWSCognitoIdentityProviderErrorNotAuthorized), - @"PasswordResetRequiredException" : @(AWSCognitoIdentityProviderErrorPasswordResetRequired), - @"PreconditionNotMetException" : @(AWSCognitoIdentityProviderErrorPreconditionNotMet), - @"ResourceNotFoundException" : @(AWSCognitoIdentityProviderErrorResourceNotFound), - @"ScopeDoesNotExistException" : @(AWSCognitoIdentityProviderErrorScopeDoesNotExist), - @"SoftwareTokenMFANotFoundException" : @(AWSCognitoIdentityProviderErrorSoftwareTokenMFANotFound), - @"TooManyFailedAttemptsException" : @(AWSCognitoIdentityProviderErrorTooManyFailedAttempts), - @"TooManyRequestsException" : @(AWSCognitoIdentityProviderErrorTooManyRequests), - @"UnexpectedLambdaException" : @(AWSCognitoIdentityProviderErrorUnexpectedLambda), - @"UnsupportedIdentityProviderException" : @(AWSCognitoIdentityProviderErrorUnsupportedIdentityProvider), - @"UnsupportedUserStateException" : @(AWSCognitoIdentityProviderErrorUnsupportedUserState), - @"UserImportInProgressException" : @(AWSCognitoIdentityProviderErrorUserImportInProgress), - @"UserLambdaValidationException" : @(AWSCognitoIdentityProviderErrorUserLambdaValidation), - @"UserNotConfirmedException" : @(AWSCognitoIdentityProviderErrorUserNotConfirmed), - @"UserNotFoundException" : @(AWSCognitoIdentityProviderErrorUserNotFound), - @"UserPoolAddOnNotEnabledException" : @(AWSCognitoIdentityProviderErrorUserPoolAddOnNotEnabled), - @"UserPoolTaggingException" : @(AWSCognitoIdentityProviderErrorUserPoolTagging), - @"UsernameExistsException" : @(AWSCognitoIdentityProviderErrorUsernameExists), - }; -} - -#pragma mark - - -- (id)responseObjectForResponse:(NSHTTPURLResponse *)response - originalRequest:(NSURLRequest *)originalRequest - currentRequest:(NSURLRequest *)currentRequest - data:(id)data - error:(NSError *__autoreleasing *)error { - id responseObject = [super responseObjectForResponse:response - originalRequest:originalRequest - currentRequest:currentRequest - data:data - error:error]; - if (!*error && [responseObject isKindOfClass:[NSDictionary class]]) { - if (!*error && [responseObject isKindOfClass:[NSDictionary class]]) { - if ([errorCodeDictionary objectForKey:[[[responseObject objectForKey:@"__type"] componentsSeparatedByString:@"#"] lastObject]]) { - if (error) { - *error = [NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain - code:[[errorCodeDictionary objectForKey:[[[responseObject objectForKey:@"__type"] componentsSeparatedByString:@"#"] lastObject]] integerValue] - userInfo:responseObject]; - } - return responseObject; - } else if ([[[responseObject objectForKey:@"__type"] componentsSeparatedByString:@"#"] lastObject]) { - if (error) { - *error = [NSError errorWithDomain:AWSCognitoIdentityErrorDomain - code:AWSCognitoIdentityErrorUnknown - userInfo:responseObject]; - } - return responseObject; - } - } - } - - if (!*error && response.statusCode/100 != 2) { - *error = [NSError errorWithDomain:AWSCognitoIdentityProviderErrorDomain - code:AWSCognitoIdentityProviderErrorUnknown - userInfo:nil]; - } - - if (!*error && [responseObject isKindOfClass:[NSDictionary class]]) { - if (self.outputClass) { - responseObject = [AWSMTLJSONAdapter modelOfClass:self.outputClass - fromJSONDictionary:responseObject - error:error]; - } - } - - return responseObject; -} - -@end - -@interface AWSCognitoIdentityProviderRequestRetryHandler : AWSURLRequestRetryHandler - -@end - -@implementation AWSCognitoIdentityProviderRequestRetryHandler - -@end - -@interface AWSRequest() - -@property (nonatomic, strong) AWSNetworkingRequest *internalRequest; - -@end - -@interface AWSCognitoIdentityProvider() - -@property (nonatomic, strong) AWSNetworking *networking; -@property (nonatomic, strong) AWSServiceConfiguration *configuration; - -@end - -@interface AWSServiceConfiguration() - -@property (nonatomic, strong) AWSEndpoint *endpoint; - -@end - -@interface AWSEndpoint() - -- (void) setRegion:(AWSRegionType)regionType service:(AWSServiceType)serviceType; - -@end - -@implementation AWSCognitoIdentityProvider - -+ (void)initialize { - [super initialize]; - - if (![AWSiOSSDKVersion isEqualToString:AWSCognitoIdentityProviderSDKVersion]) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:[NSString stringWithFormat:@"AWSCore and AWSCognitoIdentityProvider versions need to match. Check your SDK installation. AWSCore: %@ AWSCognitoIdentityProvider: %@", AWSiOSSDKVersion, AWSCognitoIdentityProviderSDKVersion] - userInfo:nil]; - } -} - -#pragma mark - Setup - -static AWSSynchronizedMutableDictionary *_serviceClients = nil; - -+ (instancetype)defaultCognitoIdentityProvider { - static AWSCognitoIdentityProvider *_defaultCognitoIdentityProvider = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - AWSServiceConfiguration *serviceConfiguration = nil; - AWSServiceInfo *serviceInfo = [[AWSInfo defaultAWSInfo] defaultServiceInfo:AWSInfoCognitoIdentityProvider]; - if (serviceInfo) { - serviceConfiguration = [[AWSServiceConfiguration alloc] initWithRegion:serviceInfo.region - credentialsProvider:serviceInfo.cognitoCredentialsProvider]; - } - - if (!serviceConfiguration) { - serviceConfiguration = [AWSServiceManager defaultServiceManager].defaultServiceConfiguration; - } - - if (!serviceConfiguration) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"The service configuration is `nil`. You need to configure `awsconfiguration.json`, `Info.plist` or set `defaultServiceConfiguration` before using this method." - userInfo:nil]; - } - _defaultCognitoIdentityProvider = [[AWSCognitoIdentityProvider alloc] initWithConfiguration:serviceConfiguration]; - }); - - return _defaultCognitoIdentityProvider; -} - -+ (void)registerCognitoIdentityProviderWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _serviceClients = [AWSSynchronizedMutableDictionary new]; - }); - [_serviceClients setObject:[[AWSCognitoIdentityProvider alloc] initWithConfiguration:configuration] - forKey:key]; -} - -+ (instancetype)CognitoIdentityProviderForKey:(NSString *)key { - @synchronized(self) { - AWSCognitoIdentityProvider *serviceClient = [_serviceClients objectForKey:key]; - if (serviceClient) { - return serviceClient; - } - - AWSServiceInfo *serviceInfo = [[AWSInfo defaultAWSInfo] serviceInfo:AWSInfoCognitoIdentityProvider - forKey:key]; - if (serviceInfo) { - AWSServiceConfiguration *serviceConfiguration = [[AWSServiceConfiguration alloc] initWithRegion:serviceInfo.region - credentialsProvider:serviceInfo.cognitoCredentialsProvider]; - [AWSCognitoIdentityProvider registerCognitoIdentityProviderWithConfiguration:serviceConfiguration - forKey:key]; - } - - return [_serviceClients objectForKey:key]; - } -} - -+ (void)removeCognitoIdentityProviderForKey:(NSString *)key { - [_serviceClients removeObjectForKey:key]; -} - -- (instancetype)init { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"`- init` is not a valid initializer. Use `+ defaultCognitoIdentityProvider` or `+ CognitoIdentityProviderForKey:` instead." - userInfo:nil]; - return nil; -} - -#pragma mark - - -- (instancetype)initWithConfiguration:(AWSServiceConfiguration *)configuration { - if (self = [super init]) { - _configuration = [configuration copy]; - - if(!configuration.endpoint){ - _configuration.endpoint = [[AWSEndpoint alloc] initWithRegion:_configuration.regionType - service:AWSServiceCognitoIdentityProvider - useUnsafeURL:NO]; - }else{ - [_configuration.endpoint setRegion:_configuration.regionType - service:AWSServiceCognitoIdentityProvider]; - } - - AWSSignatureV4Signer *signer = [[AWSSignatureV4Signer alloc] initWithCredentialsProvider:_configuration.credentialsProvider - endpoint:_configuration.endpoint]; - AWSNetworkingRequestInterceptor *baseInterceptor = [[AWSNetworkingRequestInterceptor alloc] initWithUserAgent:_configuration.userAgent]; - _configuration.requestInterceptors = @[baseInterceptor, signer]; - - _configuration.baseURL = _configuration.endpoint.URL; - _configuration.retryHandler = [[AWSCognitoIdentityProviderRequestRetryHandler alloc] initWithMaximumRetryCount:_configuration.maxRetryCount]; - _configuration.headers = @{@"Content-Type" : @"application/x-amz-json-1.1"}; - - _networking = [[AWSNetworking alloc] initWithConfiguration:_configuration]; - } - - return self; -} - -- (AWSTask *)invokeRequest:(AWSRequest *)request - HTTPMethod:(AWSHTTPMethod)HTTPMethod - URLString:(NSString *) URLString - targetPrefix:(NSString *)targetPrefix - operationName:(NSString *)operationName - outputClass:(Class)outputClass { - - @autoreleasepool { - if (!request) { - request = [AWSRequest new]; - } - - AWSNetworkingRequest *networkingRequest = request.internalRequest; - if (request) { - networkingRequest.parameters = [[AWSMTLJSONAdapter JSONDictionaryFromModel:request] aws_removeNullValues]; - } else { - networkingRequest.parameters = @{}; - } - - NSMutableDictionary *headers = [NSMutableDictionary new]; - headers[@"X-Amz-Target"] = [NSString stringWithFormat:@"%@.%@", targetPrefix, operationName]; - networkingRequest.headers = headers; - networkingRequest.HTTPMethod = HTTPMethod; - networkingRequest.requestSerializer = [[AWSJSONRequestSerializer alloc] initWithJSONDefinition:[[AWSCognitoIdentityProviderResources sharedInstance] JSONObject] - actionName:operationName]; - networkingRequest.responseSerializer = [[AWSCognitoIdentityProviderResponseSerializer alloc] initWithJSONDefinition:[[AWSCognitoIdentityProviderResources sharedInstance] JSONObject] - actionName:operationName - outputClass:outputClass]; - - return [self.networking sendRequest:networkingRequest]; - } -} - -#pragma mark - Service method - -- (AWSTask *)addCustomAttributes:(AWSCognitoIdentityProviderAddCustomAttributesRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AddCustomAttributes" - outputClass:[AWSCognitoIdentityProviderAddCustomAttributesResponse class]]; -} - -- (void)addCustomAttributes:(AWSCognitoIdentityProviderAddCustomAttributesRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAddCustomAttributesResponse *response, NSError *error))completionHandler { - [[self addCustomAttributes:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAddCustomAttributesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminAddUserToGroup:(AWSCognitoIdentityProviderAdminAddUserToGroupRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminAddUserToGroup" - outputClass:nil]; -} - -- (void)adminAddUserToGroup:(AWSCognitoIdentityProviderAdminAddUserToGroupRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self adminAddUserToGroup:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)adminConfirmSignUp:(AWSCognitoIdentityProviderAdminConfirmSignUpRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminConfirmSignUp" - outputClass:[AWSCognitoIdentityProviderAdminConfirmSignUpResponse class]]; -} - -- (void)adminConfirmSignUp:(AWSCognitoIdentityProviderAdminConfirmSignUpRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminConfirmSignUpResponse *response, NSError *error))completionHandler { - [[self adminConfirmSignUp:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminConfirmSignUpResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminCreateUser:(AWSCognitoIdentityProviderAdminCreateUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminCreateUser" - outputClass:[AWSCognitoIdentityProviderAdminCreateUserResponse class]]; -} - -- (void)adminCreateUser:(AWSCognitoIdentityProviderAdminCreateUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminCreateUserResponse *response, NSError *error))completionHandler { - [[self adminCreateUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminCreateUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminDeleteUser:(AWSCognitoIdentityProviderAdminDeleteUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminDeleteUser" - outputClass:nil]; -} - -- (void)adminDeleteUser:(AWSCognitoIdentityProviderAdminDeleteUserRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self adminDeleteUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)adminDeleteUserAttributes:(AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminDeleteUserAttributes" - outputClass:[AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse class]]; -} - -- (void)adminDeleteUserAttributes:(AWSCognitoIdentityProviderAdminDeleteUserAttributesRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse *response, NSError *error))completionHandler { - [[self adminDeleteUserAttributes:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminDeleteUserAttributesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminDisableProviderForUser:(AWSCognitoIdentityProviderAdminDisableProviderForUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminDisableProviderForUser" - outputClass:[AWSCognitoIdentityProviderAdminDisableProviderForUserResponse class]]; -} - -- (void)adminDisableProviderForUser:(AWSCognitoIdentityProviderAdminDisableProviderForUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminDisableProviderForUserResponse *response, NSError *error))completionHandler { - [[self adminDisableProviderForUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminDisableProviderForUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminDisableUser:(AWSCognitoIdentityProviderAdminDisableUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminDisableUser" - outputClass:[AWSCognitoIdentityProviderAdminDisableUserResponse class]]; -} - -- (void)adminDisableUser:(AWSCognitoIdentityProviderAdminDisableUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminDisableUserResponse *response, NSError *error))completionHandler { - [[self adminDisableUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminDisableUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminEnableUser:(AWSCognitoIdentityProviderAdminEnableUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminEnableUser" - outputClass:[AWSCognitoIdentityProviderAdminEnableUserResponse class]]; -} - -- (void)adminEnableUser:(AWSCognitoIdentityProviderAdminEnableUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminEnableUserResponse *response, NSError *error))completionHandler { - [[self adminEnableUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminEnableUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminForgetDevice:(AWSCognitoIdentityProviderAdminForgetDeviceRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminForgetDevice" - outputClass:nil]; -} - -- (void)adminForgetDevice:(AWSCognitoIdentityProviderAdminForgetDeviceRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self adminForgetDevice:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)adminGetDevice:(AWSCognitoIdentityProviderAdminGetDeviceRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminGetDevice" - outputClass:[AWSCognitoIdentityProviderAdminGetDeviceResponse class]]; -} - -- (void)adminGetDevice:(AWSCognitoIdentityProviderAdminGetDeviceRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminGetDeviceResponse *response, NSError *error))completionHandler { - [[self adminGetDevice:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminGetDeviceResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminGetUser:(AWSCognitoIdentityProviderAdminGetUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminGetUser" - outputClass:[AWSCognitoIdentityProviderAdminGetUserResponse class]]; -} - -- (void)adminGetUser:(AWSCognitoIdentityProviderAdminGetUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminGetUserResponse *response, NSError *error))completionHandler { - [[self adminGetUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminGetUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminInitiateAuth:(AWSCognitoIdentityProviderAdminInitiateAuthRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminInitiateAuth" - outputClass:[AWSCognitoIdentityProviderAdminInitiateAuthResponse class]]; -} - -- (void)adminInitiateAuth:(AWSCognitoIdentityProviderAdminInitiateAuthRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminInitiateAuthResponse *response, NSError *error))completionHandler { - [[self adminInitiateAuth:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminInitiateAuthResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminLinkProviderForUser:(AWSCognitoIdentityProviderAdminLinkProviderForUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminLinkProviderForUser" - outputClass:[AWSCognitoIdentityProviderAdminLinkProviderForUserResponse class]]; -} - -- (void)adminLinkProviderForUser:(AWSCognitoIdentityProviderAdminLinkProviderForUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminLinkProviderForUserResponse *response, NSError *error))completionHandler { - [[self adminLinkProviderForUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminLinkProviderForUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminListDevices:(AWSCognitoIdentityProviderAdminListDevicesRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminListDevices" - outputClass:[AWSCognitoIdentityProviderAdminListDevicesResponse class]]; -} - -- (void)adminListDevices:(AWSCognitoIdentityProviderAdminListDevicesRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminListDevicesResponse *response, NSError *error))completionHandler { - [[self adminListDevices:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminListDevicesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminListGroupsForUser:(AWSCognitoIdentityProviderAdminListGroupsForUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminListGroupsForUser" - outputClass:[AWSCognitoIdentityProviderAdminListGroupsForUserResponse class]]; -} - -- (void)adminListGroupsForUser:(AWSCognitoIdentityProviderAdminListGroupsForUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminListGroupsForUserResponse *response, NSError *error))completionHandler { - [[self adminListGroupsForUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminListGroupsForUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminListUserAuthEvents:(AWSCognitoIdentityProviderAdminListUserAuthEventsRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminListUserAuthEvents" - outputClass:[AWSCognitoIdentityProviderAdminListUserAuthEventsResponse class]]; -} - -- (void)adminListUserAuthEvents:(AWSCognitoIdentityProviderAdminListUserAuthEventsRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminListUserAuthEventsResponse *response, NSError *error))completionHandler { - [[self adminListUserAuthEvents:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminListUserAuthEventsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminRemoveUserFromGroup:(AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminRemoveUserFromGroup" - outputClass:nil]; -} - -- (void)adminRemoveUserFromGroup:(AWSCognitoIdentityProviderAdminRemoveUserFromGroupRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self adminRemoveUserFromGroup:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)adminResetUserPassword:(AWSCognitoIdentityProviderAdminResetUserPasswordRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminResetUserPassword" - outputClass:[AWSCognitoIdentityProviderAdminResetUserPasswordResponse class]]; -} - -- (void)adminResetUserPassword:(AWSCognitoIdentityProviderAdminResetUserPasswordRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminResetUserPasswordResponse *response, NSError *error))completionHandler { - [[self adminResetUserPassword:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminResetUserPasswordResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminRespondToAuthChallenge:(AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminRespondToAuthChallenge" - outputClass:[AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse class]]; -} - -- (void)adminRespondToAuthChallenge:(AWSCognitoIdentityProviderAdminRespondToAuthChallengeRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse *response, NSError *error))completionHandler { - [[self adminRespondToAuthChallenge:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminRespondToAuthChallengeResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminSetUserMFAPreference:(AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminSetUserMFAPreference" - outputClass:[AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse class]]; -} - -- (void)adminSetUserMFAPreference:(AWSCognitoIdentityProviderAdminSetUserMFAPreferenceRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse *response, NSError *error))completionHandler { - [[self adminSetUserMFAPreference:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminSetUserMFAPreferenceResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminSetUserSettings:(AWSCognitoIdentityProviderAdminSetUserSettingsRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminSetUserSettings" - outputClass:[AWSCognitoIdentityProviderAdminSetUserSettingsResponse class]]; -} - -- (void)adminSetUserSettings:(AWSCognitoIdentityProviderAdminSetUserSettingsRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminSetUserSettingsResponse *response, NSError *error))completionHandler { - [[self adminSetUserSettings:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminSetUserSettingsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminUpdateAuthEventFeedback:(AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminUpdateAuthEventFeedback" - outputClass:[AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse class]]; -} - -- (void)adminUpdateAuthEventFeedback:(AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse *response, NSError *error))completionHandler { - [[self adminUpdateAuthEventFeedback:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminUpdateAuthEventFeedbackResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminUpdateDeviceStatus:(AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminUpdateDeviceStatus" - outputClass:[AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse class]]; -} - -- (void)adminUpdateDeviceStatus:(AWSCognitoIdentityProviderAdminUpdateDeviceStatusRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse *response, NSError *error))completionHandler { - [[self adminUpdateDeviceStatus:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminUpdateDeviceStatusResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminUpdateUserAttributes:(AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminUpdateUserAttributes" - outputClass:[AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse class]]; -} - -- (void)adminUpdateUserAttributes:(AWSCognitoIdentityProviderAdminUpdateUserAttributesRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse *response, NSError *error))completionHandler { - [[self adminUpdateUserAttributes:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminUpdateUserAttributesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)adminUserGlobalSignOut:(AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AdminUserGlobalSignOut" - outputClass:[AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse class]]; -} - -- (void)adminUserGlobalSignOut:(AWSCognitoIdentityProviderAdminUserGlobalSignOutRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse *response, NSError *error))completionHandler { - [[self adminUserGlobalSignOut:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAdminUserGlobalSignOutResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)associateSoftwareToken:(AWSCognitoIdentityProviderAssociateSoftwareTokenRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"AssociateSoftwareToken" - outputClass:[AWSCognitoIdentityProviderAssociateSoftwareTokenResponse class]]; -} - -- (void)associateSoftwareToken:(AWSCognitoIdentityProviderAssociateSoftwareTokenRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderAssociateSoftwareTokenResponse *response, NSError *error))completionHandler { - [[self associateSoftwareToken:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderAssociateSoftwareTokenResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)changePassword:(AWSCognitoIdentityProviderChangePasswordRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ChangePassword" - outputClass:[AWSCognitoIdentityProviderChangePasswordResponse class]]; -} - -- (void)changePassword:(AWSCognitoIdentityProviderChangePasswordRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderChangePasswordResponse *response, NSError *error))completionHandler { - [[self changePassword:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderChangePasswordResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)confirmDevice:(AWSCognitoIdentityProviderConfirmDeviceRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ConfirmDevice" - outputClass:[AWSCognitoIdentityProviderConfirmDeviceResponse class]]; -} - -- (void)confirmDevice:(AWSCognitoIdentityProviderConfirmDeviceRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderConfirmDeviceResponse *response, NSError *error))completionHandler { - [[self confirmDevice:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderConfirmDeviceResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)confirmForgotPassword:(AWSCognitoIdentityProviderConfirmForgotPasswordRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ConfirmForgotPassword" - outputClass:[AWSCognitoIdentityProviderConfirmForgotPasswordResponse class]]; -} - -- (void)confirmForgotPassword:(AWSCognitoIdentityProviderConfirmForgotPasswordRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderConfirmForgotPasswordResponse *response, NSError *error))completionHandler { - [[self confirmForgotPassword:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderConfirmForgotPasswordResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)confirmSignUp:(AWSCognitoIdentityProviderConfirmSignUpRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ConfirmSignUp" - outputClass:[AWSCognitoIdentityProviderConfirmSignUpResponse class]]; -} - -- (void)confirmSignUp:(AWSCognitoIdentityProviderConfirmSignUpRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderConfirmSignUpResponse *response, NSError *error))completionHandler { - [[self confirmSignUp:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderConfirmSignUpResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)createGroup:(AWSCognitoIdentityProviderCreateGroupRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"CreateGroup" - outputClass:[AWSCognitoIdentityProviderCreateGroupResponse class]]; -} - -- (void)createGroup:(AWSCognitoIdentityProviderCreateGroupRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderCreateGroupResponse *response, NSError *error))completionHandler { - [[self createGroup:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderCreateGroupResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)createIdentityProvider:(AWSCognitoIdentityProviderCreateIdentityProviderRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"CreateIdentityProvider" - outputClass:[AWSCognitoIdentityProviderCreateIdentityProviderResponse class]]; -} - -- (void)createIdentityProvider:(AWSCognitoIdentityProviderCreateIdentityProviderRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderCreateIdentityProviderResponse *response, NSError *error))completionHandler { - [[self createIdentityProvider:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderCreateIdentityProviderResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)createResourceServer:(AWSCognitoIdentityProviderCreateResourceServerRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"CreateResourceServer" - outputClass:[AWSCognitoIdentityProviderCreateResourceServerResponse class]]; -} - -- (void)createResourceServer:(AWSCognitoIdentityProviderCreateResourceServerRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderCreateResourceServerResponse *response, NSError *error))completionHandler { - [[self createResourceServer:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderCreateResourceServerResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)createUserImportJob:(AWSCognitoIdentityProviderCreateUserImportJobRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"CreateUserImportJob" - outputClass:[AWSCognitoIdentityProviderCreateUserImportJobResponse class]]; -} - -- (void)createUserImportJob:(AWSCognitoIdentityProviderCreateUserImportJobRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderCreateUserImportJobResponse *response, NSError *error))completionHandler { - [[self createUserImportJob:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderCreateUserImportJobResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)createUserPool:(AWSCognitoIdentityProviderCreateUserPoolRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"CreateUserPool" - outputClass:[AWSCognitoIdentityProviderCreateUserPoolResponse class]]; -} - -- (void)createUserPool:(AWSCognitoIdentityProviderCreateUserPoolRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderCreateUserPoolResponse *response, NSError *error))completionHandler { - [[self createUserPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderCreateUserPoolResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)createUserPoolClient:(AWSCognitoIdentityProviderCreateUserPoolClientRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"CreateUserPoolClient" - outputClass:[AWSCognitoIdentityProviderCreateUserPoolClientResponse class]]; -} - -- (void)createUserPoolClient:(AWSCognitoIdentityProviderCreateUserPoolClientRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderCreateUserPoolClientResponse *response, NSError *error))completionHandler { - [[self createUserPoolClient:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderCreateUserPoolClientResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)createUserPoolDomain:(AWSCognitoIdentityProviderCreateUserPoolDomainRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"CreateUserPoolDomain" - outputClass:[AWSCognitoIdentityProviderCreateUserPoolDomainResponse class]]; -} - -- (void)createUserPoolDomain:(AWSCognitoIdentityProviderCreateUserPoolDomainRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderCreateUserPoolDomainResponse *response, NSError *error))completionHandler { - [[self createUserPoolDomain:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderCreateUserPoolDomainResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteGroup:(AWSCognitoIdentityProviderDeleteGroupRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteGroup" - outputClass:nil]; -} - -- (void)deleteGroup:(AWSCognitoIdentityProviderDeleteGroupRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self deleteGroup:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteIdentityProvider:(AWSCognitoIdentityProviderDeleteIdentityProviderRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteIdentityProvider" - outputClass:nil]; -} - -- (void)deleteIdentityProvider:(AWSCognitoIdentityProviderDeleteIdentityProviderRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self deleteIdentityProvider:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteResourceServer:(AWSCognitoIdentityProviderDeleteResourceServerRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteResourceServer" - outputClass:nil]; -} - -- (void)deleteResourceServer:(AWSCognitoIdentityProviderDeleteResourceServerRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self deleteResourceServer:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteUser:(AWSCognitoIdentityProviderDeleteUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteUser" - outputClass:nil]; -} - -- (void)deleteUser:(AWSCognitoIdentityProviderDeleteUserRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self deleteUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteUserAttributes:(AWSCognitoIdentityProviderDeleteUserAttributesRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteUserAttributes" - outputClass:[AWSCognitoIdentityProviderDeleteUserAttributesResponse class]]; -} - -- (void)deleteUserAttributes:(AWSCognitoIdentityProviderDeleteUserAttributesRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDeleteUserAttributesResponse *response, NSError *error))completionHandler { - [[self deleteUserAttributes:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDeleteUserAttributesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteUserPool:(AWSCognitoIdentityProviderDeleteUserPoolRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteUserPool" - outputClass:nil]; -} - -- (void)deleteUserPool:(AWSCognitoIdentityProviderDeleteUserPoolRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self deleteUserPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteUserPoolClient:(AWSCognitoIdentityProviderDeleteUserPoolClientRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteUserPoolClient" - outputClass:nil]; -} - -- (void)deleteUserPoolClient:(AWSCognitoIdentityProviderDeleteUserPoolClientRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self deleteUserPoolClient:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteUserPoolDomain:(AWSCognitoIdentityProviderDeleteUserPoolDomainRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DeleteUserPoolDomain" - outputClass:[AWSCognitoIdentityProviderDeleteUserPoolDomainResponse class]]; -} - -- (void)deleteUserPoolDomain:(AWSCognitoIdentityProviderDeleteUserPoolDomainRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDeleteUserPoolDomainResponse *response, NSError *error))completionHandler { - [[self deleteUserPoolDomain:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDeleteUserPoolDomainResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeIdentityProvider:(AWSCognitoIdentityProviderDescribeIdentityProviderRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DescribeIdentityProvider" - outputClass:[AWSCognitoIdentityProviderDescribeIdentityProviderResponse class]]; -} - -- (void)describeIdentityProvider:(AWSCognitoIdentityProviderDescribeIdentityProviderRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDescribeIdentityProviderResponse *response, NSError *error))completionHandler { - [[self describeIdentityProvider:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDescribeIdentityProviderResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeResourceServer:(AWSCognitoIdentityProviderDescribeResourceServerRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DescribeResourceServer" - outputClass:[AWSCognitoIdentityProviderDescribeResourceServerResponse class]]; -} - -- (void)describeResourceServer:(AWSCognitoIdentityProviderDescribeResourceServerRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDescribeResourceServerResponse *response, NSError *error))completionHandler { - [[self describeResourceServer:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDescribeResourceServerResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeRiskConfiguration:(AWSCognitoIdentityProviderDescribeRiskConfigurationRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DescribeRiskConfiguration" - outputClass:[AWSCognitoIdentityProviderDescribeRiskConfigurationResponse class]]; -} - -- (void)describeRiskConfiguration:(AWSCognitoIdentityProviderDescribeRiskConfigurationRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDescribeRiskConfigurationResponse *response, NSError *error))completionHandler { - [[self describeRiskConfiguration:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDescribeRiskConfigurationResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeUserImportJob:(AWSCognitoIdentityProviderDescribeUserImportJobRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DescribeUserImportJob" - outputClass:[AWSCognitoIdentityProviderDescribeUserImportJobResponse class]]; -} - -- (void)describeUserImportJob:(AWSCognitoIdentityProviderDescribeUserImportJobRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDescribeUserImportJobResponse *response, NSError *error))completionHandler { - [[self describeUserImportJob:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDescribeUserImportJobResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeUserPool:(AWSCognitoIdentityProviderDescribeUserPoolRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DescribeUserPool" - outputClass:[AWSCognitoIdentityProviderDescribeUserPoolResponse class]]; -} - -- (void)describeUserPool:(AWSCognitoIdentityProviderDescribeUserPoolRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDescribeUserPoolResponse *response, NSError *error))completionHandler { - [[self describeUserPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDescribeUserPoolResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeUserPoolClient:(AWSCognitoIdentityProviderDescribeUserPoolClientRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DescribeUserPoolClient" - outputClass:[AWSCognitoIdentityProviderDescribeUserPoolClientResponse class]]; -} - -- (void)describeUserPoolClient:(AWSCognitoIdentityProviderDescribeUserPoolClientRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDescribeUserPoolClientResponse *response, NSError *error))completionHandler { - [[self describeUserPoolClient:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDescribeUserPoolClientResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeUserPoolDomain:(AWSCognitoIdentityProviderDescribeUserPoolDomainRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"DescribeUserPoolDomain" - outputClass:[AWSCognitoIdentityProviderDescribeUserPoolDomainResponse class]]; -} - -- (void)describeUserPoolDomain:(AWSCognitoIdentityProviderDescribeUserPoolDomainRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderDescribeUserPoolDomainResponse *response, NSError *error))completionHandler { - [[self describeUserPoolDomain:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderDescribeUserPoolDomainResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)forgetDevice:(AWSCognitoIdentityProviderForgetDeviceRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ForgetDevice" - outputClass:nil]; -} - -- (void)forgetDevice:(AWSCognitoIdentityProviderForgetDeviceRequest *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self forgetDevice:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)forgotPassword:(AWSCognitoIdentityProviderForgotPasswordRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ForgotPassword" - outputClass:[AWSCognitoIdentityProviderForgotPasswordResponse class]]; -} - -- (void)forgotPassword:(AWSCognitoIdentityProviderForgotPasswordRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderForgotPasswordResponse *response, NSError *error))completionHandler { - [[self forgotPassword:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderForgotPasswordResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getCSVHeader:(AWSCognitoIdentityProviderGetCSVHeaderRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetCSVHeader" - outputClass:[AWSCognitoIdentityProviderGetCSVHeaderResponse class]]; -} - -- (void)getCSVHeader:(AWSCognitoIdentityProviderGetCSVHeaderRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetCSVHeaderResponse *response, NSError *error))completionHandler { - [[self getCSVHeader:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetCSVHeaderResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getDevice:(AWSCognitoIdentityProviderGetDeviceRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetDevice" - outputClass:[AWSCognitoIdentityProviderGetDeviceResponse class]]; -} - -- (void)getDevice:(AWSCognitoIdentityProviderGetDeviceRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetDeviceResponse *response, NSError *error))completionHandler { - [[self getDevice:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetDeviceResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getGroup:(AWSCognitoIdentityProviderGetGroupRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetGroup" - outputClass:[AWSCognitoIdentityProviderGetGroupResponse class]]; -} - -- (void)getGroup:(AWSCognitoIdentityProviderGetGroupRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetGroupResponse *response, NSError *error))completionHandler { - [[self getGroup:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetGroupResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getIdentityProviderByIdentifier:(AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetIdentityProviderByIdentifier" - outputClass:[AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse class]]; -} - -- (void)getIdentityProviderByIdentifier:(AWSCognitoIdentityProviderGetIdentityProviderByIdentifierRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse *response, NSError *error))completionHandler { - [[self getIdentityProviderByIdentifier:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetIdentityProviderByIdentifierResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getSigningCertificate:(AWSCognitoIdentityProviderGetSigningCertificateRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetSigningCertificate" - outputClass:[AWSCognitoIdentityProviderGetSigningCertificateResponse class]]; -} - -- (void)getSigningCertificate:(AWSCognitoIdentityProviderGetSigningCertificateRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetSigningCertificateResponse *response, NSError *error))completionHandler { - [[self getSigningCertificate:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetSigningCertificateResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getUICustomization:(AWSCognitoIdentityProviderGetUICustomizationRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetUICustomization" - outputClass:[AWSCognitoIdentityProviderGetUICustomizationResponse class]]; -} - -- (void)getUICustomization:(AWSCognitoIdentityProviderGetUICustomizationRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetUICustomizationResponse *response, NSError *error))completionHandler { - [[self getUICustomization:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetUICustomizationResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getUser:(AWSCognitoIdentityProviderGetUserRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetUser" - outputClass:[AWSCognitoIdentityProviderGetUserResponse class]]; -} - -- (void)getUser:(AWSCognitoIdentityProviderGetUserRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetUserResponse *response, NSError *error))completionHandler { - [[self getUser:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetUserResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getUserAttributeVerificationCode:(AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetUserAttributeVerificationCode" - outputClass:[AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse class]]; -} - -- (void)getUserAttributeVerificationCode:(AWSCognitoIdentityProviderGetUserAttributeVerificationCodeRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse *response, NSError *error))completionHandler { - [[self getUserAttributeVerificationCode:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetUserAttributeVerificationCodeResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getUserPoolMfaConfig:(AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GetUserPoolMfaConfig" - outputClass:[AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse class]]; -} - -- (void)getUserPoolMfaConfig:(AWSCognitoIdentityProviderGetUserPoolMfaConfigRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse *response, NSError *error))completionHandler { - [[self getUserPoolMfaConfig:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGetUserPoolMfaConfigResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)globalSignOut:(AWSCognitoIdentityProviderGlobalSignOutRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"GlobalSignOut" - outputClass:[AWSCognitoIdentityProviderGlobalSignOutResponse class]]; -} - -- (void)globalSignOut:(AWSCognitoIdentityProviderGlobalSignOutRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderGlobalSignOutResponse *response, NSError *error))completionHandler { - [[self globalSignOut:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderGlobalSignOutResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)initiateAuth:(AWSCognitoIdentityProviderInitiateAuthRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"InitiateAuth" - outputClass:[AWSCognitoIdentityProviderInitiateAuthResponse class]]; -} - -- (void)initiateAuth:(AWSCognitoIdentityProviderInitiateAuthRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderInitiateAuthResponse *response, NSError *error))completionHandler { - [[self initiateAuth:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderInitiateAuthResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listDevices:(AWSCognitoIdentityProviderListDevicesRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListDevices" - outputClass:[AWSCognitoIdentityProviderListDevicesResponse class]]; -} - -- (void)listDevices:(AWSCognitoIdentityProviderListDevicesRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListDevicesResponse *response, NSError *error))completionHandler { - [[self listDevices:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListDevicesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listGroups:(AWSCognitoIdentityProviderListGroupsRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListGroups" - outputClass:[AWSCognitoIdentityProviderListGroupsResponse class]]; -} - -- (void)listGroups:(AWSCognitoIdentityProviderListGroupsRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListGroupsResponse *response, NSError *error))completionHandler { - [[self listGroups:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListGroupsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listIdentityProviders:(AWSCognitoIdentityProviderListIdentityProvidersRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListIdentityProviders" - outputClass:[AWSCognitoIdentityProviderListIdentityProvidersResponse class]]; -} - -- (void)listIdentityProviders:(AWSCognitoIdentityProviderListIdentityProvidersRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListIdentityProvidersResponse *response, NSError *error))completionHandler { - [[self listIdentityProviders:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListIdentityProvidersResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listResourceServers:(AWSCognitoIdentityProviderListResourceServersRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListResourceServers" - outputClass:[AWSCognitoIdentityProviderListResourceServersResponse class]]; -} - -- (void)listResourceServers:(AWSCognitoIdentityProviderListResourceServersRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListResourceServersResponse *response, NSError *error))completionHandler { - [[self listResourceServers:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListResourceServersResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listUserImportJobs:(AWSCognitoIdentityProviderListUserImportJobsRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListUserImportJobs" - outputClass:[AWSCognitoIdentityProviderListUserImportJobsResponse class]]; -} - -- (void)listUserImportJobs:(AWSCognitoIdentityProviderListUserImportJobsRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListUserImportJobsResponse *response, NSError *error))completionHandler { - [[self listUserImportJobs:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListUserImportJobsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listUserPoolClients:(AWSCognitoIdentityProviderListUserPoolClientsRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListUserPoolClients" - outputClass:[AWSCognitoIdentityProviderListUserPoolClientsResponse class]]; -} - -- (void)listUserPoolClients:(AWSCognitoIdentityProviderListUserPoolClientsRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListUserPoolClientsResponse *response, NSError *error))completionHandler { - [[self listUserPoolClients:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListUserPoolClientsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listUserPools:(AWSCognitoIdentityProviderListUserPoolsRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListUserPools" - outputClass:[AWSCognitoIdentityProviderListUserPoolsResponse class]]; -} - -- (void)listUserPools:(AWSCognitoIdentityProviderListUserPoolsRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListUserPoolsResponse *response, NSError *error))completionHandler { - [[self listUserPools:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListUserPoolsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listUsers:(AWSCognitoIdentityProviderListUsersRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListUsers" - outputClass:[AWSCognitoIdentityProviderListUsersResponse class]]; -} - -- (void)listUsers:(AWSCognitoIdentityProviderListUsersRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListUsersResponse *response, NSError *error))completionHandler { - [[self listUsers:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListUsersResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listUsersInGroup:(AWSCognitoIdentityProviderListUsersInGroupRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ListUsersInGroup" - outputClass:[AWSCognitoIdentityProviderListUsersInGroupResponse class]]; -} - -- (void)listUsersInGroup:(AWSCognitoIdentityProviderListUsersInGroupRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderListUsersInGroupResponse *response, NSError *error))completionHandler { - [[self listUsersInGroup:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderListUsersInGroupResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)resendConfirmationCode:(AWSCognitoIdentityProviderResendConfirmationCodeRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"ResendConfirmationCode" - outputClass:[AWSCognitoIdentityProviderResendConfirmationCodeResponse class]]; -} - -- (void)resendConfirmationCode:(AWSCognitoIdentityProviderResendConfirmationCodeRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderResendConfirmationCodeResponse *response, NSError *error))completionHandler { - [[self resendConfirmationCode:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderResendConfirmationCodeResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)respondToAuthChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"RespondToAuthChallenge" - outputClass:[AWSCognitoIdentityProviderRespondToAuthChallengeResponse class]]; -} - -- (void)respondToAuthChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderRespondToAuthChallengeResponse *response, NSError *error))completionHandler { - [[self respondToAuthChallenge:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderRespondToAuthChallengeResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)setRiskConfiguration:(AWSCognitoIdentityProviderSetRiskConfigurationRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"SetRiskConfiguration" - outputClass:[AWSCognitoIdentityProviderSetRiskConfigurationResponse class]]; -} - -- (void)setRiskConfiguration:(AWSCognitoIdentityProviderSetRiskConfigurationRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderSetRiskConfigurationResponse *response, NSError *error))completionHandler { - [[self setRiskConfiguration:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderSetRiskConfigurationResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)setUICustomization:(AWSCognitoIdentityProviderSetUICustomizationRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"SetUICustomization" - outputClass:[AWSCognitoIdentityProviderSetUICustomizationResponse class]]; -} - -- (void)setUICustomization:(AWSCognitoIdentityProviderSetUICustomizationRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderSetUICustomizationResponse *response, NSError *error))completionHandler { - [[self setUICustomization:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderSetUICustomizationResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)setUserMFAPreference:(AWSCognitoIdentityProviderSetUserMFAPreferenceRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"SetUserMFAPreference" - outputClass:[AWSCognitoIdentityProviderSetUserMFAPreferenceResponse class]]; -} - -- (void)setUserMFAPreference:(AWSCognitoIdentityProviderSetUserMFAPreferenceRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderSetUserMFAPreferenceResponse *response, NSError *error))completionHandler { - [[self setUserMFAPreference:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderSetUserMFAPreferenceResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)setUserPoolMfaConfig:(AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"SetUserPoolMfaConfig" - outputClass:[AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse class]]; -} - -- (void)setUserPoolMfaConfig:(AWSCognitoIdentityProviderSetUserPoolMfaConfigRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse *response, NSError *error))completionHandler { - [[self setUserPoolMfaConfig:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderSetUserPoolMfaConfigResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)setUserSettings:(AWSCognitoIdentityProviderSetUserSettingsRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"SetUserSettings" - outputClass:[AWSCognitoIdentityProviderSetUserSettingsResponse class]]; -} - -- (void)setUserSettings:(AWSCognitoIdentityProviderSetUserSettingsRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderSetUserSettingsResponse *response, NSError *error))completionHandler { - [[self setUserSettings:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderSetUserSettingsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)signUp:(AWSCognitoIdentityProviderSignUpRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"SignUp" - outputClass:[AWSCognitoIdentityProviderSignUpResponse class]]; -} - -- (void)signUp:(AWSCognitoIdentityProviderSignUpRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderSignUpResponse *response, NSError *error))completionHandler { - [[self signUp:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderSignUpResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)startUserImportJob:(AWSCognitoIdentityProviderStartUserImportJobRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"StartUserImportJob" - outputClass:[AWSCognitoIdentityProviderStartUserImportJobResponse class]]; -} - -- (void)startUserImportJob:(AWSCognitoIdentityProviderStartUserImportJobRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderStartUserImportJobResponse *response, NSError *error))completionHandler { - [[self startUserImportJob:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderStartUserImportJobResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)stopUserImportJob:(AWSCognitoIdentityProviderStopUserImportJobRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"StopUserImportJob" - outputClass:[AWSCognitoIdentityProviderStopUserImportJobResponse class]]; -} - -- (void)stopUserImportJob:(AWSCognitoIdentityProviderStopUserImportJobRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderStopUserImportJobResponse *response, NSError *error))completionHandler { - [[self stopUserImportJob:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderStopUserImportJobResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateAuthEventFeedback:(AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateAuthEventFeedback" - outputClass:[AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse class]]; -} - -- (void)updateAuthEventFeedback:(AWSCognitoIdentityProviderUpdateAuthEventFeedbackRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse *response, NSError *error))completionHandler { - [[self updateAuthEventFeedback:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateAuthEventFeedbackResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateDeviceStatus:(AWSCognitoIdentityProviderUpdateDeviceStatusRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateDeviceStatus" - outputClass:[AWSCognitoIdentityProviderUpdateDeviceStatusResponse class]]; -} - -- (void)updateDeviceStatus:(AWSCognitoIdentityProviderUpdateDeviceStatusRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateDeviceStatusResponse *response, NSError *error))completionHandler { - [[self updateDeviceStatus:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateDeviceStatusResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateGroup:(AWSCognitoIdentityProviderUpdateGroupRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateGroup" - outputClass:[AWSCognitoIdentityProviderUpdateGroupResponse class]]; -} - -- (void)updateGroup:(AWSCognitoIdentityProviderUpdateGroupRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateGroupResponse *response, NSError *error))completionHandler { - [[self updateGroup:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateGroupResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateIdentityProvider:(AWSCognitoIdentityProviderUpdateIdentityProviderRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateIdentityProvider" - outputClass:[AWSCognitoIdentityProviderUpdateIdentityProviderResponse class]]; -} - -- (void)updateIdentityProvider:(AWSCognitoIdentityProviderUpdateIdentityProviderRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateIdentityProviderResponse *response, NSError *error))completionHandler { - [[self updateIdentityProvider:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateIdentityProviderResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateResourceServer:(AWSCognitoIdentityProviderUpdateResourceServerRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateResourceServer" - outputClass:[AWSCognitoIdentityProviderUpdateResourceServerResponse class]]; -} - -- (void)updateResourceServer:(AWSCognitoIdentityProviderUpdateResourceServerRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateResourceServerResponse *response, NSError *error))completionHandler { - [[self updateResourceServer:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateResourceServerResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateUserAttributes:(AWSCognitoIdentityProviderUpdateUserAttributesRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateUserAttributes" - outputClass:[AWSCognitoIdentityProviderUpdateUserAttributesResponse class]]; -} - -- (void)updateUserAttributes:(AWSCognitoIdentityProviderUpdateUserAttributesRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateUserAttributesResponse *response, NSError *error))completionHandler { - [[self updateUserAttributes:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateUserAttributesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateUserPool:(AWSCognitoIdentityProviderUpdateUserPoolRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateUserPool" - outputClass:[AWSCognitoIdentityProviderUpdateUserPoolResponse class]]; -} - -- (void)updateUserPool:(AWSCognitoIdentityProviderUpdateUserPoolRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateUserPoolResponse *response, NSError *error))completionHandler { - [[self updateUserPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateUserPoolResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateUserPoolClient:(AWSCognitoIdentityProviderUpdateUserPoolClientRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateUserPoolClient" - outputClass:[AWSCognitoIdentityProviderUpdateUserPoolClientResponse class]]; -} - -- (void)updateUserPoolClient:(AWSCognitoIdentityProviderUpdateUserPoolClientRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateUserPoolClientResponse *response, NSError *error))completionHandler { - [[self updateUserPoolClient:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateUserPoolClientResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)updateUserPoolDomain:(AWSCognitoIdentityProviderUpdateUserPoolDomainRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"UpdateUserPoolDomain" - outputClass:[AWSCognitoIdentityProviderUpdateUserPoolDomainResponse class]]; -} - -- (void)updateUserPoolDomain:(AWSCognitoIdentityProviderUpdateUserPoolDomainRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderUpdateUserPoolDomainResponse *response, NSError *error))completionHandler { - [[self updateUserPoolDomain:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderUpdateUserPoolDomainResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)verifySoftwareToken:(AWSCognitoIdentityProviderVerifySoftwareTokenRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"VerifySoftwareToken" - outputClass:[AWSCognitoIdentityProviderVerifySoftwareTokenResponse class]]; -} - -- (void)verifySoftwareToken:(AWSCognitoIdentityProviderVerifySoftwareTokenRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderVerifySoftwareTokenResponse *response, NSError *error))completionHandler { - [[self verifySoftwareToken:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderVerifySoftwareTokenResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)verifyUserAttribute:(AWSCognitoIdentityProviderVerifyUserAttributeRequest *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityProviderService" - operationName:@"VerifyUserAttribute" - outputClass:[AWSCognitoIdentityProviderVerifyUserAttributeResponse class]]; -} - -- (void)verifyUserAttribute:(AWSCognitoIdentityProviderVerifyUserAttributeRequest *)request - completionHandler:(void (^)(AWSCognitoIdentityProviderVerifyUserAttributeResponse *response, NSError *error))completionHandler { - [[self verifyUserAttribute:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityProviderVerifyUserAttributeResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -#pragma mark - - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderHKDF.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderHKDF.h deleted file mode 100644 index 399ce3f..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderHKDF.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import - -NS_ASSUME_NONNULL_BEGIN -@interface AWSCognitoIdentityProviderHKDF : NSObject -+ (NSData*)deriveKeyWithInputKeyingMaterial:(NSData*)ikm salt:(NSData*)salt info:(NSData*)info outputLength:(NSUInteger)outputLength; -@end -NS_ASSUME_NONNULL_END \ No newline at end of file diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderHKDF.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderHKDF.m deleted file mode 100644 index 148daf4..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderHKDF.m +++ /dev/null @@ -1,80 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import "AWSCognitoIdentityProviderHKDF.h" - -#import -#import -#import - - -@interface AWSCognitoIdentityProviderHKDF () -+ (NSData*)extractWithInputKeyingMaterial:(NSData*)ikm salt:(NSData*)salt; -+ (NSData*)expand:(NSData*)prk info:(NSData*)info outputLength:(NSUInteger)outputLength; -@end - -//https://tools.ietf.org/html/rfc5869 -@implementation AWSCognitoIdentityProviderHKDF - -+ (NSData*)deriveKeyWithInputKeyingMaterial:(NSData*)ikm salt:(NSData*)salt info:(NSData*)info outputLength:(NSUInteger)outputLength { - NSData *prk = [self extractWithInputKeyingMaterial:ikm salt:salt]; - return [self expand:prk info:info outputLength:outputLength]; -} - -+ (NSData*)extractWithInputKeyingMaterial:(NSData*)ikm salt:(NSData*)salt { - uint8_t output[CC_SHA256_DIGEST_LENGTH] = {0}; - - CCHmac(kCCHmacAlgSHA256, - [salt bytes], [salt length], - [ikm bytes], [ikm length], - output); - - return [NSData dataWithBytes:output length:CC_SHA256_DIGEST_LENGTH]; -} - -NSData* calculateT(NSData *prk, NSData *previousT, NSData *info, uint8_t i) { - CCHmacContext ctx; - CCHmacInit(&ctx, kCCHmacAlgSHA256, [prk bytes], [prk length]); - CCHmacUpdate(&ctx, [previousT bytes], [previousT length]); - if (info != nil) { - CCHmacUpdate(&ctx, [info bytes], [info length]); - } - CCHmacUpdate(&ctx, &i, sizeof(uint8_t)); - - uint8_t output[CC_SHA256_DIGEST_LENGTH]; - CCHmacFinal(&ctx, output); - - return [NSData dataWithBytes:output length:sizeof(output)]; -} - -+ (NSData*)expand:(NSData*)prk info:(NSData*)info outputLength:(NSUInteger)outputLength { - - NSUInteger n = (NSUInteger)ceil((double)outputLength / CC_SHA256_DIGEST_LENGTH); - NSMutableData *outputKeyMaterial = [NSMutableData data]; - - NSData *previousT = [NSData data]; - for (NSUInteger i = 0; i < n; i++) { - NSData *T = calculateT(prk, previousT, info, i+1); - [outputKeyMaterial appendData:T]; - previousT = [T copy]; - } - return [NSData dataWithData:[outputKeyMaterial subdataWithRange:NSMakeRange(0, outputLength)]]; -} - -@end - - diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderSrpHelper.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderSrpHelper.h deleted file mode 100644 index a2a9b18..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderSrpHelper.h +++ /dev/null @@ -1,115 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@class AWSJKBigInteger; - -/* State shared between client and server */ -@interface AWSCognitoIdentityProviderSrpCommonState : NSObject -- (instancetype)init; -- (instancetype)initN:(AWSJKBigInteger *)N g:(AWSJKBigInteger *)g; -- (instancetype)initN:(AWSJKBigInteger *)N g:(AWSJKBigInteger *)g k:(AWSJKBigInteger *)k; -- (AWSJKBigInteger*)calculateK:(AWSJKBigInteger*)N g:(AWSJKBigInteger*)g; - -@property(nonatomic, retain) AWSJKBigInteger *N; -@property(nonatomic, retain) AWSJKBigInteger *g; -@property(nonatomic, retain) AWSJKBigInteger *k; -@end - -@interface AWSCognitoIdentityProviderSrpClientState : NSObject -+ (instancetype)clientStateForUserName:(NSString*)userName - password:(NSString*)password - commonState:(AWSCognitoIdentityProviderSrpCommonState*)commonState; - -+ (instancetype)clientStateForUserName:(NSString*)userName - password:(NSString*)password - privateA:(AWSJKBigInteger*)privateA - publicA:(AWSJKBigInteger*)publicA; - -@property(nonatomic, strong) NSString *userName; -@property(nonatomic, strong) NSString *password; -@property(nonatomic, strong) AWSJKBigInteger *privateA; -@property(nonatomic, strong) AWSJKBigInteger *publicA; -@property(nonatomic, strong) NSDate* timestamp; -@end - - -@interface AWSCognitoIdentityProviderSrpServerState : NSObject - -+ (instancetype)serverStateForPoolName:(NSString*)poolName - publicBHexString:(NSString*)publicBHexString - saltHexString:(NSString*)saltHexString - derivedKeyInfo:(const NSString*)derivedKeyInfo - derivedKeySize:(NSInteger)derivedKeyLength - serviceSecretBlock:(NSData*)serviceSecretBlock; - -@property(nonatomic, strong) NSString *poolName; -@property(nonatomic, strong) AWSJKBigInteger *publicB; -@property(nonatomic, strong) AWSJKBigInteger *salt; -@property(nonatomic, strong) NSString *derivedKeyInfo; -@property(nonatomic) NSInteger derivedKeyLength; -// Opaque service state pass-through -@property(nonatomic, strong) NSData *serviceSecretBlock; -@end - -@interface AWSCognitoIdentityProviderSrpHelper : NSObject - -@property(nonatomic, strong) AWSCognitoIdentityProviderSrpCommonState *commonState; -@property(nonatomic, strong) AWSCognitoIdentityProviderSrpClientState *clientState; -@property(nonatomic, strong) AWSCognitoIdentityProviderSrpServerState *serverState; - -#pragma mark - Intermediate results -@property(nonatomic, strong) AWSJKBigInteger *x; -@property(nonatomic, strong) AWSJKBigInteger *u; -@property(nonatomic, strong) AWSJKBigInteger *S; -@property(nonatomic, strong) NSData *authenticationKey; - -#pragma mark - Generating password verifier -@property(nonatomic, strong) AWSJKBigInteger *salt; -@property(nonatomic, strong) AWSJKBigInteger *v; - - -+ (instancetype)beginUserAuthentication:(NSString*)userName - password:(NSString*)password; - -- (instancetype)init:(NSString *)userName password:(NSString *)password; -- (instancetype)initWithClientState:(AWSCognitoIdentityProviderSrpClientState *)clientState; -- (instancetype)initWithPoolName:(NSString *)poolName userName:(NSString *)userName password:(NSString *)password; - -- (NSData*)completeAuthentication:(AWSCognitoIdentityProviderSrpServerState*)serverState; - -- (AWSJKBigInteger*)calculateS:(AWSCognitoIdentityProviderSrpServerState*)serverState; - -- (NSData*)generatePasswordAuthenticationKey; -- (NSData*)generateUserAuthenticationSignature; - -+ (NSData*)calculateXHash:(NSString*)userPool userName:(NSString*)userName password:(NSString*)password salt:(AWSJKBigInteger*)salt; -+ (AWSJKBigInteger*) calculateX:(NSString*)userPool userName:(NSString*)userName password:(NSString*)password salt:(AWSJKBigInteger*)salt; - -+ (AWSJKBigInteger*) generatePrivateABigInt:(AWSJKBigInteger*)N; -+ (AWSJKBigInteger*) generatePublicABigInt:(AWSJKBigInteger*)privateA N:(AWSJKBigInteger*)N g:(AWSJKBigInteger*)g; -+ (NSString*) generateDateString:(NSDate *)date; - -+ (AWSJKBigInteger*) hashSignedBigInts:(NSArray*)bigInts; -+ (AWSJKBigInteger*) hashBigInts:(NSArray*)bigInts; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderSrpHelper.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderSrpHelper.m deleted file mode 100644 index 4f4436d..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityProviderSrpHelper.m +++ /dev/null @@ -1,475 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import "AWSCognitoIdentityProviderSrpHelper.h" -#import "AWSCognitoIdentityProviderHKDF.h" -#import "AWSJKBigInteger.h" -#import "AWSCocoaLumberjack.h" -#import -#import -#import -#import - -#import "NSData+AWSCognitoIdentityProvider.h" - -void updateHashWithUnsignedBigInt(CC_SHA256_CTX *ctx, AWSJKBigInteger *bigInt, uint8_t *buffer, size_t bufferSize); -void updateHashWithSignedBigInt(CC_SHA256_CTX *ctx, AWSJKBigInteger *bigInt, uint8_t *buffer, size_t bufferSize); -AWSJKBigInteger* finalizeUnsignedBigIntHash(CC_SHA256_CTX *ctx); -AWSJKBigInteger* finalizeSignedBigIntHash(CC_SHA256_CTX *ctx); - -static NSString* N_IN_HEX = @"FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A637ED6B0BFF5CB6F406B7EDEE386BFB5A899FA5AE9F24117C4B1FE649286651ECE45B3DC2007CB8A163BF0598DA48361C55D39A69163FA8FD24CF5F83655D23DCA3AD961C62F356208552BB9ED529077096966D670C354E4ABC9804F1746C08CA18217C32905E462E36CE3BE39E772C180E86039B2783A2EC07A28FB5C55DF06F4C52C9DE2BCBF6955817183995497CEA956AE515D2261898FA051015728E5A8AAAC42DAD33170D04507A33A85521ABDF1CBA64ECFB850458DBEF0A8AEA71575D060C7DB3970F85A6E1E4C7ABF5AE8CDB0933D71E8C94E04A25619DCEE3D2261AD2EE6BF12FFA06D98A0864D87602733EC86A64521F2B18177B200CBBE117577A615D6C770988C0BAD946E208E24FA074E5AB3143DB5BFCE0FD108E4B82D120A93AD2CAFFFFFFFFFFFFFFFF"; - -#pragma mark - Srp State -@implementation AWSCognitoIdentityProviderSrpCommonState -- (instancetype)init { - if (self = [super init]) { - self.N = [[AWSJKBigInteger alloc] initWithString:N_IN_HEX - andRadix:16]; - - self.g = [[AWSJKBigInteger alloc] initWithUnsignedLong:2l]; - self.k = [self calculateK:self.N g:self.g]; - } - return self; -} - -- (instancetype)initN:(AWSJKBigInteger *)N g:(AWSJKBigInteger *)g k:(AWSJKBigInteger *)k { - if (self = [super init]) { - self.N = N; - self.g = g; - self.k = k; - } - return self; -} - -- (instancetype)initN:(AWSJKBigInteger *)N g:(AWSJKBigInteger *)g { - if (self = [super init]) { - self.N = N; - self.g = g; - self.k = [self calculateK:self.N g:self.g]; - } - return self; -} - -- (AWSJKBigInteger*)calculateK:(AWSJKBigInteger*)N g:(AWSJKBigInteger*)g { - - // + 1 to allow for a sign byte - unsigned int maxNumBytes = [N countBytes] + 1; - - uint8_t *bytes = malloc(sizeof(uint8_t) * maxNumBytes); - if (bytes == NULL) { - // this situation is irrecoverable and we don't want to return something corrupted, so we raise an exception (avoiding NSAssert that may be disabled) - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - - CC_SHA256_CTX ctx; - CC_SHA256_Init(&ctx); - updateHashWithSignedBigInt(&ctx, N, bytes, maxNumBytes); - updateHashWithUnsignedBigInt(&ctx, g, bytes, maxNumBytes); - - free(bytes); - - return finalizeUnsignedBigIntHash(&ctx); -} -@end - -@implementation AWSCognitoIdentityProviderSrpClientState - -+ (instancetype)clientStateForUserName:(NSString*)userName - password:(NSString*)password - commonState:(AWSCognitoIdentityProviderSrpCommonState *)commonState { - - AWSCognitoIdentityProviderSrpClientState* me = [[AWSCognitoIdentityProviderSrpClientState alloc] init]; - me.userName = userName; - me.password = password; - - me.privateA = [AWSCognitoIdentityProviderSrpHelper - generatePrivateABigInt:commonState.N]; - - me.publicA = [AWSCognitoIdentityProviderSrpHelper - generatePublicABigInt:me.privateA - N:commonState.N - g:commonState.g]; - - me.timestamp = [NSDate date]; - return me; -} -+ (instancetype)clientStateForUserName:(NSString *)userName - password:(NSString*)password - privateA:(AWSJKBigInteger*)privateA - publicA:(AWSJKBigInteger*)publicA { - - AWSCognitoIdentityProviderSrpClientState* me = [[AWSCognitoIdentityProviderSrpClientState alloc] init]; - me.userName = userName; - me.password = password; - me.privateA = privateA; - me.publicA = publicA; - me.timestamp = [NSDate date]; - return me; -} - -@end - -@implementation AWSCognitoIdentityProviderSrpServerState -+ (instancetype)serverStateForPoolName:(NSString*)poolName - publicBHexString:(NSString*)publicBHexString - saltHexString:(NSString*)saltHexString - derivedKeyInfo:(NSString*)derivedKeyInfo - derivedKeySize:(NSInteger)derivedKeyLength - serviceSecretBlock:(NSData*)serviceSecretBlock { - - AWSCognitoIdentityProviderSrpServerState *serverState =[[AWSCognitoIdentityProviderSrpServerState alloc] init]; - - serverState.poolName = poolName; - serverState.publicB = [[AWSJKBigInteger alloc] initWithString:publicBHexString andRadix:16]; - serverState.salt = [[AWSJKBigInteger alloc] initWithString:saltHexString andRadix:16]; - serverState.derivedKeyInfo = derivedKeyInfo; - serverState.derivedKeyLength = derivedKeyLength; - serverState.serviceSecretBlock = serviceSecretBlock; - - return serverState; -} -@end - -#pragma mark - Srp Helper - -@implementation AWSCognitoIdentityProviderSrpHelper { -} - -#pragma mark - Static Factory Initializers -// Step 1 (or an initializer) -+ (instancetype)beginUserAuthentication:(NSString*)userName - password:(NSString*)password { - return [[AWSCognitoIdentityProviderSrpHelper alloc] - init:userName - password:password - ]; -} - -#pragma mark - Initializers -- (instancetype) init:(NSString*)userName - password:(NSString*)password { - if (self = [super init]) { - self.commonState = [[AWSCognitoIdentityProviderSrpCommonState alloc] init]; - - AWSJKBigInteger *privateA = [AWSCognitoIdentityProviderSrpHelper generatePrivateABigInt:self.commonState.N]; - AWSJKBigInteger *publicA = [AWSCognitoIdentityProviderSrpHelper generatePublicABigInt:privateA N:self.commonState.N g:self.commonState.g]; - - self.clientState = [AWSCognitoIdentityProviderSrpClientState - clientStateForUserName:userName password:password privateA:privateA publicA:publicA]; - } - return self; -} - -- (instancetype)initWithClientState:(AWSCognitoIdentityProviderSrpClientState *)clientState { - if (self = [super init]) { - self.commonState = [[AWSCognitoIdentityProviderSrpCommonState alloc] init]; - self.clientState = clientState; - } - return self; -} - -- (instancetype)initWithPoolName:(NSString *)poolName userName:(NSString *)userName password:(NSString *)password { - if (self = [super init]) { - self.salt = [AWSCognitoIdentityProviderSrpHelper generateRandomUnsignedBigInt:128]; - - AWSJKBigInteger *x = [AWSCognitoIdentityProviderSrpHelper - calculateX:poolName - userName:userName - password:password - salt:self.salt]; - - AWSJKBigInteger *N = [[AWSJKBigInteger alloc] initWithString:N_IN_HEX - andRadix:16]; - AWSJKBigInteger *g = [[AWSJKBigInteger alloc] initWithUnsignedLong:2l]; - - //calculate v - self.v = [g pow:x andMod:N]; - } - return self; -} - -// Step 2 -#pragma mark - Compute -- (NSData*)completeAuthentication:(AWSCognitoIdentityProviderSrpServerState*)serverState { - self.serverState = serverState; - self.S = [self calculateS:serverState]; - [self generatePasswordAuthenticationKey]; - return [self generateUserAuthenticationSignature]; -} - -#pragma mark - Helpers -+ (AWSJKBigInteger *)generateRandomUnsignedBigInt:(size_t)bitLength { - size_t aBitLength = bitLength; - size_t aByteLength = aBitLength/8; - uint8_t *aBytes = malloc(aByteLength); - if (aBytes == NULL && aByteLength > 0) { - // this situation is irrecoverable and we don't want to return something corrupted, so we raise an exception (avoiding NSAssert that may be disabled) - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - int functionExitCode = SecRandomCopyBytes(kSecRandomDefault, aByteLength, aBytes); - if (functionExitCode < 0) { - AWSDDLogError(@"SecRandomCopyBytes failed with error code %d: %s", errno, strerror(errno)); - } - - aws_mp_int random; - aws_mp_init(&random); - aws_mp_read_unsigned_bin(&random, aBytes, (int)aByteLength); - - //random is copied - AWSJKBigInteger *result = [[AWSJKBigInteger alloc] initWithValue:&random]; - aws_mp_clear(&random); - free(aBytes); - - return result; -} - -- (NSData*) generateUserAuthenticationSignature { - - NSString *dateStr = [AWSCognitoIdentityProviderSrpHelper generateDateString:self.clientState.timestamp]; - NSMutableData *hashOutput = [NSMutableData dataWithLength:CC_SHA256_DIGEST_LENGTH]; - - CCHmacContext ctx; - CCHmacInit(&ctx, kCCHmacAlgSHA256, self.authenticationKey.bytes, self.authenticationKey.length); - CCHmacUpdate(&ctx, self.serverState.poolName.UTF8String, (CC_LONG)[self.serverState.poolName lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - CCHmacUpdate(&ctx, self.clientState.userName.UTF8String, (CC_LONG)[self.clientState.userName lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - CCHmacUpdate(&ctx, self.serverState.serviceSecretBlock.bytes, self.serverState.serviceSecretBlock.length); - CCHmacUpdate(&ctx, dateStr.UTF8String, (CC_LONG)[dateStr lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - CCHmacFinal(&ctx, hashOutput.mutableBytes); - - return [NSData dataWithData:hashOutput]; -} - -- (NSData*)generatePasswordAuthenticationKey { - - self.authenticationKey = [AWSCognitoIdentityProviderHKDF - deriveKeyWithInputKeyingMaterial:[NSData aws_dataWithSignedBigInteger:self.S] - salt:[NSData aws_dataWithSignedBigInteger:self.u] - info:[self.serverState.derivedKeyInfo dataUsingEncoding:NSUTF8StringEncoding] - outputLength:(NSUInteger) self.serverState.derivedKeyLength]; - - return self.authenticationKey; -} - -- (AWSJKBigInteger*)calculateS:(AWSCognitoIdentityProviderSrpServerState*)serverState { - // S = ((B-kg^x)^(a+ux))%N - - AWSJKBigInteger *B = serverState.publicB; - - self.x = [AWSCognitoIdentityProviderSrpHelper - calculateX:serverState.poolName - userName:self.clientState.userName - password:self.clientState.password - salt:serverState.salt]; - - self.u = [AWSCognitoIdentityProviderSrpHelper hashBigInts:@[self.clientState.publicA, B]]; - - AWSJKBigInteger *k = self.commonState.k; - AWSJKBigInteger *g = self.commonState.g; - AWSJKBigInteger *N = self.commonState.N; - - AWSJKBigInteger *a = self.clientState.privateA; - AWSJKBigInteger *exp = [a add:[self.u multiply:self.x]]; - AWSJKBigInteger *base = [B subtract:[k multiply:[g pow:self.x andMod:N]]]; - - //Need this for negative base #s - base = [AWSCognitoIdentityProviderSrpHelper mod:base divisor:N]; - - AWSJKBigInteger *S = [base pow:exp andMod:N]; - S = [AWSCognitoIdentityProviderSrpHelper mod:S divisor:N]; - - return S; -} - -+ (NSString *)generateDateString:(NSDate *)date { - NSTimeZone *timeZone = [NSTimeZone timeZoneWithName:@"UTC"]; - NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init]; - dateFormatter.timeZone = timeZone; - dateFormatter.dateFormat = @"EEE MMM d HH:mm:ss 'UTC' yyyy"; - dateFormatter.locale = [[NSLocale alloc] initWithLocaleIdentifier:@"en_US_POSIX"]; - return [dateFormatter stringFromDate:date]; -} - -+ (AWSJKBigInteger*) generatePrivateABigInt:(AWSJKBigInteger*)N { - //TODO Directory: revisit bits used here. Should match Caldera, and they changed it recently - return [self mod:[AWSCognitoIdentityProviderSrpHelper generateRandomUnsignedBigInt:256] divisor:N]; -} - -+ (AWSJKBigInteger*) generatePublicABigInt:(AWSJKBigInteger*)privateA N:(AWSJKBigInteger*)N g:(AWSJKBigInteger*)g { - AWSJKBigInteger *publicA = [g pow:privateA andMod:N]; - return publicA; -} - -+ (AWSJKBigInteger*) mod:(AWSJKBigInteger*)dividend divisor:(AWSJKBigInteger*) divisor { - return [[divisor add:[dividend remainder:divisor]] remainder:divisor]; -} - -#pragma mark - Hashing - -+ (AWSJKBigInteger*) hashSignedBigInts:(NSArray*)bigInts { - CC_SHA256_CTX ctx; - CC_SHA256_Init(&ctx); - - for (AWSJKBigInteger *i in bigInts) { - NSData *data = [NSData aws_dataWithSignedBigInteger:i]; - CC_SHA256_Update(&ctx, data.bytes, (CC_LONG)data.length); - } - - return finalizeSignedBigIntHash(&ctx); -} - -void updateHashWithUnsignedBigInt(CC_SHA256_CTX *ctx, AWSJKBigInteger *bigInt, uint8_t *buffer, size_t bufferSize) { - unsigned int byteCount = [bigInt countBytes]; - uint8_t *targetBuffer = buffer; - - if (byteCount <= bufferSize) { - targetBuffer = malloc(sizeof(uint8_t) * byteCount); - } - - [bigInt toByteArrayUnsigned:targetBuffer]; - CC_SHA256_Update(ctx, targetBuffer, byteCount); - - if (targetBuffer != buffer) { - free(targetBuffer); - } -} - -void updateHashWithSignedBigInt(CC_SHA256_CTX *ctx, AWSJKBigInteger *bigInt, uint8_t *buffer, size_t bufferSize) { - // + 1 to allow for a sign byte TODO: add a function to JKBigInteger to provide a countBytesForSigned - unsigned int byteCount = [bigInt countBytes] + 1; - uint8_t *targetBuffer = buffer; - - if (byteCount <= bufferSize) { - targetBuffer = malloc(sizeof(uint8_t) * byteCount); - } - - [bigInt toByteArraySigned:targetBuffer]; - CC_SHA256_Update(ctx, targetBuffer, byteCount); - - if (targetBuffer != buffer) { - free(targetBuffer); - } -} - -AWSJKBigInteger* finalizeUnsignedBigIntHash(CC_SHA256_CTX *ctx) { - uint8_t hash[CC_SHA256_DIGEST_LENGTH]; - CC_SHA256_Final(hash, ctx); - - aws_mp_int hashBigInt; - aws_mp_init(&hashBigInt); - aws_mp_read_unsigned_bin(&hashBigInt, hash, CC_SHA256_DIGEST_LENGTH); - - AWSJKBigInteger *result = [[AWSJKBigInteger alloc] initWithValue:&hashBigInt]; - aws_mp_clear(&hashBigInt); - - return result; -} - -AWSJKBigInteger* finalizeSignedBigIntHash(CC_SHA256_CTX *ctx) { - int bufferLength = CC_SHA256_DIGEST_LENGTH+1; - uint8_t hash[bufferLength]; - // hash goes in [1..CC_SHA256_DIGEST_LENGTH; keep hash[0] for the sign byte required by AWSJKBigInteger - CC_SHA256_Final(hash+1, ctx); - - AWSJKBigInteger *twosComplementMinusOneMaybe = nil; - hash[0] = (hash[1] & 0x80) == 0x80; - if (hash[0]) { //two's complement; need to convert to unsigned - - twosComplementMinusOneMaybe = [[AWSJKBigInteger alloc] initWithString:@"-1"]; - - for( int i = 1; i < bufferLength; i++) { - hash[i] = ~hash[i]; - } - } else { - twosComplementMinusOneMaybe = [[AWSJKBigInteger alloc] initWithString:@"0"]; - } - - aws_mp_int hashBigInt; - aws_mp_init(&hashBigInt); - aws_mp_read_signed_bin(&hashBigInt, hash, bufferLength); - - AWSJKBigInteger *result = [[AWSJKBigInteger alloc] initWithValue:&hashBigInt]; - result = [result add:twosComplementMinusOneMaybe]; - - aws_mp_clear(&hashBigInt); - - return result; - -} - -+ (NSData*)calculateXHash:(NSString*)userPool userName:(NSString*)userName password:(NSString*)password salt:(AWSJKBigInteger*)salt { - uint8_t identityHash[CC_SHA256_DIGEST_LENGTH]; - - CC_SHA256_CTX identityHashCtx; - CC_SHA256_Init(&identityHashCtx); - CC_SHA256_Update(&identityHashCtx, [userPool UTF8String], (CC_LONG)[userPool lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - CC_SHA256_Update(&identityHashCtx, [userName UTF8String], (CC_LONG)[userName lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - const uint8_t delim = ':'; - CC_SHA256_Update(&identityHashCtx, &delim, sizeof(delim)); - CC_SHA256_Update(&identityHashCtx, [password UTF8String], (CC_LONG)[password lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - CC_SHA256_Final(identityHash, &identityHashCtx); - - NSData *saltData = [NSData aws_dataWithSignedBigInteger:salt]; - - uint8_t finalHash[CC_SHA256_DIGEST_LENGTH]; - CC_SHA256_CTX ctx; - CC_SHA256_Init(&ctx); - CC_SHA256_Update(&ctx, saltData.bytes, (CC_LONG)saltData.length); - CC_SHA256_Update(&ctx, identityHash, sizeof(identityHash)); - CC_SHA256_Final(finalHash, &ctx); - return [NSData dataWithBytes:finalHash length:CC_SHA256_DIGEST_LENGTH]; -} - -+ (AWSJKBigInteger*) calculateX:(NSString*)userPool userName:(NSString*)userName password:(NSString*)password salt:(AWSJKBigInteger*)salt { - - uint8_t identityHash[CC_SHA256_DIGEST_LENGTH]; - - CC_SHA256_CTX identityHashCtx; - CC_SHA256_Init(&identityHashCtx); - CC_SHA256_Update(&identityHashCtx, userPool.UTF8String, (CC_LONG)[userPool lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - CC_SHA256_Update(&identityHashCtx, userName.UTF8String, (CC_LONG)[userName lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - const uint8_t delim = ':'; - CC_SHA256_Update(&identityHashCtx, &delim, sizeof(delim)); - CC_SHA256_Update(&identityHashCtx, password.UTF8String, (CC_LONG)[password lengthOfBytesUsingEncoding:NSUTF8StringEncoding]); - CC_SHA256_Final(identityHash, &identityHashCtx); - - NSData *saltData = [NSData aws_dataWithSignedBigInteger:salt]; - CC_SHA256_CTX ctx; - CC_SHA256_Init(&ctx); - CC_SHA256_Update(&ctx, saltData.bytes, (CC_LONG)saltData.length); - CC_SHA256_Update(&ctx, identityHash, sizeof(identityHash)); - - - return finalizeUnsignedBigIntHash(&ctx); -} - -+ (AWSJKBigInteger*) hashBigInts:(NSArray*)bigInts { - CC_SHA256_CTX ctx; - CC_SHA256_Init(&ctx); - - for (AWSJKBigInteger *i in bigInts) { - NSData *data = [NSData aws_dataWithSignedBigInteger:i]; - CC_SHA256_Update(&ctx, data.bytes, (CC_LONG)data.length); - } - - return finalizeUnsignedBigIntHash(&ctx); -} - -@end - - diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityUserPool_Internal.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityUserPool_Internal.h deleted file mode 100644 index 10af055..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityUserPool_Internal.h +++ /dev/null @@ -1,50 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import -#import "AWSCognitoIdentityUserPool.h" - -@class AWSUICKeyChainStore; - -@interface AWSCognitoIdentityUserPool() -@property (nonatomic, strong) AWSUICKeyChainStore * _Nonnull keychain; -@property (nonatomic, readonly) AWSCognitoIdentityProviderAnalyticsMetadataType * _Nullable analyticsMetadata; - -- (NSString * _Nullable) calculateSecretHash: (NSString* _Nonnull) userName; -- (void) setCurrentUser:(NSString * _Nullable) username; -- (NSDictionary* _Nonnull)getValidationData:(NSArray* _Nullable)devProvidedValidationData; -- (AWSCognitoIdentityProviderUserContextDataType * _Nonnull) userContextData: (NSString * _Nonnull) username deviceId:(NSString * _Nullable) deviceId; -- (NSString* _Nullable) currentUsername; -- (NSString* _Nonnull) strippedPoolId; -@end - -@interface AWSCognitoIdentityUserPoolSignUpResponse() -@property (nonatomic, strong) AWSCognitoIdentityUser* _Nonnull user; -@end - - -@interface AWSCognitoIdentityPasswordAuthenticationInput() -@property(nonatomic,strong) NSString * _Nullable lastKnownUsername; -- (instancetype _Nonnull ) initWithLastKnownUsername:(NSString *_Nullable)lastKnownUsername; -@end - -@interface AWSCognitoIdentityMultifactorAuthenticationInput() -@property(nonatomic, strong) NSString * _Nullable destination; -@property(nonatomic, assign) AWSCognitoIdentityProviderDeliveryMediumType deliveryMedium; --(instancetype _Nonnull ) initWithDeliveryMedium: (NSString *_Nonnull) deliveryMedium destination:(NSString *_Nullable) destination; -@end - diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityUser_Internal.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityUser_Internal.h deleted file mode 100644 index 60c2c47..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/AWSCognitoIdentityUser_Internal.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import "AWSCognitoIdentityUser.h" - -@interface AWSCognitoIdentityUserSessionToken() -@property (nonatomic, strong) NSString * tokenString; --(instancetype) initWithToken:(NSString *)token; -@end - -@interface AWSCognitoIdentityUserSession() -@property (nonatomic, strong) AWSCognitoIdentityUserSessionToken * idToken; -@property (nonatomic, strong) AWSCognitoIdentityUserSessionToken * accessToken; -@property (nonatomic, strong) AWSCognitoIdentityUserSessionToken * refreshToken; -@property (nonatomic, strong) NSDate * expirationTime; --(instancetype) initWithIdToken: (NSString *)idToken accessToken:(NSString *) accessToken refreshToken:(NSString *) refreshToken expirationTime:(NSDate*) expirationTime; --(instancetype) initWithIdToken: (NSString *)idToken accessToken:(NSString *) accessToken refreshToken:(NSString *) refreshToken expiresIn:(NSNumber*) expiresIn; -@end - -@interface AWSCognitoIdentityUser() -@property (nonatomic, strong) NSString* username; -@property (nonatomic, assign) AWSCognitoIdentityUserStatus confirmedStatus; -@property (nonatomic, strong) AWSCognitoIdentityUserPool* pool; -@property (nonatomic, strong) NSString* userIdForSRP; --(instancetype) initWithUsername: (NSString *)username pool:(AWSCognitoIdentityUserPool *)pool; -- (NSString *) asfDeviceId; -@end - -@interface AWSCognitoIdentityUserMFAOption() -- (AWSCognitoIdentityProviderMFAOptionType *) mfaOptionTypeValue; -@end - -@interface AWSCognitoIdentityUserDeviceCredentials : NSObject -@property (nonatomic, strong) AWSCognitoIdentityUser* user; -@property (nonatomic, strong) NSString * deviceId; -@property (nonatomic, strong) NSString * deviceSecret; -@property (nonatomic, strong) NSString * deviceGroup; --(instancetype) initWithUser: (AWSCognitoIdentityUser *)user; -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigDecimal.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigDecimal.h deleted file mode 100644 index 54de4d1..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigDecimal.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// AWSJKBigDecimal.h -// AWSJKBigInteger -// -// Created by Midfar Sun on 5/4/15. -// Copyright (c) 2015 Midfar Sun. All rights reserved. -// - -#import -#import "AWSJKBigInteger.h" - -@interface AWSJKBigDecimal : NSObject - -@property(nonatomic, retain)AWSJKBigInteger *bigInteger; -@property(nonatomic, assign)NSUInteger figure;//小数位数 - -+ (id)decimalWithString:(NSString *)string; -- (id)initWithString:(NSString *)string; - -- (id)add:(AWSJKBigDecimal *)bigDecimal; -- (id)subtract:(AWSJKBigDecimal *)bigDecimal; -- (id)multiply:(AWSJKBigDecimal *)bigDecimal; -- (id)divide:(AWSJKBigDecimal *)bigDecimal; - -- (id)remainder:(AWSJKBigDecimal *)bigInteger; -//- (NSArray *)divideAndRemainder:(AWSJKBigDecimal *)bigInteger; - -- (NSComparisonResult) compare:(AWSJKBigDecimal *)other; -- (id)pow:(unsigned int)exponent; - -- (id)negate; -- (id)abs; - -- (NSString *)stringValue; - -- (NSString *)description; - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigDecimal.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigDecimal.m deleted file mode 100644 index be7e35c..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigDecimal.m +++ /dev/null @@ -1,218 +0,0 @@ -// -// AWSJKBigDecimal.m -// AWSJKBigInteger -// -// Created by Midfar Sun on 5/4/15. -// Copyright (c) 2015 Midfar Sun. All rights reserved. -// - -#import "AWSJKBigDecimal.h" - -@implementation AWSJKBigDecimal -@synthesize bigInteger, figure; - -- (id)init -{ - return [self initWithString:@"0"]; -} - -- (id)initWithString:(NSString *)string -{ - self = [super init]; - if (self) { - figure = 0; - if ([string containsString:@"."]) { - NSRange range = [string rangeOfString:@"."]; - figure = string.length-range.location-range.length; - string = [string stringByReplacingCharactersInRange:range withString:@""]; - } - bigInteger = [[AWSJKBigInteger alloc] initWithString:string]; - } - return self; -} - -+ (id)decimalWithString:(NSString *)string -{ - return [[AWSJKBigDecimal alloc] initWithString:string]; -} - --(id)initWithBigInteger:(AWSJKBigInteger *)i figure:(NSInteger)f -{ - self = [super init]; - if (self) { - bigInteger = i; - figure = f; - } - return self; -} - -- (instancetype)initWithCoder:(NSCoder *)decoder -{ - self = [super init]; - if (self) { - bigInteger = [[AWSJKBigInteger alloc] initWithCoder:decoder]; - figure = [decoder decodeInt32ForKey:@"AWSJKBigDecimalFigure"]; - } - return self; -} --(void)encodeWithCoder:(NSCoder *)encoder -{ - [bigInteger encodeWithCoder:encoder]; - [encoder encodeInteger:figure forKey:@"AWSJKBigDecimalFigure"]; -} - -- (id)add:(AWSJKBigDecimal *)bigDecimal -{ - NSInteger maxFigure = 0; - if (figure>=bigDecimal.figure) { - maxFigure = figure; - NSInteger exponent = maxFigure-bigDecimal.figure; - AWSJKBigInteger *mInteger = [[AWSJKBigInteger alloc] initWithString:@"10"]; - AWSJKBigInteger *newInteger = [mInteger pow:(unsigned int)exponent]; - bigDecimal.bigInteger = [bigDecimal.bigInteger multiply:newInteger]; - bigDecimal.figure = maxFigure; - - }else{ - maxFigure = bigDecimal.figure; - NSInteger exponent = maxFigure-figure; - AWSJKBigInteger *mInteger = [[AWSJKBigInteger alloc] initWithString:@"10"]; - AWSJKBigInteger *newInteger = [mInteger pow:(unsigned int)exponent]; - bigInteger = [bigInteger multiply:newInteger]; - figure = maxFigure; - - } - AWSJKBigInteger *newBigInteger = [bigInteger add:bigDecimal.bigInteger]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:maxFigure]; - return newBigDecimal; -} - -- (id)subtract:(AWSJKBigDecimal *)bigDecimal -{ - NSInteger maxFigure = 0; - if (figure>=bigDecimal.figure) { - maxFigure = figure; - NSInteger exponent = maxFigure-bigDecimal.figure; - AWSJKBigInteger *mInteger = [[AWSJKBigInteger alloc] initWithString:@"10"]; - AWSJKBigInteger *newInteger = [mInteger pow:(unsigned int)exponent]; - bigDecimal.bigInteger = [bigDecimal.bigInteger multiply:newInteger]; - bigDecimal.figure = maxFigure; - - }else{ - maxFigure = bigDecimal.figure; - NSInteger exponent = maxFigure-figure; - AWSJKBigInteger *mInteger = [[AWSJKBigInteger alloc] initWithString:@"10"]; - AWSJKBigInteger *newInteger = [mInteger pow:(unsigned int)exponent]; - bigInteger = [bigDecimal.bigInteger multiply:newInteger]; - figure = maxFigure; - - } - AWSJKBigInteger *newBigInteger = [bigInteger subtract:bigDecimal.bigInteger]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:maxFigure]; - return newBigDecimal; -} - -- (id)multiply:(AWSJKBigDecimal *)bigDecimal -{ - NSInteger totalFigure = figure+bigDecimal.figure; - AWSJKBigInteger *newBigInteger = [bigInteger multiply:bigDecimal.bigInteger]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:totalFigure]; - return newBigDecimal; -} - -- (id)divide:(AWSJKBigDecimal *)bigDecimal -{ - NSInteger totalFigure = figure-bigDecimal.figure; - if (totalFigure<0) { - NSInteger exponent = -totalFigure; - totalFigure=0; - AWSJKBigInteger *mInteger = [[AWSJKBigInteger alloc] initWithString:@"10"]; - AWSJKBigInteger *newInteger = [mInteger pow:(unsigned int)exponent]; - bigInteger = [bigInteger multiply:newInteger]; - } - AWSJKBigInteger *newBigInteger = [bigInteger divide:bigDecimal.bigInteger]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:totalFigure]; - return newBigDecimal; -} - -- (id)remainder:(AWSJKBigDecimal *)bigDecimal -{ - NSInteger totalFigure = figure-bigDecimal.figure; - if (totalFigure<0) { - NSInteger exponent = -totalFigure; - totalFigure=0; - AWSJKBigInteger *mInteger = [[AWSJKBigInteger alloc] initWithString:@"10"]; - AWSJKBigInteger *newInteger = [mInteger pow:(unsigned int)exponent]; - bigInteger = [bigInteger multiply:newInteger]; - } - AWSJKBigInteger *newBigInteger = [bigInteger remainder:bigDecimal.bigInteger]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:bigDecimal.figure]; - return newBigDecimal; -} - -//- (NSArray *)divideAndRemainder:(AWSJKBigDecimal *)bigInteger -//{ -// -//} - --(NSComparisonResult) compare:(AWSJKBigDecimal *)other { - AWSJKBigDecimal *tens = [[AWSJKBigDecimal alloc] initWithString:@"10"]; - AWSJKBigInteger *scaledNum; - AWSJKBigInteger *scaledCompareTo; - - if (figure > other.figure){ - tens = [tens pow:(int)figure]; - } else { - tens = [tens pow:(int)other.figure]; - } - //scale my value to integer value - scaledNum = [[AWSJKBigInteger alloc] initWithString:[[self multiply:tens] stringValue]]; - //scale other value to integer - scaledCompareTo = [[AWSJKBigInteger alloc] initWithString:[[other multiply:tens] stringValue]]; - NSComparisonResult compareBigInteger = [scaledNum compare:scaledCompareTo]; - return compareBigInteger; -} - -- (id)pow:(unsigned int)exponent -{ - NSInteger totalFigure = figure*exponent; - AWSJKBigInteger *newBigInteger = [bigInteger pow:exponent]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:totalFigure]; - return newBigDecimal; -} - -- (id)negate -{ - AWSJKBigInteger *newBigInteger = [bigInteger negate]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:figure]; - return newBigDecimal; -} - -- (id)abs -{ - AWSJKBigInteger *newBigInteger = [bigInteger abs]; - AWSJKBigDecimal *newBigDecimal = [[AWSJKBigDecimal alloc] initWithBigInteger:newBigInteger figure:figure]; - return newBigDecimal; -} - -- (NSString *)stringValue -{ - NSString *string = [bigInteger stringValue]; - if (figure==0) { - return string; - } - NSMutableString *mString = [NSMutableString stringWithString:string]; - NSInteger newFigure = string.length-figure; - while (newFigure<=0) { - [mString insertString:@"0" atIndex:0]; - newFigure++; - } - [mString insertString:@"." atIndex:newFigure]; - return mString; -} - -- (NSString *)description -{ - return [self stringValue]; -} - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigInteger.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigInteger.h deleted file mode 100644 index a236412..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigInteger.h +++ /dev/null @@ -1,56 +0,0 @@ -// -// AWSJKBigInteger.h -// AWSJKBigInteger -// -// Created by Jānis Kiršteins on 5/21/13. -// Copyright (c) 2013 Jānis Kiršteins. All rights reserved. -// - -#import -#include "aws_tommath.h" - -@interface AWSJKBigInteger : NSObject - -- (id)initWithValue:(aws_mp_int *)value; -- (aws_mp_int *)value; - -- (id)initWithUnsignedLong:(unsigned long)ul; -- (id)initWithString:(NSString *)string; -- (id)initWithString:(NSString *)string andRadix:(int)radix; -- (id)initWithCString:(char *)cString; -- (id)initWithCString:(char *)cString andRadix:(int)radix; - -- (id)add:(AWSJKBigInteger *)bigInteger; -- (id)subtract:(AWSJKBigInteger *)bigInteger; -- (id)multiply:(AWSJKBigInteger *)bigInteger; -- (id)divide:(AWSJKBigInteger *)bigInteger; - -- (id)remainder:(AWSJKBigInteger *)bigInteger; -- (NSArray *)divideAndRemainder:(AWSJKBigInteger *)bigInteger; - -- (id)pow:(unsigned int)exponent; -- (id)pow:(AWSJKBigInteger*)exponent andMod:(AWSJKBigInteger*)modulus; -- (id)negate; -- (id)abs; - -- (id)bitwiseXor:(AWSJKBigInteger *)bigInteger; -- (id)bitwiseOr:(AWSJKBigInteger *)bigInteger; -- (id)bitwiseAnd:(AWSJKBigInteger *)bigInteger; -- (id)shiftLeft:(unsigned int)n; -- (id)shiftRight:(unsigned int)n; - -- (id)gcd:(AWSJKBigInteger *)bigInteger; - -- (NSComparisonResult) compare:(AWSJKBigInteger *)bigInteger; - -- (unsigned long)unsignedIntValue; -- (NSString *)stringValue; -- (NSString *)stringValueWithRadix:(int)radix; - -- (NSString *)description; - -- (unsigned int)countBytes; -- (void)toByteArraySigned: (unsigned char*) byteArray; -- (void)toByteArrayUnsigned: (unsigned char*) byteArray; - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigInteger.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigInteger.m deleted file mode 100644 index 301811d..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/AWSJKBigInteger.m +++ /dev/null @@ -1,412 +0,0 @@ -// -// AWSJKBigInteger.m -// AWSJKBigInteger -// -// Created by Jānis Kiršteins on 5/21/13. -// Copyright (c) 2013 Jānis Kiršteins. All rights reserved. -// -#import "AWSJKBigInteger.h" - -@implementation AWSJKBigInteger { -@private - aws_mp_int m_value; -} - -- (id)initWithValue:(aws_mp_int *)value { - - self = [super init]; - - if (self) { - aws_mp_init_copy(&m_value, value); - } - - return self; -} - -- (aws_mp_int *)value { - return &m_value; -} - -- (id)initWithUnsignedLong:(unsigned long)unsignedLong { - - self = [super init]; - - if (self) { - aws_mp_set_int(&m_value, unsignedLong); - } - - return self; -} - -- (id)init { - return [self initWithUnsignedLong:0]; -} - -- (id)initWithCString:(char *)cString andRadix:(int)radix { - - if (radix < 2 || radix > 64) { - return nil; - } - - self = [super init]; - - if (self) { - aws_mp_init(&m_value); - int result; - result = aws_mp_read_radix(&m_value, cString, radix); - - if (result != AWS_MP_OKAY) { - aws_mp_clear(&m_value); - return nil; - } - } - - return self; -} -- (id)initWithCString:(char *)cString { - - int radix = 10; - return [self initWithCString:cString andRadix:radix]; -} - -- (id)initWithString:(NSString *)string andRadix:(int)radix { - return [self initWithCString:(char *)[string UTF8String] andRadix:radix]; -} - -- (id)initWithString:(NSString *)string { - - int radix = 10; - return [self initWithCString:(char *)[string UTF8String] andRadix:radix]; -} - -- (id)initWithCoder:(NSCoder *)decoder { - - self = [super init]; - - if (self) { - int sign = [decoder decodeInt32ForKey:@"AWSJKBigIntegerSign"]; - int alloc = [decoder decodeInt32ForKey:@"AWSJKBigIntegerAlloc"]; - - aws_mp_init_size(&m_value, alloc); - - NSData *data = (NSData *)[decoder decodeObjectForKey:@"AWSJKBigIntegerDP"]; - aws_mp_digit *temp = (aws_mp_digit *)[data bytes]; - - for (unsigned int i = 0; i < alloc; ++i) { - m_value.dp[i] = temp[i]; - } - - m_value.used = alloc; - m_value.sign = sign; - } - - return self; -} -- (void)encodeWithCoder:(NSCoder *)encoder { - - aws_mp_clamp(&m_value); - - NSData *data = [NSData dataWithBytes:(const void *)m_value.dp - length:m_value.alloc * sizeof(aws_mp_digit)]; - - [encoder encodeObject:data forKey:@"AWSJKBigIntegerDP"]; - [encoder encodeInteger:m_value.alloc forKey:@"AWSJKBigIntegerAlloc"]; - [encoder encodeInteger:m_value.sign forKey:@"AWSJKBigIntegerSign"]; -} - -- (id)add:(AWSJKBigInteger *)bigInteger { - - aws_mp_int sum; - aws_mp_init(&sum); - - aws_mp_add(&m_value, [bigInteger value], &sum); - - id newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&sum]; - aws_mp_clear(&sum); - - return newBigInteger; -} - -- (id)subtract:(AWSJKBigInteger *)bigInteger { - - aws_mp_int difference; - aws_mp_init(&difference); - - aws_mp_sub(&m_value, [bigInteger value], &difference); - - id newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&difference]; - aws_mp_clear(&difference); - - return newBigInteger; -} - -- (id)multiply:(AWSJKBigInteger *)bigInteger { - - aws_mp_int product; - aws_mp_init(&product); - - aws_mp_mul(&m_value, [bigInteger value], &product); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&product]; - aws_mp_clear(&product); - - return newBigInteger; -} - -- (id)divide:(AWSJKBigInteger *)bigInteger { - - int result; - aws_mp_int quotient; - aws_mp_init("ient); - - result = aws_mp_div(&m_value, [bigInteger value], "ient, NULL); - if (result == AWS_MP_VAL) { - aws_mp_clear("ient); - return nil; - } - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:"ient]; - aws_mp_clear("ient); - - return newBigInteger; -} - -- (id)remainder:(AWSJKBigInteger *)bigInteger { - - int result; - aws_mp_int remainder; - aws_mp_init(&remainder); - - result = aws_mp_div(&m_value, [bigInteger value], NULL, &remainder); - if (result == AWS_MP_VAL) { - aws_mp_clear(&remainder); - return nil; - } - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&remainder]; - aws_mp_clear(&remainder); - - return newBigInteger; -} - -- (NSArray *)divideAndRemainder:(AWSJKBigInteger *)bigInteger { - - int result; - aws_mp_int quotient, remainder; - aws_mp_init_multi("ient, &remainder, NULL); - - result = aws_mp_div(&m_value, [bigInteger value], "ient, &remainder); - if (result == AWS_MP_VAL) { - aws_mp_clear_multi("ient, &remainder, NULL); - return nil; - } - - AWSJKBigInteger *quotientBigInteger = [[AWSJKBigInteger alloc] initWithValue:"ient]; - AWSJKBigInteger *remainderBigInteger = [[AWSJKBigInteger alloc] initWithValue:&remainder]; - aws_mp_clear_multi("ient, &remainder, NULL); - - return @[quotientBigInteger, remainderBigInteger]; -} - -- (id)pow:(unsigned int)exponent { - - int result; - aws_mp_int power; - aws_mp_init(&power); - - result = aws_mp_expt_d(&m_value, (aws_mp_digit) exponent, &power); - if (result == AWS_MP_VAL) { - aws_mp_clear(&power); - return nil; - } - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&power]; - aws_mp_clear(&power); - - return newBigInteger; -} - -- (id)pow:(AWSJKBigInteger*)exponent andMod: (AWSJKBigInteger*)modulus { - - int result; - aws_mp_int output; - aws_mp_init(&output); - - result = aws_mp_exptmod(&m_value, &exponent->m_value, &modulus->m_value, &output); - if (result == AWS_MP_VAL) { - aws_mp_clear(&output); - return nil; - } - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&output]; - aws_mp_clear(&output); - - return newBigInteger; -} - -- (id)negate { - - aws_mp_int negate; - aws_mp_init(&negate); - aws_mp_neg(&m_value, &negate); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&negate]; - aws_mp_clear(&negate); - - return newBigInteger; -} - -- (id)abs { - - aws_mp_int absolute; - aws_mp_init(&absolute); - aws_mp_abs(&m_value, &absolute); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&absolute]; - aws_mp_clear(&absolute); - - return newBigInteger; -} - -- (id)bitwiseXor:(AWSJKBigInteger *)bigInteger { - - aws_mp_int xor; - aws_mp_init(&xor); - aws_mp_xor(&m_value, [bigInteger value], &xor); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&xor]; - aws_mp_clear(&xor); - - return newBigInteger; -} - -- (id)bitwiseOr:(AWSJKBigInteger *)bigInteger { - - aws_mp_int or; - aws_mp_init(&or); - aws_mp_or(&m_value, [bigInteger value], &or); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&or]; - aws_mp_clear(&or); - - return newBigInteger; -} - -- (id)bitwiseAnd:(AWSJKBigInteger *)bigInteger { - - aws_mp_int and; - aws_mp_init(&and); - aws_mp_and(&m_value, [bigInteger value], &and); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&and]; - aws_mp_clear(&and); - - return newBigInteger; -} - -- (id)shiftLeft:(unsigned int)n { - - aws_mp_int lShift; - aws_mp_init(&lShift); - aws_mp_mul_2d(&m_value, n, &lShift); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&lShift]; - aws_mp_clear(&lShift); - - return newBigInteger; -} - -- (id)shiftRight:(unsigned int)n { - - aws_mp_int rShift; - aws_mp_init(&rShift); - aws_mp_div_2d(&m_value, n, &rShift, NULL); - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&rShift]; - aws_mp_clear(&rShift); - - return newBigInteger; -} -- (id)gcd:(AWSJKBigInteger *)bigInteger { - - int result; - aws_mp_int gcd; - aws_mp_init(&gcd); - - result = aws_mp_gcd(&m_value, [bigInteger value], &gcd); - if (result == AWS_MP_VAL) { - aws_mp_clear(&gcd); - return nil; - } - - AWSJKBigInteger *newBigInteger = [[AWSJKBigInteger alloc] initWithValue:&gcd]; - aws_mp_clear(&gcd); - - return newBigInteger; -} - -- (NSComparisonResult) compare:(AWSJKBigInteger *)bigInteger { - - NSComparisonResult comparisonResult; - comparisonResult = aws_mp_cmp([bigInteger value], &m_value); - - switch (comparisonResult) { - case AWS_MP_GT: - return NSOrderedAscending; - case AWS_MP_EQ: - return NSOrderedSame; - case AWS_MP_LT: - return NSOrderedDescending; - default: - return 0; - } -} - -- (unsigned long)unsignedIntValue { - return aws_mp_get_int(&m_value); -} - -- (NSString *)stringValue { - - int radix = 10; - return [self stringValueWithRadix:radix]; -} - -- (NSString *)stringValueWithRadix:(int)radix { - - int stringSize; - aws_mp_radix_size(&m_value, radix, &stringSize); - char cString[stringSize]; - aws_mp_toradix(&m_value, cString, radix); - - for (int i = 0; i < stringSize; ++i) { - cString[i] = (char)tolower(cString[i]); - } - - return [NSString stringWithUTF8String:cString]; -} - -- (NSString *)description { - return [self stringValue]; -} - -- (void)dealloc { - aws_mp_clear(&m_value); -} - -/* Returns the number of bytes required to store this AWSJKBigInteger as binary */ -- (unsigned int)countBytes { - return (unsigned int) aws_mp_unsigned_bin_size(&m_value); -} - -/* Retrieves the signed [big endian] format of this AWSJKBigInteger */ -- (void)toByteArraySigned: (unsigned char*) byteArray { - aws_mp_to_signed_bin(&m_value, byteArray); -} - -/* Retrieves the unsigned [big endian] format of this AWSJKBigInteger */ -- (void)toByteArrayUnsigned: (unsigned char*) byteArray { - aws_mp_to_unsigned_bin(&m_value, byteArray); -} - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath.h deleted file mode 100755 index 3f5c80d..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath.h +++ /dev/null @@ -1,584 +0,0 @@ -/* LibTomMath, multiple-precision integer library -- Tom St Denis - * - * LibTomMath is a library that provides multiple-precision - * integer arithmetic as well as number theoretic functionality. - * - * The library was designed directly after the MPI library by - * Michael Fromberger but has been written from scratch with - * additional optimizations in place. - * - * The library is free for all purposes without any express - * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://math.libtomcrypt.com - */ -#ifndef AWS_BN_H_ -#define AWS_BN_H_ - -#include -#include -#include -#include -#include - -#include "aws_tommath_class.h" - -#ifndef AWS_MIN - #define AWS_MIN(x,y) ((x)<(y)?(x):(y)) -#endif - -#ifndef AWS_MAX - #define AWS_MAX(x,y) ((x)>(y)?(x):(y)) -#endif - -#ifdef __cplusplus -extern "C" { - -/* C++ compilers don't like assigning void * to mp_digit * */ -#define AWS_OPT_CAST(x) (x *) - -#else - -/* C on the other hand doesn't care */ -#define AWS_OPT_CAST(x) - -#endif - - -/* detect 64-bit mode if possible */ -#if defined(__x86_64__) - #if !(defined(AWS_MP_64BIT) && defined(AWS_MP_16BIT) && defined(AWS_MP_8BIT)) - #define AWS_MP_64BIT - #endif -#endif - -/* some default configurations. - * - * A "mp_digit" must be able to hold AWS_DIGIT_BIT + 1 bits - * A "mp_word" must be able to hold 2*AWS_DIGIT_BIT + 1 bits - * - * At the very least a mp_digit must be able to hold 7 bits - * [any size beyond that is ok provided it doesn't overflow the data type] - */ -#ifdef AWS_MP_8BIT - typedef unsigned char aws_mp_digit; - typedef unsigned short aws_mp_word; -#elif defined(AWS_MP_16BIT) - typedef unsigned short aws_mp_digit; - typedef unsigned long aws_mp_word; -#elif defined(AWS_MP_64BIT) - /* for GCC only on supported platforms */ -#ifndef CRYPT - typedef unsigned long long ulong64; - typedef signed long long long64; -#endif - - typedef unsigned long aws_mp_digit; - typedef unsigned long aws_mp_word __attribute__ ((mode(TI))); - - #define AWS_DIGIT_BIT 60 -#else - /* this is the default case, 28-bit digits */ - - /* this is to make porting into LibTomCrypt easier :-) */ -#ifndef CRYPT - #if defined(_MSC_VER) || defined(__BORLANDC__) - typedef unsigned __int64 ulong64; - typedef signed __int64 long64; - #else - typedef unsigned long long ulong64; - typedef signed long long long64; - #endif -#endif - - typedef unsigned long aws_mp_digit; - typedef ulong64 aws_mp_word; - -#ifdef AWS_MP_31BIT - /* this is an extension that uses 31-bit digits */ - #define AWS_DIGIT_BIT 31 -#else - /* default case is 28-bit digits, defines MP_28BIT as a handy macro to test */ - #define AWS_DIGIT_BIT 28 - #define AWS_MP_28BIT -#endif -#endif - -/* define heap macros */ -#ifndef CRYPT - /* default to libc stuff */ - #ifndef AWS_XMALLOC - #define AWS_XMALLOC malloc - #define AWS_XFREE free - #define AWS_XREALLOC realloc - #define AWS_XCALLOC calloc - #else - /* prototypes for our heap functions */ - extern void *AWS_XMALLOC(size_t n); - extern void *AWS_XREALLOC(void *p, size_t n); - extern void *AWS_XCALLOC(size_t n, size_t s); - extern void AWS_XFREE(void *p); - #endif -#endif - - -/* otherwise the bits per digit is calculated automatically from the size of a mp_digit */ -#ifndef AWS_DIGIT_BIT - #define AWS_DIGIT_BIT ((int)((AWS_CHAR_BIT * sizeof(aws_mp_digit) - 1))) /* bits per digit */ -#endif - -#define AWS_MP_DIGIT_BIT AWS_DIGIT_BIT -#define AWS_MP_MASK ((((aws_mp_digit)1)<<((aws_mp_digit)AWS_DIGIT_BIT))-((aws_mp_digit)1)) -#define AWS_MP_DIGIT_MAX AWS_MP_MASK - -/* equalities */ -#define AWS_MP_LT -1 /* less than */ -#define AWS_MP_EQ 0 /* equal to */ -#define AWS_MP_GT 1 /* greater than */ - -#define AWS_MP_ZPOS 0 /* positive integer */ -#define AWS_MP_NEG 1 /* negative */ - -#define AWS_MP_OKAY 0 /* ok result */ -#define AWS_MP_MEM -2 /* out of mem */ -#define AWS_MP_VAL -3 /* invalid input */ -#define AWS_MP_RANGE AWS_MP_VAL - -#define AWS_MP_YES 1 /* yes response */ -#define AWS_MP_NO 0 /* no response */ - -/* Primality generation flags */ -#define AWS_LTM_PRIME_BBS 0x0001 /* BBS style prime */ -#define AWS_LTM_PRIME_SAFE 0x0002 /* Safe prime (p-1)/2 == prime */ -#define AWS_LTM_PRIME_2MSB_ON 0x0008 /* force 2nd MSB to 1 */ - -typedef int aws_mp_err; - -/* you'll have to tune these... */ -extern int AWS_KARATSUBA_MUL_CUTOFF, - AWS_KARATSUBA_SQR_CUTOFF, - AWS_TOOM_MUL_CUTOFF, - AWS_TOOM_SQR_CUTOFF; - -/* define this to use lower memory usage routines (exptmods mostly) */ -/* #define AWS_MP_LOW_MEM */ - -/* default precision */ -#ifndef AWS_MP_PREC - #ifndef AWS_MP_LOW_MEM - #define AWS_MP_PREC 32 /* default digits of precision */ - #else - #define AWS_MP_PREC 8 /* default digits of precision */ - #endif -#endif - -/* size of comba arrays, should be at least 2 * 2**(BITS_PER_WORD - BITS_PER_DIGIT*2) */ -#define AWS_MP_WARRAY (1 << (sizeof(aws_mp_word) * CHAR_BIT - 2 * AWS_DIGIT_BIT + 1)) - -/* the infamous mp_int structure */ -typedef struct { - int used, alloc, sign; - aws_mp_digit *dp; -} aws_mp_int; - -/* callback for mp_prime_random, should fill dst with random bytes and return how many read [upto len] */ -typedef int aws_ltm_prime_callback(unsigned char *dst, int len, void *dat); - - -#define AWS_JKTM_USED(m) ((m)->used) -#define AWS_JKTM_DIGIT(m,k) ((m)->dp[(k)]) -#define AWS_JKTM_SIGN(m) ((m)->sign) - -/* error code to char* string */ -char *aws_mp_error_to_string(int code); - -/* ---> init and deinit bignum functions <--- */ -/* init a bignum */ -int aws_mp_init(aws_mp_int *a); - -/* free a bignum */ -void aws_mp_clear(aws_mp_int *a); - -/* init a null terminated series of arguments */ -int aws_mp_init_multi(aws_mp_int *mp, ...); - -/* clear a null terminated series of arguments */ -void aws_mp_clear_multi(aws_mp_int *mp, ...); - -/* exchange two ints */ -void aws_mp_exch(aws_mp_int *a, aws_mp_int *b); - -/* shrink ram required for a bignum */ -int aws_mp_shrink(aws_mp_int *a); - -/* grow an int to a given size */ -int aws_mp_grow(aws_mp_int *a, int size); - -/* init to a given number of digits */ -int aws_mp_init_size(aws_mp_int *a, int size); - -/* ---> Basic Manipulations <--- */ -#define aws_mp_iszero(a) (((a)->used == 0) ? AWS_MP_YES : AWS_MP_NO) -#define aws_mp_iseven(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 0)) ? AWS_MP_YES : AWS_MP_NO) -#define aws_mp_isodd(a) (((a)->used > 0 && (((a)->dp[0] & 1) == 1)) ? AWS_MP_YES : AWS_MP_NO) - -/* set to zero */ -void aws_mp_zero(aws_mp_int *a); - -/* set to a digit */ -void aws_mp_set(aws_mp_int *a, aws_mp_digit b); - -/* set a 32-bit const */ -int aws_mp_set_int(aws_mp_int *a, unsigned long b); - -/* get a 32-bit value */ -unsigned long aws_mp_get_int(aws_mp_int *a); - -/* initialize and set a digit */ -int aws_mp_init_set(aws_mp_int *a, aws_mp_digit b); - -/* initialize and set 32-bit value */ -int aws_mp_init_set_int(aws_mp_int *a, unsigned long b); - -/* copy, b = a */ -int aws_mp_copy(aws_mp_int *a, aws_mp_int *b); - -/* inits and copies, a = b */ -int aws_mp_init_copy(aws_mp_int *a, aws_mp_int *b); - -/* trim unused digits */ -void aws_mp_clamp(aws_mp_int *a); - -/* ---> digit manipulation <--- */ - -/* right shift by "b" digits */ -void aws_mp_rshd(aws_mp_int *a, int b); - -/* left shift by "b" digits */ -int aws_mp_lshd(aws_mp_int *a, int b); - -/* c = a / 2**b */ -int aws_mp_div_2d(aws_mp_int *a, int b, aws_mp_int *c, aws_mp_int *d); - -/* b = a/2 */ -int aws_mp_div_2(aws_mp_int *a, aws_mp_int *b); - -/* c = a * 2**b */ -int aws_mp_mul_2d(aws_mp_int *a, int b, aws_mp_int *c); - -/* b = a*2 */ -int aws_mp_mul_2(aws_mp_int *a, aws_mp_int *b); - -/* c = a mod 2**d */ -int aws_mp_mod_2d(aws_mp_int *a, int b, aws_mp_int *c); - -/* computes a = 2**b */ -int aws_mp_2expt(aws_mp_int *a, int b); - -/* Counts the number of lsbs which are zero before the first zero bit */ -int aws_mp_cnt_lsb(aws_mp_int *a); - -/* I Love Earth! */ - -/* makes a pseudo-random int of a given size */ -int aws_mp_rand(aws_mp_int *a, int digits); - -/* ---> binary operations <--- */ -/* c = a XOR b */ -int aws_mp_xor(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* c = a OR b */ -int aws_mp_or(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* c = a AND b */ -int aws_mp_and(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* ---> Basic arithmetic <--- */ - -/* b = -a */ -int aws_mp_neg(aws_mp_int *a, aws_mp_int *b); - -/* b = |a| */ -int aws_mp_abs(aws_mp_int *a, aws_mp_int *b); - -/* compare a to b */ -int aws_mp_cmp(aws_mp_int *a, aws_mp_int *b); - -/* compare |a| to |b| */ -int aws_mp_cmp_mag(aws_mp_int *a, aws_mp_int *b); - -/* c = a + b */ -int aws_mp_add(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* c = a - b */ -int aws_mp_sub(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* c = a * b */ -int aws_mp_mul(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* b = a*a */ -int aws_mp_sqr(aws_mp_int *a, aws_mp_int *b); - -/* a/b => cb + d == a */ -int aws_mp_div(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d); - -/* c = a mod b, 0 <= c < b */ -int aws_mp_mod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* ---> single digit functions <--- */ - -/* compare against a single digit */ -int aws_mp_cmp_d(aws_mp_int *a, aws_mp_digit b); - -/* c = a + b */ -int aws_mp_add_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c); - -/* c = a - b */ -int aws_mp_sub_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c); - -/* c = a * b */ -int aws_mp_mul_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c); - -/* a/b => cb + d == a */ -int aws_mp_div_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c, aws_mp_digit *d); - -/* a/3 => 3c + d == a */ -int aws_mp_div_3(aws_mp_int *a, aws_mp_int *c, aws_mp_digit *d); - -/* c = a**b */ -int aws_mp_expt_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c); - -/* c = a mod b, 0 <= c < b */ -int aws_mp_mod_d(aws_mp_int *a, aws_mp_digit b, aws_mp_digit *c); - -/* ---> number theory <--- */ - -/* d = a + b (mod c) */ -int aws_mp_addmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d); - -/* d = a - b (mod c) */ -int aws_mp_submod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d); - -/* d = a * b (mod c) */ -int aws_mp_mulmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d); - -/* c = a * a (mod b) */ -int aws_mp_sqrmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* c = 1/a (mod b) */ -int aws_mp_invmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* c = (a, b) */ -int aws_mp_gcd(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* produces value such that U1*a + U2*b = U3 */ -int aws_mp_exteuclid(aws_mp_int *a, aws_mp_int *b, aws_mp_int *U1, aws_mp_int *U2, aws_mp_int *U3); - -/* c = [a, b] or (a*b)/(a, b) */ -int aws_aws_mp_lcm(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* finds one of the b'th root of a, such that |c|**b <= |a| - * - * returns error if a < 0 and b is even - */ -int aws_mp_n_root(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c); - -/* special sqrt algo */ -int aws_mp_sqrt(aws_mp_int *arg, aws_mp_int *ret); - -/* is number a square? */ -int aws_mp_is_square(aws_mp_int *arg, int *ret); - -/* computes the jacobi c = (a | n) (or Legendre if b is prime) */ -int aws_mp_jacobi(aws_mp_int *a, aws_mp_int *n, int *c); - -/* used to setup the Barrett reduction for a given modulus b */ -int aws_mp_reduce_setup(aws_mp_int *a, aws_mp_int *b); - -/* Barrett Reduction, computes a (mod b) with a precomputed value c - * - * Assumes that 0 < a <= b*b, note if 0 > a > -(b*b) then you can merely - * compute the reduction as -1 * aws_mp_reduce(aws_mp_abs(a)) [pseudo code]. - */ -int aws_mp_reduce(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); - -/* setups the montgomery reduction */ -int aws_mp_montgomery_setup(aws_mp_int *a, aws_mp_digit *mp); - -/* computes a = B**n mod b without division or multiplication useful for - * normalizing numbers in a Montgomery system. - */ -int aws_mp_montgomery_calc_normalization(aws_mp_int *a, aws_mp_int *b); - -/* computes x/R == x (mod N) via Montgomery Reduction */ -int aws_mp_montgomery_reduce(aws_mp_int *a, aws_mp_int *m, aws_mp_digit mp); - -/* returns 1 if a is a valid DR modulus */ -int aws_mp_dr_is_modulus(aws_mp_int *a); - -/* sets the value of "d" required for aws_mp_dr_reduce */ -void aws_mp_dr_setup(aws_mp_int *a, aws_mp_digit *d); - -/* reduces a modulo b using the Diminished Radix method */ -int aws_mp_dr_reduce(aws_mp_int *a, aws_mp_int *b, aws_mp_digit mp); - -/* returns true if a can be reduced with aws_mp_reduce_2k */ -int aws_mp_reduce_is_2k(aws_mp_int *a); - -/* determines k value for 2k reduction */ -int aws_mp_reduce_2k_setup(aws_mp_int *a, aws_mp_digit *d); - -/* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ -int aws_mp_reduce_2k(aws_mp_int *a, aws_mp_int *n, aws_mp_digit d); - -/* returns true if a can be reduced with aws_mp_reduce_2k_l */ -int aws_mp_reduce_is_2k_l(aws_mp_int *a); - -/* determines k value for 2k reduction */ -int aws_mp_reduce_2k_setup_l(aws_mp_int *a, aws_mp_int *d); - -/* reduces a modulo b where b is of the form 2**p - k [0 <= a] */ -int aws_mp_reduce_2k_l(aws_mp_int *a, aws_mp_int *n, aws_mp_int *d); - -/* d = a**b (mod c) */ -int aws_mp_exptmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d); - -/* ---> Primes <--- */ - -/* number of primes */ -#ifdef AWS_MP_8BIT - #define AWS_JKTM_PRIME_SIZE 31 -#else - #define AWS_JKTM_PRIME_SIZE 256 -#endif - -/* table of first AWS_JKTM_PRIME_SIZE primes */ -extern const aws_mp_digit aws_ltm_prime_tab[]; - -/* result=1 if a is divisible by one of the first AWS_JKTM_PRIME_SIZE primes */ -int aws_mp_prime_is_divisible(aws_mp_int *a, int *result); - -/* performs one Fermat test of "a" using base "b". - * Sets result to 0 if composite or 1 if probable prime - */ -int aws_mp_prime_fermat(aws_mp_int *a, aws_mp_int *b, int *result); - -/* performs one Miller-Rabin test of "a" using base "b". - * Sets result to 0 if composite or 1 if probable prime - */ -int aws_mp_prime_miller_rabin(aws_mp_int *a, aws_mp_int *b, int *result); - -/* This gives [for a given bit size] the number of trials required - * such that Miller-Rabin gives a prob of failure lower than 2^-96 - */ -int aws_mp_prime_rabin_miller_trials(int size); - -/* performs t rounds of Miller-Rabin on "a" using the first - * t prime bases. Also performs an initial sieve of trial - * division. Determines if "a" is prime with probability - * of error no more than (1/4)**t. - * - * Sets result to 1 if probably prime, 0 otherwise - */ -int aws_mp_prime_is_prime(aws_mp_int *a, int t, int *result); - -/* finds the next prime after the number "a" using "t" trials - * of Miller-Rabin. - * - * bbs_style = 1 means the prime must be congruent to 3 mod 4 - */ -int aws_mp_prime_next_prime(aws_mp_int *a, int t, int bbs_style); - -/* makes a truly random prime of a given size (bytes), - * call with bbs = 1 if you want it to be congruent to 3 mod 4 - * - * You have to supply a callback which fills in a buffer with random bytes. "dat" is a parameter you can - * have passed to the callback (e.g. a state or something). This function doesn't use "dat" itself - * so it can be NULL - * - * The prime generated will be larger than 2^(8*size). - */ -#define mp_prime_random(a, t, size, bbs, cb, dat) mp_prime_random_ex(a, t, ((size) * 8) + 1, (bbs==1)?AWS_LTM_PRIME_BBS:0, cb, dat) - -/* makes a truly random prime of a given size (bits), - * - * Flags are as follows: - * - * AWS_LTM_PRIME_BBS - make prime congruent to 3 mod 4 - * AWS_LTM_PRIME_SAFE - make sure (p-1)/2 is prime as well (implies AWS_LTM_PRIME_BBS) - * AWS_LTM_PRIME_2MSB_OFF - make the 2nd highest bit zero - * AWS_LTM_PRIME_2MSB_ON - make the 2nd highest bit one - * - * You have to supply a callback which fills in a buffer with random bytes. "dat" is a parameter you can - * have passed to the callback (e.g. a state or something). This function doesn't use "dat" itself - * so it can be NULL - * - */ -int aws_mp_prime_random_ex(aws_mp_int *a, int t, int size, int flags, aws_ltm_prime_callback cb, void *dat); - -/* ---> radix conversion <--- */ -int aws_mp_count_bits(aws_mp_int *a); - -int aws_mp_unsigned_bin_size(aws_mp_int *a); -int aws_mp_read_unsigned_bin(aws_mp_int *a, const unsigned char *b, int c); -int aws_mp_to_unsigned_bin(aws_mp_int *a, unsigned char *b); -int aws_mp_to_unsigned_bin_n(aws_mp_int *a, unsigned char *b, unsigned long *outlen); - -int aws_mp_signed_bin_size(aws_mp_int *a); -int aws_mp_read_signed_bin(aws_mp_int *a, const unsigned char *b, int c); -int aws_mp_to_signed_bin(aws_mp_int *a, unsigned char *b); -int aws_mp_to_signed_bin_n(aws_mp_int *a, unsigned char *b, unsigned long *outlen); - -int aws_mp_read_radix(aws_mp_int *a, const char *str, int radix); -int aws_mp_toradix(aws_mp_int *a, char *str, int radix); -int aws_mp_toradix_n(aws_mp_int *a, char *str, int radix, int maxlen); -int aws_mp_radix_size(aws_mp_int *a, int radix, int *size); - -int aws_mp_fread(aws_mp_int *a, int radix, FILE *stream); -int aws_mp_fwrite(aws_mp_int *a, int radix, FILE *stream); - -#define mp_read_raw(mp, str, len) mp_read_signed_bin((mp), (str), (len)) -#define mp_raw_size(mp) mp_signed_bin_size(mp) -#define mp_toraw(mp, str) mp_to_signed_bin((mp), (str)) -#define mp_read_mag(mp, str, len) mp_read_unsigned_bin((mp), (str), (len)) -#define mp_mag_size(mp) mp_unsigned_bin_size(mp) -#define mp_tomag(mp, str) mp_to_unsigned_bin((mp), (str)) - -#define mp_tobinary(M, S) mp_toradix((M), (S), 2) -#define mp_tooctal(M, S) mp_toradix((M), (S), 8) -#define mp_todecimal(M, S) mp_toradix((M), (S), 10) -#define mp_tohex(M, S) mp_toradix((M), (S), 16) - -/* lowlevel functions, do not call! */ -int aws_s_mp_add(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); -int aws_s_mp_sub(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); -#define aws_s_mp_mul(a, b, c) aws_s_mp_mul_digs(a, b, c, (a)->used + (b)->used + 1) -int aws_fast_s_mp_mul_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs); -int aws_s_mp_mul_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs); -int aws_fast_s_mp_mul_high_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs); -int aws_s_mp_mul_high_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs); -int aws_fast_s_mp_sqr(aws_mp_int *a, aws_mp_int *b); -int aws_s_mp_sqr(aws_mp_int *a, aws_mp_int *b); -int aws_mp_karatsuba_mul(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); -int aws_mp_toom_mul(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); -int aws_mp_karatsuba_sqr(aws_mp_int *a, aws_mp_int *b); -int aws_mp_toom_sqr(aws_mp_int *a, aws_mp_int *b); -int aws_fast_mp_invmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); -int aws_mp_invmod_slow(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c); -int aws_fast_mp_montgomery_reduce(aws_mp_int *a, aws_mp_int *m, aws_mp_digit mp); -int aws_mp_exptmod_fast(aws_mp_int *G, aws_mp_int *X, aws_mp_int *P, aws_mp_int *Y, int mode); -int aws_s_mp_exptmod(aws_mp_int *G, aws_mp_int *X, aws_mp_int *P, aws_mp_int *Y, int mode); -void aws_bn_reverse(unsigned char *s, int len); - -extern const char *aws_mp_s_rmap; - -#ifdef __cplusplus - } -#endif - -#endif - - -/* $Source$ */ -/* $Revision: 0.39 $ */ -/* $Date: 2006-04-06 19:49:59 +0000 $ */ diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath_class.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath_class.h deleted file mode 100755 index f7b6c2e..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath_class.h +++ /dev/null @@ -1,999 +0,0 @@ -#if !(defined(AWS_LTM1) && defined(AWS_LTM2) && defined(AWS_LTM3)) -#if defined(AWS_LTM2) -#define AWS_LTM3 -#endif -#if defined(AWS_LTM1) -#define AWS_LTM2 -#endif -#define AWS_LTM1 - -#if defined(AWS_LTM_ALL) -#define AWS_BN_ERROR_C -#define AWS_BN_FAST_MP_INVMOD_C -#define AWS_BN_FAST_MP_MONTGOMERY_REDUCE_C -#define AWS_BN_FAST_S_MP_MUL_DIGS_C -#define AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C -#define AWS_BN_FAST_S_MP_SQR_C -#define AWS_BN_MP_2EXPT_C -#define AWS_BN_MP_ABS_C -#define AWS_BN_MP_ADD_C -#define AWS_BN_MP_ADD_D_C -#define AWS_BN_MP_ADDMOD_C -#define AWS_BN_MP_AND_C -#define AWS_BN_MP_CLAMP_C -#define AWS_BN_MP_CLEAR_C -#define AWS_BN_MP_CLEAR_MULTI_C -#define AWS_BN_MP_CMP_C -#define AWS_BN_MP_CMP_D_C -#define AWS_BN_MP_CMP_MAG_C -#define AWS_BN_MP_CNT_LSB_C -#define AWS_BN_MP_COPY_C -#define AWS_BN_MP_COUNT_BITS_C -#define AWS_BN_MP_DIV_C -#define AWS_BN_MP_DIV_2_C -#define AWS_BN_MP_DIV_2D_C -#define AWS_BN_MP_DIV_3_C -#define AWS_BN_MP_DIV_D_C -#define AWS_BN_MP_DR_IS_MODULUS_C -#define AWS_BN_MP_DR_REDUCE_C -#define AWS_BN_MP_DR_SETUP_C -#define AWS_BN_MP_EXCH_C -#define AWS_BN_MP_EXPT_D_C -#define AWS_BN_MP_EXPTMOD_C -#define AWS_BN_MP_EXPTMOD_FAST_C -#define AWS_BN_MP_EXTEUCLID_C -#define AWS_BN_MP_FREAD_C -#define AWS_BN_MP_FWRITE_C -#define AWS_BN_MP_GCD_C -#define AWS_BN_MP_GET_INT_C -#define AWS_BN_MP_GROW_C -#define AWS_BN_MP_INIT_C -#define AWS_BN_MP_INIT_COPY_C -#define AWS_BN_MP_INIT_MULTI_C -#define AWS_BN_MP_INIT_SET_C -#define AWS_BN_MP_INIT_SET_INT_C -#define AWS_BN_MP_INIT_SIZE_C -#define AWS_BN_MP_INVMOD_C -#define AWS_BN_MP_INVMOD_SLOW_C -#define AWS_BN_MP_IS_SQUARE_C -#define AWS_BN_MP_JACOBI_C -#define AWS_BN_MP_KARATSUBA_MUL_C -#define AWS_BN_MP_KARATSUBA_SQR_C -#define AWS_BN_MP_LCM_C -#define AWS_BN_MP_LSHD_C -#define AWS_BN_MP_MOD_C -#define AWS_BN_MP_MOD_2D_C -#define AWS_BN_MP_MOD_D_C -#define AWS_BN_MP_MONTGOMERY_CALC_NORMALIZATION_C -#define AWS_BN_MP_MONTGOMERY_REDUCE_C -#define AWS_BN_MP_MONTGOMERY_SETUP_C -#define AWS_BN_MP_MUL_C -#define AWS_BN_MP_MUL_2_C -#define AWS_BN_MP_MUL_2D_C -#define AWS_BN_MP_MUL_D_C -#define AWS_BN_MP_MULMOD_C -#define AWS_BN_MP_N_ROOT_C -#define AWS_BN_MP_NEG_C -#define AWS_BN_MP_OR_C -#define AWS_BN_MP_PRIME_FERMAT_C -#define AWS_BN_MP_PRIME_IS_DIVISIBLE_C -#define AWS_BN_MP_PRIME_IS_PRIME_C -#define AWS_BN_MP_PRIME_MILLER_RABIN_C -#define AWS_BN_MP_PRIME_NEXT_PRIME_C -#define AWS_BN_MP_PRIME_RABIN_MILLER_TRIALS_C -#define AWS_BN_MP_PRIME_RANDOM_EX_C -#define AWS_BN_MP_RADIX_SIZE_C -#define AWS_BN_MP_RADIX_SMAP_C -#define AWS_BN_MP_RAND_C -#define AWS_BN_MP_READ_RADIX_C -#define AWS_BN_MP_READ_SIGNED_BIN_C -#define AWS_BN_MP_READ_UNSIGNED_BIN_C -#define AWS_BN_MP_REDUCE_C -#define AWS_BN_MP_REDUCE_2K_C -#define AWS_BN_MP_REDUCE_2K_L_C -#define AWS_BN_MP_REDUCE_2K_SETUP_C -#define AWS_BN_MP_REDUCE_2K_SETUP_L_C -#define AWS_BN_MP_REDUCE_IS_2K_C -#define AWS_BN_MP_REDUCE_IS_2K_L_C -#define AWS_BN_MP_REDUCE_SETUP_C -#define AWS_BN_MP_RSHD_C -#define AWS_BN_MP_SET_C -#define AWS_BN_MP_SET_INT_C -#define AWS_BN_MP_SHRINK_C -#define AWS_BN_MP_SIGNED_BIN_SIZE_C -#define AWS_BN_MP_SQR_C -#define AWS_BN_MP_SQRMOD_C -#define AWS_BN_MP_SQRT_C -#define AWS_BN_MP_SUB_C -#define AWS_BN_MP_SUB_D_C -#define AWS_BN_MP_SUBMOD_C -#define AWS_BN_MP_TO_SIGNED_BIN_C -#define AWS_BN_MP_TO_SIGNED_BIN_N_C -#define AWS_BN_MP_TO_UNSIGNED_BIN_C -#define AWS_BN_MP_TO_UNSIGNED_BIN_N_C -#define AWS_BN_MP_TOOM_MUL_C -#define AWS_BN_MP_TOOM_SQR_C -#define AWS_BN_MP_TORADIX_C -#define AWS_BN_MP_TORADIX_N_C -#define AWS_BN_MP_UNSIGNED_BIN_SIZE_C -#define AWS_BN_MP_XOR_C -#define AWS_BN_MP_ZERO_C -#define AWS_BN_PRIME_TAB_C -#define AWS_BN_REVERSE_C -#define AWS_BN_S_MP_ADD_C -#define AWS_BN_S_MP_EXPTMOD_C -#define AWS_BN_S_MP_MUL_DIGS_C -#define AWS_BN_S_MP_MUL_HIGH_DIGS_C -#define AWS_BN_S_MP_SQR_C -#define AWS_BN_S_MP_SUB_C -#define AWS_BNCORE_C -#endif - -#if defined(AWS_BN_ERROR_C) - #define AWS_BN_MP_ERROR_TO_STRING_C -#endif - -#if defined(AWS_BN_FAST_MP_INVMOD_C) - #define AWS_BN_MP_ISEVEN_C - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_MOD_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_DIV_2_C - #define AWS_BN_MP_ISODD_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_CMP_C - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_MULTI_C -#endif - -#if defined(AWS_BN_FAST_MP_MONTGOMERY_REDUCE_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C -#endif - -#if defined(AWS_BN_FAST_S_MP_MUL_DIGS_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_FAST_S_MP_SQR_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_2EXPT_C) - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_GROW_C -#endif - -#if defined(AWS_BN_MP_ABS_C) - #define AWS_BN_MP_COPY_C -#endif - -#if defined(AWS_BN_MP_ADD_C) - #define AWS_BN_S_MP_ADD_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C -#endif - -#if defined(AWS_BN_MP_ADD_D_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_SUB_D_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_ADDMOD_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_MOD_C -#endif - -#if defined(AWS_BN_MP_AND_C) - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_CLAMP_C) -#endif - -#if defined(AWS_BN_MP_CLEAR_C) -#endif - -#if defined(AWS_BN_MP_CLEAR_MULTI_C) - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_CMP_C) - #define AWS_BN_MP_CMP_MAG_C -#endif - -#if defined(AWS_BN_MP_CMP_D_C) -#endif - -#if defined(AWS_BN_MP_CMP_MAG_C) -#endif - -#if defined(AWS_BN_MP_CNT_LSB_C) - #define AWS_BN_MP_ISZERO_C -#endif - -#if defined(AWS_BN_MP_COPY_C) - #define AWS_BN_MP_GROW_C -#endif - -#if defined(AWS_BN_MP_COUNT_BITS_C) -#endif - -#if defined(AWS_BN_MP_DIV_C) - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_ABS_C - #define AWS_BN_MP_MUL_2D_C - #define AWS_BN_MP_CMP_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_MULTI_C - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_LSHD_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_MUL_D_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_DIV_2_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_DIV_2D_C) - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_MOD_2D_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C -#endif - -#if defined(AWS_BN_MP_DIV_3_C) - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_DIV_D_C) - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_DIV_3_C - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_DR_IS_MODULUS_C) -#endif - -#if defined(AWS_BN_MP_DR_REDUCE_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C -#endif - -#if defined(AWS_BN_MP_DR_SETUP_C) -#endif - -#if defined(AWS_BN_MP_EXCH_C) -#endif - -#if defined(AWS_BN_MP_EXPT_D_C) - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_SQR_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_MUL_C -#endif - -#if defined(AWS_BN_MP_EXPTMOD_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_INVMOD_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_ABS_C - #define AWS_BN_MP_CLEAR_MULTI_C - #define AWS_BN_MP_REDUCE_IS_2K_L_C - #define AWS_BN_S_MP_EXPTMOD_C - #define AWS_BN_MP_DR_IS_MODULUS_C - #define AWS_BN_MP_REDUCE_IS_2K_C - #define AWS_BN_MP_ISODD_C - #define AWS_BN_MP_EXPTMOD_FAST_C -#endif - -#if defined(AWS_BN_MP_EXPTMOD_FAST_C) - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_MONTGOMERY_SETUP_C - #define AWS_BN_FAST_MP_MONTGOMERY_REDUCE_C - #define AWS_BN_MP_MONTGOMERY_REDUCE_C - #define AWS_BN_MP_DR_SETUP_C - #define AWS_BN_MP_DR_REDUCE_C - #define AWS_BN_MP_REDUCE_2K_SETUP_C - #define AWS_BN_MP_REDUCE_2K_C - #define AWS_BN_MP_MONTGOMERY_CALC_NORMALIZATION_C - #define AWS_BN_MP_MULMOD_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_MOD_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_SQR_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_EXCH_C -#endif - -#if defined(AWS_BN_MP_EXTEUCLID_C) - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_DIV_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_NEG_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_MULTI_C -#endif - -#if defined(AWS_BN_MP_FREAD_C) - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_S_RMAP_C - #define AWS_BN_MP_MUL_D_C - #define AWS_BN_MP_ADD_D_C - #define AWS_BN_MP_CMP_D_C -#endif - -#if defined(AWS_BN_MP_FWRITE_C) - #define AWS_BN_MP_RADIX_SIZE_C - #define AWS_BN_MP_TORADIX_C -#endif - -#if defined(AWS_BN_MP_GCD_C) - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_ABS_C - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_CNT_LSB_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_S_MP_SUB_C - #define AWS_BN_MP_MUL_2D_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_GET_INT_C) -#endif - -#if defined(AWS_BN_MP_GROW_C) -#endif - -#if defined(AWS_BN_MP_INIT_C) -#endif - -#if defined(AWS_BN_MP_INIT_COPY_C) - #define AWS_BN_MP_COPY_C -#endif - -#if defined(AWS_BN_MP_INIT_MULTI_C) - #define AWS_BN_MP_ERR_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_INIT_SET_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_SET_C -#endif - -#if defined(AWS_BN_MP_INIT_SET_INT_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_SET_INT_C -#endif - -#if defined(AWS_BN_MP_INIT_SIZE_C) - #define AWS_BN_MP_INIT_C -#endif - -#if defined(AWS_BN_MP_INVMOD_C) - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_ISODD_C - #define AWS_BN_FAST_MP_INVMOD_C - #define AWS_BN_MP_INVMOD_SLOW_C -#endif - -#if defined(AWS_BN_MP_INVMOD_SLOW_C) - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_MOD_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_ISEVEN_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_DIV_2_C - #define AWS_BN_MP_ISODD_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_CMP_C - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_MULTI_C -#endif - -#if defined(AWS_BN_MP_IS_SQUARE_C) - #define AWS_BN_MP_MOD_D_C - #define AWS_BN_MP_INIT_SET_INT_C - #define AWS_BN_MP_MOD_C - #define AWS_BN_MP_GET_INT_C - #define AWS_BN_MP_SQRT_C - #define AWS_BN_MP_SQR_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_JACOBI_C) - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_CNT_LSB_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_MOD_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_KARATSUBA_MUL_C) - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_LSHD_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_KARATSUBA_SQR_C) - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_SQR_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_S_MP_ADD_C - #define AWS_BN_MP_LSHD_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_LCM_C) - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_GCD_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_MP_DIV_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_CLEAR_MULTI_C -#endif - -#if defined(AWS_BN_MP_LSHD_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_RSHD_C -#endif - -#if defined(AWS_BN_MP_MOD_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_DIV_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_EXCH_C -#endif - -#if defined(AWS_BN_MP_MOD_2D_C) - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_MOD_D_C) - #define AWS_BN_MP_DIV_D_C -#endif - -#if defined(AWS_BN_MP_MONTGOMERY_CALC_NORMALIZATION_C) - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_2EXPT_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_MUL_2_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C -#endif - -#if defined(AWS_BN_MP_MONTGOMERY_REDUCE_C) - #define AWS_BN_FAST_MP_MONTGOMERY_REDUCE_C - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C -#endif - -#if defined(AWS_BN_MP_MONTGOMERY_SETUP_C) -#endif - -#if defined(AWS_BN_MP_MUL_C) - #define AWS_BN_MP_TOOM_MUL_C - #define AWS_BN_MP_KARATSUBA_MUL_C - #define AWS_BN_FAST_S_MP_MUL_DIGS_C - #define AWS_BN_S_MP_MUL_C - #define AWS_BN_S_MP_MUL_DIGS_C -#endif - -#if defined(AWS_BN_MP_MUL_2_C) - #define AWS_BN_MP_GROW_C -#endif - -#if defined(AWS_BN_MP_MUL_2D_C) - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_LSHD_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_MUL_D_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_MULMOD_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_MOD_C -#endif - -#if defined(AWS_BN_MP_N_ROOT_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_EXPT_D_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_MUL_D_C - #define AWS_BN_MP_DIV_C - #define AWS_BN_MP_CMP_C - #define AWS_BN_MP_SUB_D_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_NEG_C) - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_ISZERO_C -#endif - -#if defined(AWS_BN_MP_OR_C) - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_PRIME_FERMAT_C) - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_EXPTMOD_C - #define AWS_BN_MP_CMP_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_PRIME_IS_DIVISIBLE_C) - #define AWS_BN_MP_MOD_D_C -#endif - -#if defined(AWS_BN_MP_PRIME_IS_PRIME_C) - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_PRIME_IS_DIVISIBLE_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_PRIME_MILLER_RABIN_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_PRIME_MILLER_RABIN_C) - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_SUB_D_C - #define AWS_BN_MP_CNT_LSB_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_EXPTMOD_C - #define AWS_BN_MP_CMP_C - #define AWS_BN_MP_SQRMOD_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_PRIME_NEXT_PRIME_C) - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_SUB_D_C - #define AWS_BN_MP_ISEVEN_C - #define AWS_BN_MP_MOD_D_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_ADD_D_C - #define AWS_BN_MP_PRIME_MILLER_RABIN_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_PRIME_RABIN_MILLER_TRIALS_C) -#endif - -#if defined(AWS_BN_MP_PRIME_RANDOM_EX_C) - #define AWS_BN_MP_READ_UNSIGNED_BIN_C - #define AWS_BN_MP_PRIME_IS_PRIME_C - #define AWS_BN_MP_SUB_D_C - #define AWS_BN_MP_DIV_2_C - #define AWS_BN_MP_MUL_2_C - #define AWS_BN_MP_ADD_D_C -#endif - -#if defined(AWS_BN_MP_RADIX_SIZE_C) - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_DIV_D_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_RADIX_SMAP_C) - #define AWS_BN_MP_S_RMAP_C -#endif - -#if defined(AWS_BN_MP_RAND_C) - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_ADD_D_C - #define AWS_BN_MP_LSHD_C -#endif - -#if defined(AWS_BN_MP_READ_RADIX_C) - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_S_RMAP_C - #define AWS_BN_MP_RADIX_SMAP_C - #define AWS_BN_MP_MUL_D_C - #define AWS_BN_MP_ADD_D_C - #define AWS_BN_MP_ISZERO_C -#endif - -#if defined(AWS_BN_MP_READ_SIGNED_BIN_C) - #define AWS_BN_MP_READ_UNSIGNED_BIN_C -#endif - -#if defined(AWS_BN_MP_READ_UNSIGNED_BIN_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_MUL_2D_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_REDUCE_C) - #define AWS_BN_MP_REDUCE_SETUP_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_S_MP_MUL_HIGH_DIGS_C - #define AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C - #define AWS_BN_MP_MOD_2D_C - #define AWS_BN_S_MP_MUL_DIGS_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_CMP_D_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_LSHD_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_CMP_C - #define AWS_BN_S_MP_SUB_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_REDUCE_2K_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_MUL_D_C - #define AWS_BN_S_MP_ADD_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_REDUCE_2K_L_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_S_MP_ADD_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_REDUCE_2K_SETUP_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_2EXPT_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_S_MP_SUB_C -#endif - -#if defined(AWS_BN_MP_REDUCE_2K_SETUP_L_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_2EXPT_C - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_S_MP_SUB_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_REDUCE_IS_2K_C) - #define AWS_BN_MP_REDUCE_2K_C - #define AWS_BN_MP_COUNT_BITS_C -#endif - -#if defined(AWS_BN_MP_REDUCE_IS_2K_L_C) -#endif - -#if defined(AWS_BN_MP_REDUCE_SETUP_C) - #define AWS_BN_MP_2EXPT_C - #define AWS_BN_MP_DIV_C -#endif - -#if defined(AWS_BN_MP_RSHD_C) - #define AWS_BN_MP_ZERO_C -#endif - -#if defined(AWS_BN_MP_SET_C) - #define AWS_BN_MP_ZERO_C -#endif - -#if defined(AWS_BN_MP_SET_INT_C) - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_MUL_2D_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_SHRINK_C) -#endif - -#if defined(AWS_BN_MP_SIGNED_BIN_SIZE_C) - #define AWS_BN_MP_UNSIGNED_BIN_SIZE_C -#endif - -#if defined(AWS_BN_MP_SQR_C) - #define AWS_BN_MP_TOOM_SQR_C - #define AWS_BN_MP_KARATSUBA_SQR_C - #define AWS_BN_FAST_S_MP_SQR_C - #define AWS_BN_S_MP_SQR_C -#endif - -#if defined(AWS_BN_MP_SQRMOD_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_SQR_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_MOD_C -#endif - -#if defined(AWS_BN_MP_SQRT_C) - #define AWS_BN_MP_N_ROOT_C - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_ZERO_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_DIV_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_DIV_2_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_SUB_C) - #define AWS_BN_S_MP_ADD_C - #define AWS_BN_MP_CMP_MAG_C - #define AWS_BN_S_MP_SUB_C -#endif - -#if defined(AWS_BN_MP_SUB_D_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_ADD_D_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_MP_SUBMOD_C) - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_MOD_C -#endif - -#if defined(AWS_BN_MP_TO_SIGNED_BIN_C) - #define AWS_BN_MP_TO_UNSIGNED_BIN_C -#endif - -#if defined(AWS_BN_MP_TO_SIGNED_BIN_N_C) - #define AWS_BN_MP_SIGNED_BIN_SIZE_C - #define AWS_BN_MP_TO_SIGNED_BIN_C -#endif - -#if defined(AWS_BN_MP_TO_UNSIGNED_BIN_C) - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_DIV_2D_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_TO_UNSIGNED_BIN_N_C) - #define AWS_BN_MP_UNSIGNED_BIN_SIZE_C - #define AWS_BN_MP_TO_UNSIGNED_BIN_C -#endif - -#if defined(AWS_BN_MP_TOOM_MUL_C) - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_MOD_2D_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_MUL_2_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_DIV_2_C - #define AWS_BN_MP_MUL_2D_C - #define AWS_BN_MP_MUL_D_C - #define AWS_BN_MP_DIV_3_C - #define AWS_BN_MP_LSHD_C - #define AWS_BN_MP_CLEAR_MULTI_C -#endif - -#if defined(AWS_BN_MP_TOOM_SQR_C) - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_MOD_2D_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_RSHD_C - #define AWS_BN_MP_SQR_C - #define AWS_BN_MP_MUL_2_C - #define AWS_BN_MP_ADD_C - #define AWS_BN_MP_SUB_C - #define AWS_BN_MP_DIV_2_C - #define AWS_BN_MP_MUL_2D_C - #define AWS_BN_MP_MUL_D_C - #define AWS_BN_MP_DIV_3_C - #define AWS_BN_MP_LSHD_C - #define AWS_BN_MP_CLEAR_MULTI_C -#endif - -#if defined(AWS_BN_MP_TORADIX_C) - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_DIV_D_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_S_RMAP_C -#endif - -#if defined(AWS_BN_MP_TORADIX_N_C) - #define AWS_BN_MP_ISZERO_C - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_DIV_D_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_S_RMAP_C -#endif - -#if defined(AWS_BN_MP_UNSIGNED_BIN_SIZE_C) - #define AWS_BN_MP_COUNT_BITS_C -#endif - -#if defined(AWS_BN_MP_XOR_C) - #define AWS_BN_MP_INIT_COPY_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_MP_ZERO_C) -#endif - -#if defined(AWS_BN_PRIME_TAB_C) -#endif - -#if defined(AWS_BN_REVERSE_C) -#endif - -#if defined(AWS_BN_S_MP_ADD_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BN_S_MP_EXPTMOD_C) - #define AWS_BN_MP_COUNT_BITS_C - #define AWS_BN_MP_INIT_C - #define AWS_BN_MP_CLEAR_C - #define AWS_BN_MP_REDUCE_SETUP_C - #define AWS_BN_MP_REDUCE_C - #define AWS_BN_MP_REDUCE_2K_SETUP_L_C - #define AWS_BN_MP_REDUCE_2K_L_C - #define AWS_BN_MP_MOD_C - #define AWS_BN_MP_COPY_C - #define AWS_BN_MP_SQR_C - #define AWS_BN_MP_MUL_C - #define AWS_BN_MP_SET_C - #define AWS_BN_MP_EXCH_C -#endif - -#if defined(AWS_BN_S_MP_MUL_DIGS_C) - #define AWS_BN_FAST_S_MP_MUL_DIGS_C - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_S_MP_MUL_HIGH_DIGS_C) - #define AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_S_MP_SQR_C) - #define AWS_BN_MP_INIT_SIZE_C - #define AWS_BN_MP_CLAMP_C - #define AWS_BN_MP_EXCH_C - #define AWS_BN_MP_CLEAR_C -#endif - -#if defined(AWS_BN_S_MP_SUB_C) - #define AWS_BN_MP_GROW_C - #define AWS_BN_MP_CLAMP_C -#endif - -#if defined(AWS_BNCORE_C) -#endif - -#ifdef AWS_LTM3 -#define AWS_LTM_LAST -#endif -#include "aws_tommath_superclass.h" -#include "aws_tommath_class.h" -#else -#define AWS_LTM_LAST -#endif - -/* $Source$ */ -/* $Revision: 0.36 $ */ -/* $Date: 2005-08-01 16:37:28 +0000 $ */ diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath_superclass.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath_superclass.h deleted file mode 100755 index aa64d2d..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/aws_tommath_superclass.h +++ /dev/null @@ -1,76 +0,0 @@ -/* super class file for PK algos */ - -/* default ... include all MPI */ -#define AWS_LTM_ALL - -/* RSA only (does not support DH/DSA/ECC) */ -/* #define SC_RSA_1 */ - -/* For reference.... On an Athlon64 optimizing for speed... - - LTM's mpi.o with all functions [striped] is 142KiB in size. - -*/ - -/* Works for RSA only, mpi.o is 68KiB */ -#ifdef AWS_SC_RSA_1 - #define AWS_BN_MP_SHRINK_C - #define AWS_BN_MP_LCM_C - #define AWS_BN_MP_PRIME_RANDOM_EX_C - #define AWS_BN_MP_INVMOD_C - #define AWS_BN_MP_GCD_C - #define AWS_BN_MP_MOD_C - #define AWS_BN_MP_MULMOD_C - #define AWS_BN_MP_ADDMOD_C - #define AWS_BN_MP_EXPTMOD_C - #define AWS_BN_MP_SET_INT_C - #define AWS_BN_MP_INIT_MULTI_C - #define AWS_BN_MP_CLEAR_MULTI_C - #define AWS_BN_MP_UNSIGNED_BIN_SIZE_C - #define AWS_BN_MP_TO_UNSIGNED_BIN_C - #define AWS_BN_MP_MOD_D_C - #define AWS_BN_MP_PRIME_RABIN_MILLER_TRIALS_C - #define AWS_BN_REVERSE_C - #define AWS_BN_PRIME_TAB_C - - /* other modifiers */ - #define AWS_BN_MP_DIV_SMALL /* Slower division, not critical */ - - /* here we are on the last pass so we turn things off. The functions classes are still there - * but we remove them specifically from the build. This also invokes tweaks in functions - * like removing support for even moduli, etc... - */ -#ifdef AWS_LTM_LAST - #undef AWS_BN_MP_TOOM_MUL_C - #undef AWS_BN_MP_TOOM_SQR_C - #undef AWS_BN_MP_KARATSUBA_MUL_C - #undef AWS_BN_MP_KARATSUBA_SQR_C - #undef AWS_BN_MP_REDUCE_C - #undef AWS_BN_MP_REDUCE_SETUP_C - #undef AWS_BN_MP_DR_IS_MODULUS_C - #undef AWS_BN_MP_DR_SETUP_C - #undef AWS_BN_MP_DR_REDUCE_C - #undef AWS_BN_MP_REDUCE_IS_2K_C - #undef AWS_BN_MP_REDUCE_2K_SETUP_C - #undef AWS_BN_MP_REDUCE_2K_C - #undef AWS_BN_S_MP_EXPTMOD_C - #undef AWS_BN_MP_DIV_3_C - #undef AWS_BN_S_MP_MUL_HIGH_DIGS_C - #undef AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C - #undef AWS_BN_FAST_MP_INVMOD_C - - /* To safely undefine these you have to make sure your RSA key won't exceed the Comba threshold - * which is roughly 255 digits [7140 bits for 32-bit machines, 15300 bits for 64-bit machines] - * which means roughly speaking you can handle upto 2536-bit RSA keys with these defined without - * trouble. - */ - #undef AWS_BN_S_MP_MUL_DIGS_C - #undef AWS_BN_S_MP_SQR_C - #undef AWS_BN_MP_MONTGOMERY_REDUCE_C -#endif - -#endif - -/* $Source$ */ -/* $Revision: 0.36 $ */ -/* $Date: 2005-08-01 16:37:28 +0000 $ */ diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/tommath.c b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/tommath.c deleted file mode 100644 index 0602422..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/JKBigInteger/LibTomMath/tommath.c +++ /dev/null @@ -1,6964 +0,0 @@ -#include "aws_tommath.h" - -#ifdef AWS_BN_S_MP_MUL_DIGS_C -/* LibTomMath, multiple-precision integer library -- Tom St Denis - * - * LibTomMath is a library that provides multiple-precision - * integer arithmetic as well as number theoretic functionality. - * - * The library was designed directly after the MPI library by - * Michael Fromberger but has been written from scratch with - * additional optimizations in place. - * - * The library is free for all purposes without any express - * guarantee it works. - * - * Tom St Denis, tomstdenis@gmail.com, http://libtom.org - */ - -/* multiplies |a| * |b| and only computes upto digs digits of result - * HAC pp. 595, Algorithm 14.12 Modified so you can control how - * many digits of output are created. - */ -int aws_s_mp_mul_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs) -{ - aws_mp_int t; - int res, pa, pb, ix, iy; - aws_mp_digit u; - aws_mp_word r; - aws_mp_digit tmpx, *tmpt, *tmpy; - - /* can we use the fast multiplier? */ - if (((digs) < AWS_MP_WARRAY) && - AWS_MIN (a->used, b->used) < - (1 << ((CHAR_BIT * sizeof (aws_mp_word)) - (2 * AWS_DIGIT_BIT)))) { - return aws_fast_s_mp_mul_digs(a, b, c, digs); - } - - if ((res = aws_mp_init_size(&t, digs)) != AWS_MP_OKAY) { - return res; - } - t.used = digs; - - /* compute the digits of the product directly */ - pa = a->used; - for (ix = 0; ix < pa; ix++) { - /* set the carry to zero */ - u = 0; - - /* limit ourselves to making digs digits of output */ - pb = AWS_MIN (b->used, digs - ix); - - /* setup some aliases */ - /* copy of the digit from a used within the nested loop */ - tmpx = a->dp[ix]; - - /* an alias for the destination shifted ix places */ - tmpt = t.dp + ix; - - /* an alias for the digits of b */ - tmpy = b->dp; - - /* compute the columns of the output and propagate the carry */ - for (iy = 0; iy < pb; iy++) { - /* compute the column as a aws_mp_word */ - r = ((aws_mp_word)*tmpt) + - ((aws_mp_word)tmpx) * ((aws_mp_word)*tmpy++) + - ((aws_mp_word) u); - - /* the new column is the lower part of the result */ - *tmpt++ = (aws_mp_digit) (r & ((aws_mp_word) AWS_MP_MASK)); - - /* get the carry word from the result */ - u = (aws_mp_digit) (r >> ((aws_mp_word) AWS_DIGIT_BIT)); - } - /* set carry if it is placed below digs */ - if (ix + iy < digs) { - *tmpt = u; - } - } - - aws_mp_clamp(&t); - aws_mp_exch(&t, c); - - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_TO_UNSIGNED_BIN_N_C - -/* store in unsigned [big endian] format */ -int aws_mp_to_unsigned_bin_n(aws_mp_int *a, unsigned char *b, unsigned long *outlen) -{ - if (*outlen < (unsigned long) aws_mp_unsigned_bin_size(a)) { - return AWS_MP_VAL; - } - *outlen = aws_mp_unsigned_bin_size(a); - return aws_mp_to_unsigned_bin(a, b); -} -#endif - -#ifdef AWS_BN_MP_EXPT_D_C - -/* calculate c = a**b using a square-multiply algorithm */ -int aws_mp_expt_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c) -{ - int res, x; - aws_mp_int g; - - if ((res = aws_mp_init_copy(&g, a)) != AWS_MP_OKAY) { - return res; - } - - /* set initial result */ - aws_mp_set(c, 1); - - for (x = 0; x < (int) AWS_DIGIT_BIT; x++) { - /* square */ - if ((res = aws_mp_sqr(c, c)) != AWS_MP_OKAY) { - aws_mp_clear(&g); - return res; - } - - /* if the bit is set multiply */ - if ((b & (aws_mp_digit) (((aws_mp_digit)1) << (AWS_DIGIT_BIT - 1))) != 0) { - if ((res = aws_mp_mul(c, &g, c)) != AWS_MP_OKAY) { - aws_mp_clear(&g); - return res; - } - } - - /* shift to next bit */ - b <<= 1; - } - - aws_mp_clear(&g); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_SET_INT_C - -/* set a 32-bit const */ -int aws_mp_set_int(aws_mp_int *a, unsigned long b) -{ - int x, res; - - aws_mp_zero(a); - - /* set four bits at a time */ - for (x = 0; x < 8; x++) { - /* shift the number up four bits */ - if ((res = aws_mp_mul_2d(a, 4, a)) != AWS_MP_OKAY) { - return res; - } - - /* OR in the top four bits of the source */ - a->dp[0] |= (b >> 28) & 15; - - /* shift the source up to the next four bits */ - b <<= 4; - - /* ensure that digits are not clamped off */ - a->used += 1; - } - aws_mp_clamp(a); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_ADD_C - -/* high level addition (handles signs) */ -int aws_mp_add(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int sa, sb, res; - - /* get sign of both inputs */ - sa = a->sign; - sb = b->sign; - - /* handle two cases, not four */ - if (sa == sb) { - /* both positive or both negative */ - /* add their magnitudes, copy the sign */ - c->sign = sa; - res = aws_s_mp_add(a, b, c); - } else { - /* one positive, the other negative */ - /* subtract the one with the greater magnitude from */ - /* the one of the lesser magnitude. The result gets */ - /* the sign of the one with the greater magnitude. */ - if (aws_mp_cmp_mag(a, b) == AWS_MP_LT) { - c->sign = sb; - res = aws_s_mp_sub(b, a, c); - } else { - c->sign = sa; - res = aws_s_mp_sub(a, b, c); - } - } - return res; -} - -#endif - -#ifdef AWS_BN_MP_INIT_C - -/* init a new mp_int */ -int aws_mp_init(aws_mp_int *a) -{ - int i; - - /* allocate memory required and clear it */ - a->dp = AWS_OPT_CAST(aws_mp_digit) AWS_XMALLOC (sizeof (aws_mp_digit) * AWS_MP_PREC); - if (a->dp == NULL) { - return AWS_MP_MEM; - } - - /* set the digits to zero */ - for (i = 0; i < AWS_MP_PREC; i++) { - a->dp[i] = 0; - } - - /* set the used to zero, allocated digits to the default precision - * and sign to positive */ - a->used = 0; - a->alloc = AWS_MP_PREC; - a->sign = AWS_MP_ZPOS; - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_CNT_LSB_C - -static const int lnz[16] = { - 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 -}; - -/* Counts the number of lsbs which are zero before the first zero bit */ -int aws_mp_cnt_lsb(aws_mp_int *a) -{ - int x; - aws_mp_digit q, qq; - - /* easy out */ - if (aws_mp_iszero(a) == 1) { - return 0; - } - - /* scan lower digits until non-zero */ - for (x = 0; x < a->used && a->dp[x] == 0; x++); - q = a->dp[x]; - x *= AWS_DIGIT_BIT; - - /* now scan this digit until a 1 is found */ - if ((q & 1) == 0) { - do { - qq = q & 15; - x += lnz[qq]; - q >>= 4; - } while (qq == 0); - } - return x; -} - -#endif - -#ifdef AWS_BN_MP_TOOM_SQR_C - -/* squaring using Toom-Cook 3-way algorithm */ -int -aws_mp_toom_sqr(aws_mp_int *a, aws_mp_int *b) -{ - aws_mp_int w0, w1, w2, w3, w4, tmp1, a0, a1, a2; - int res, B; - - /* init temps */ - if ((res = aws_mp_init_multi(&w0, &w1, &w2, &w3, &w4, &a0, &a1, &a2, &tmp1, NULL)) != AWS_MP_OKAY) { - return res; - } - - /* B */ - B = a->used / 3; - - /* a = a2 * B**2 + a1 * B + a0 */ - if ((res = aws_mp_mod_2d(a, AWS_DIGIT_BIT * B, &a0)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_copy(a, &a1)) != AWS_MP_OKAY) { - goto ERR; - } - aws_mp_rshd(&a1, B); - aws_mp_mod_2d(&a1, AWS_DIGIT_BIT * B, &a1); - - if ((res = aws_mp_copy(a, &a2)) != AWS_MP_OKAY) { - goto ERR; - } - aws_mp_rshd(&a2, B * 2); - - /* w0 = a0*a0 */ - if ((res = aws_mp_sqr(&a0, &w0)) != AWS_MP_OKAY) { - goto ERR; - } - - /* w4 = a2 * a2 */ - if ((res = aws_mp_sqr(&a2, &w4)) != AWS_MP_OKAY) { - goto ERR; - } - - /* w1 = (a2 + 2(a1 + 2a0))**2 */ - if ((res = aws_mp_mul_2(&a0, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_mul_2(&tmp1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a2, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_sqr(&tmp1, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - - /* w3 = (a0 + 2(a1 + 2a2))**2 */ - if ((res = aws_mp_mul_2(&a2, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_mul_2(&tmp1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a0, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_sqr(&tmp1, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - - - /* w2 = (a2 + a1 + a0)**2 */ - if ((res = aws_mp_add(&a2, &a1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a0, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sqr(&tmp1, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - - /* now solve the matrix - - 0 0 0 0 1 - 1 2 4 8 16 - 1 1 1 1 1 - 16 8 4 2 1 - 1 0 0 0 0 - - using 12 subtractions, 4 shifts, 2 small divisions and 1 small multiplication. - */ - - /* r1 - r4 */ - if ((res = aws_mp_sub(&w1, &w4, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - r0 */ - if ((res = aws_mp_sub(&w3, &w0, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1/2 */ - if ((res = aws_mp_div_2(&w1, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3/2 */ - if ((res = aws_mp_div_2(&w3, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r2 - r0 - r4 */ - if ((res = aws_mp_sub(&w2, &w0, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w2, &w4, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1 - r2 */ - if ((res = aws_mp_sub(&w1, &w2, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - r2 */ - if ((res = aws_mp_sub(&w3, &w2, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1 - 8r0 */ - if ((res = aws_mp_mul_2d(&w0, 3, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w1, &tmp1, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - 8r4 */ - if ((res = aws_mp_mul_2d(&w4, 3, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w3, &tmp1, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* 3r2 - r1 - r3 */ - if ((res = aws_mp_mul_d(&w2, 3, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w2, &w1, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w2, &w3, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1 - r2 */ - if ((res = aws_mp_sub(&w1, &w2, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - r2 */ - if ((res = aws_mp_sub(&w3, &w2, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1/3 */ - if ((res = aws_mp_div_3(&w1, &w1, NULL)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3/3 */ - if ((res = aws_mp_div_3(&w3, &w3, NULL)) != AWS_MP_OKAY) { - goto ERR; - } - - /* at this point shift W[n] by B*n */ - if ((res = aws_mp_lshd(&w1, 1 * B)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_lshd(&w2, 2 * B)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_lshd(&w3, 3 * B)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_lshd(&w4, 4 * B)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_add(&w0, &w1, b)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&w2, &w3, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&w4, &tmp1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, b, b)) != AWS_MP_OKAY) { - goto ERR; - } - -ERR: -aws_mp_clear_multi(&w0, &w1, &w2, &w3, &w4, &a0, &a1, &a2, &tmp1, NULL); - return res; -} - -#endif - -#ifdef AWS_BN_MP_FREAD_C - -/* read a bigint from a file stream in ASCII */ -int aws_mp_fread(aws_mp_int *a, int radix, FILE *stream) -{ - int err, ch, neg, y; - - /* clear a */ - aws_mp_zero(a); - - /* if first digit is - then set negative */ - ch = fgetc(stream); - if (ch == '-') { - neg = AWS_MP_NEG; - ch = fgetc(stream); - } else { - neg = AWS_MP_ZPOS; - } - - for (;;) { - /* find y in the radix map */ - for (y = 0; y < radix; y++) { - if (aws_mp_s_rmap[y] == ch) { - break; - } - } - if (y == radix) { - break; - } - - /* shift up and add */ - if ((err = aws_mp_mul_d(a, radix, a)) != AWS_MP_OKAY) { - return err; - } - if ((err = aws_mp_add_d(a, y, a)) != AWS_MP_OKAY) { - return err; - } - - ch = fgetc(stream); - } - if (aws_mp_cmp_d(a, 0) != AWS_MP_EQ) { - a->sign = neg; - } - - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_DIV_3_C - -/* divide by three (based on routine from MPI and the GMP manual) */ -int -aws_mp_div_3(aws_mp_int *a, aws_mp_int *c, aws_mp_digit *d) -{ - aws_mp_int q; - aws_mp_word w, t; - aws_mp_digit b; - int res, ix; - - /* b = 2**AWS_DIGIT_BIT / 3 */ - b = (((aws_mp_word)1) << ((aws_mp_word)AWS_DIGIT_BIT)) / ((aws_mp_word)3); - - if ((res = aws_mp_init_size(&q, a->used)) != AWS_MP_OKAY) { - return res; - } - - q.used = a->used; - q.sign = a->sign; - w = 0; - for (ix = a->used - 1; ix >= 0; ix--) { - w = (w << ((aws_mp_word)AWS_DIGIT_BIT)) | ((aws_mp_word)a->dp[ix]); - - if (w >= 3) { - /* multiply w by [1/3] */ - t = (w * ((aws_mp_word)b)) >> ((aws_mp_word)AWS_DIGIT_BIT); - - /* now subtract 3 * [w/3] from w, to get the remainder */ - w -= t+t+t; - - /* fixup the remainder as required since - * the optimization is not exact. - */ - while (w >= 3) { - t += 1; - w -= 3; - } - } else { - t = 0; - } - q.dp[ix] = (aws_mp_digit)t; - } - - /* [optional] store the remainder */ - if (d != NULL) { - *d = (aws_mp_digit)w; - } - - /* [optional] store the quotient */ - if (c != NULL) { - aws_mp_clamp(&q); - aws_mp_exch(&q, c); - } - aws_mp_clear(&q); - - return res; -} - -#endif - -#ifdef AWS_BN_MP_LCM_C - -/* computes least common multiple as |a*b|/(a, b) */ -int aws_aws_mp_lcm(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int res; - aws_mp_int t1, t2; - - - if ((res = aws_mp_init_multi(&t1, &t2, NULL)) != AWS_MP_OKAY) { - return res; - } - - /* t1 = get the GCD of the two inputs */ - if ((res = aws_mp_gcd(a, b, &t1)) != AWS_MP_OKAY) { - goto LBL_T; - } - - /* divide the smallest by the GCD */ - if (aws_mp_cmp_mag(a, b) == AWS_MP_LT) { - /* store quotient in t2 such that t2 * b is the LCM */ - if ((res = aws_mp_div(a, &t1, &t2, NULL)) != AWS_MP_OKAY) { - goto LBL_T; - } - res = aws_mp_mul(b, &t2, c); - } else { - /* store quotient in t2 such that t2 * a is the LCM */ - if ((res = aws_mp_div(b, &t1, &t2, NULL)) != AWS_MP_OKAY) { - goto LBL_T; - } - res = aws_mp_mul(a, &t2, c); - } - - /* fix the sign to positive */ - c->sign = AWS_MP_ZPOS; - -LBL_T: -aws_mp_clear_multi(&t1, &t2, NULL); - return res; -} -#endif - -#ifdef AWS_BN_MP_REDUCE_IS_2K_C - -/* determines if aws_mp_reduce_2k can be used */ -int aws_mp_reduce_is_2k(aws_mp_int *a) -{ - int ix, iy, iw; - aws_mp_digit iz; - - if (a->used == 0) { - return AWS_MP_NO; - } else if (a->used == 1) { - return AWS_MP_YES; - } else if (a->used > 1) { - iy = aws_mp_count_bits(a); - iz = 1; - iw = 1; - - /* Test every bit from the second digit up, must be 1 */ - for (ix = AWS_DIGIT_BIT; ix < iy; ix++) { - if ((a->dp[iw] & iz) == 0) { - return AWS_MP_NO; - } - iz <<= 1; - if (iz > (aws_mp_digit)AWS_MP_MASK) { - ++iw; - iz = 1; - } - } - } - return AWS_MP_YES; -} - -#endif - -#ifdef AWS_BNCORE_C - -/* Known optimal configurations - - CPU /Compiler /MUL CUTOFF/SQR CUTOFF -------------------------------------------------------------- - Intel P4 Northwood /GCC v3.4.1 / 88/ 128/LTM 0.32 ;-) - AMD Athlon64 /GCC v3.4.4 / 80/ 120/LTM 0.35 - -*/ - -int AWS_KARATSUBA_MUL_CUTOFF = 80, /* Min. number of digits before Karatsuba multiplication is used. */ - AWS_KARATSUBA_SQR_CUTOFF = 120, /* Min. number of digits before Karatsuba squaring is used. */ - - AWS_TOOM_MUL_CUTOFF = 350, /* no optimal values of these are known yet so set em high */ - AWS_TOOM_SQR_CUTOFF = 400; -#endif - -#ifdef AWS_BN_MP_MOD_2D_C - -/* calc a value mod 2**b */ -int -aws_mp_mod_2d(aws_mp_int *a, int b, aws_mp_int *c) -{ - int x, res; - - /* if b is <= 0 then zero the int */ - if (b <= 0) { - aws_mp_zero(c); - return AWS_MP_OKAY; - } - - /* if the modulus is larger than the value than return */ - if (b >= (int) (a->used * AWS_DIGIT_BIT)) { - res = aws_mp_copy(a, c); - return res; - } - - /* copy */ - if ((res = aws_mp_copy(a, c)) != AWS_MP_OKAY) { - return res; - } - - /* zero digits above the last digit of the modulus */ - for (x = (b / AWS_DIGIT_BIT) + ((b % AWS_DIGIT_BIT) == 0 ? 0 : 1); x < c->used; x++) { - c->dp[x] = 0; - } - /* clear the digit that is not completely outside/inside the modulus */ - c->dp[b / AWS_DIGIT_BIT] &= - (aws_mp_digit) ((((aws_mp_digit) 1) << (((aws_mp_digit) b) % AWS_DIGIT_BIT)) - ((aws_mp_digit) 1)); - aws_mp_clamp(c); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_N_ROOT_C - -/* find the n'th root of an integer - * - * Result found such that (c)**b <= a and (c+1)**b > a - * - * This algorithm uses Newton's approximation - * x[i+1] = x[i] - f(x[i])/f'(x[i]) - * which will find the root in log(N) time where - * each step involves a fair bit. This is not meant to - * find huge roots [square and cube, etc]. - */ -int aws_mp_n_root(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c) -{ - aws_mp_int t1, t2, t3; - int res, neg; - - /* input must be positive if b is even */ - if ((b & 1) == 0 && a->sign == AWS_MP_NEG) { - return AWS_MP_VAL; - } - - if ((res = aws_mp_init(&t1)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_init(&t2)) != AWS_MP_OKAY) { - goto LBL_T1; - } - - if ((res = aws_mp_init(&t3)) != AWS_MP_OKAY) { - goto LBL_T2; - } - - /* if a is negative fudge the sign but keep track */ - neg = a->sign; - a->sign = AWS_MP_ZPOS; - - /* t2 = 2 */ - aws_mp_set(&t2, 2); - - do { - /* t1 = t2 */ - if ((res = aws_mp_copy(&t2, &t1)) != AWS_MP_OKAY) { - goto LBL_T3; - } - - /* t2 = t1 - ((t1**b - a) / (b * t1**(b-1))) */ - - /* t3 = t1**(b-1) */ - if ((res = aws_mp_expt_d(&t1, b - 1, &t3)) != AWS_MP_OKAY) { - goto LBL_T3; - } - - /* numerator */ - /* t2 = t1**b */ - if ((res = aws_mp_mul(&t3, &t1, &t2)) != AWS_MP_OKAY) { - goto LBL_T3; - } - - /* t2 = t1**b - a */ - if ((res = aws_mp_sub(&t2, a, &t2)) != AWS_MP_OKAY) { - goto LBL_T3; - } - - /* denominator */ - /* t3 = t1**(b-1) * b */ - if ((res = aws_mp_mul_d(&t3, b, &t3)) != AWS_MP_OKAY) { - goto LBL_T3; - } - - /* t3 = (t1**b - a)/(b * t1**(b-1)) */ - if ((res = aws_mp_div(&t2, &t3, &t3, NULL)) != AWS_MP_OKAY) { - goto LBL_T3; - } - - if ((res = aws_mp_sub(&t1, &t3, &t2)) != AWS_MP_OKAY) { - goto LBL_T3; - } - } while (aws_mp_cmp(&t1, &t2) != AWS_MP_EQ); - - /* result can be off by a few so check */ - for (;;) { - if ((res = aws_mp_expt_d(&t1, b, &t2)) != AWS_MP_OKAY) { - goto LBL_T3; - } - - if (aws_mp_cmp(&t2, a) == AWS_MP_GT) { - if ((res = aws_mp_sub_d(&t1, 1, &t1)) != AWS_MP_OKAY) { - goto LBL_T3; - } - } else { - break; - } - } - - /* reset the sign of a first */ - a->sign = neg; - - /* set the result */ - aws_mp_exch(&t1, c); - - /* set the sign of the result */ - c->sign = neg; - - res = AWS_MP_OKAY; - -LBL_T3: -aws_mp_clear(&t3); -LBL_T2: -aws_mp_clear(&t2); -LBL_T1: -aws_mp_clear(&t1); - return res; -} -#endif - -#ifdef AWS_BN_MP_MULMOD_C - -/* d = a * b (mod c) */ -int aws_mp_mulmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d) -{ - int res; - aws_mp_int t; - - if ((res = aws_mp_init(&t)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_mul(a, b, &t)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - res = aws_mp_mod(&t, c, d); - aws_mp_clear(&t); - return res; -} -#endif - -#ifdef AWS_BN_ERROR_C - -static const struct { - int code; - char *msg; -} msgs[] = { - { AWS_MP_OKAY, "Successful" }, - { AWS_MP_MEM, "Out of heap" }, - { AWS_MP_VAL, "Value out of range" } -}; - -/* return a char * string for a given code */ -char *aws_mp_error_to_string(int code) -{ - int x; - - /* scan the lookup table for the given message */ - for (x = 0; x < (int)(sizeof(msgs) / sizeof(msgs[0])); x++) { - if (msgs[x].code == code) { - return msgs[x].msg; - } - } - - /* generic reply for invalid code */ - return "Invalid error code"; -} - -#endif - -#ifdef AWS_BN_MP_REDUCE_C - -/* reduces x mod m, assumes 0 < x < m**2, mu is - * precomputed via aws_mp_reduce_setup. - * From HAC pp.604 Algorithm 14.42 - */ -int aws_mp_reduce(aws_mp_int *x, aws_mp_int *m, aws_mp_int *mu) -{ - aws_mp_int q; - int res, um = m->used; - - /* q = x */ - if ((res = aws_mp_init_copy(&q, x)) != AWS_MP_OKAY) { - return res; - } - - /* q1 = x / b**(k-1) */ - aws_mp_rshd(&q, um - 1); - - /* according to HAC this optimization is ok */ - if (((unsigned long) um) > (((aws_mp_digit)1) << (AWS_DIGIT_BIT - 1))) { - if ((res = aws_mp_mul(&q, mu, &q)) != AWS_MP_OKAY) { - goto CLEANUP; - } - } else { -#ifdef AWS_BN_S_MP_MUL_HIGH_DIGS_C - if ((res = aws_s_mp_mul_high_digs(&q, mu, &q, um)) != AWS_MP_OKAY) { - goto CLEANUP; - } -#elif defined(AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C) - if ((res = fast_s_mp_mul_high_digs (&q, mu, &q, um)) != AWS_MP_OKAY) { - goto CLEANUP; - } -#else - { - res = AWS_MP_VAL; - goto CLEANUP; - } -#endif - } - - /* q3 = q2 / b**(k+1) */ - aws_mp_rshd(&q, um + 1); - - /* x = x mod b**(k+1), quick (no division) */ - if ((res = aws_mp_mod_2d(x, AWS_DIGIT_BIT * (um + 1), x)) != AWS_MP_OKAY) { - goto CLEANUP; - } - - /* q = q * m mod b**(k+1), quick (no division) */ - if ((res = aws_s_mp_mul_digs(&q, m, &q, um + 1)) != AWS_MP_OKAY) { - goto CLEANUP; - } - - /* x = x - q */ - if ((res = aws_mp_sub(x, &q, x)) != AWS_MP_OKAY) { - goto CLEANUP; - } - - /* If x < 0, add b**(k+1) to it */ - if (aws_mp_cmp_d(x, 0) == AWS_MP_LT) { - aws_mp_set(&q, 1); - if ((res = aws_mp_lshd(&q, um + 1)) != AWS_MP_OKAY) - goto CLEANUP; - if ((res = aws_mp_add(x, &q, x)) != AWS_MP_OKAY) - goto CLEANUP; - } - - /* Back off if it's too big */ - while (aws_mp_cmp(x, m) != AWS_MP_LT) { - if ((res = aws_s_mp_sub(x, m, x)) != AWS_MP_OKAY) { - goto CLEANUP; - } - } - -CLEANUP: -aws_mp_clear(&q); - - return res; -} -#endif - -#ifdef AWS_BN_MP_KARATSUBA_SQR_C - -/* Karatsuba squaring, computes b = a*a using three - * half size squarings - * - * See comments of karatsuba_mul for details. It - * is essentially the same algorithm but merely - * tuned to perform recursive squarings. - */ -int aws_mp_karatsuba_sqr(aws_mp_int *a, aws_mp_int *b) -{ - aws_mp_int x0, x1, t1, t2, x0x0, x1x1; - int B, err; - - err = AWS_MP_MEM; - - /* min # of digits */ - B = a->used; - - /* now divide in two */ - B = B >> 1; - - /* init copy all the temps */ - if (aws_mp_init_size(&x0, B) != AWS_MP_OKAY) - goto ERR; - if (aws_mp_init_size(&x1, a->used - B) != AWS_MP_OKAY) - goto X0; - - /* init temps */ - if (aws_mp_init_size(&t1, a->used * 2) != AWS_MP_OKAY) - goto X1; - if (aws_mp_init_size(&t2, a->used * 2) != AWS_MP_OKAY) - goto T1; - if (aws_mp_init_size(&x0x0, B * 2) != AWS_MP_OKAY) - goto T2; - if (aws_mp_init_size(&x1x1, (a->used - B) * 2) != AWS_MP_OKAY) - goto X0X0; - - { - register int x; - register aws_mp_digit *dst, *src; - - src = a->dp; - - /* now shift the digits */ - dst = x0.dp; - for (x = 0; x < B; x++) { - *dst++ = *src++; - } - - dst = x1.dp; - for (x = B; x < a->used; x++) { - *dst++ = *src++; - } - } - - x0.used = B; - x1.used = a->used - B; - - aws_mp_clamp(&x0); - - /* now calc the products x0*x0 and x1*x1 */ - if (aws_mp_sqr(&x0, &x0x0) != AWS_MP_OKAY) - goto X1X1; /* x0x0 = x0*x0 */ - if (aws_mp_sqr(&x1, &x1x1) != AWS_MP_OKAY) - goto X1X1; /* x1x1 = x1*x1 */ - - /* now calc (x1+x0)**2 */ - if (aws_s_mp_add(&x1, &x0, &t1) != AWS_MP_OKAY) - goto X1X1; /* t1 = x1 - x0 */ - if (aws_mp_sqr(&t1, &t1) != AWS_MP_OKAY) - goto X1X1; /* t1 = (x1 - x0) * (x1 - x0) */ - - /* add x0y0 */ - if (aws_s_mp_add(&x0x0, &x1x1, &t2) != AWS_MP_OKAY) - goto X1X1; /* t2 = x0x0 + x1x1 */ - if (aws_s_mp_sub(&t1, &t2, &t1) != AWS_MP_OKAY) - goto X1X1; /* t1 = (x1+x0)**2 - (x0x0 + x1x1) */ - - /* shift by B */ - if (aws_mp_lshd(&t1, B) != AWS_MP_OKAY) - goto X1X1; /* t1 = (x0x0 + x1x1 - (x1-x0)*(x1-x0))<sign = AWS_MP_ZPOS; - a->used = 0; - - tmp = a->dp; - for (n = 0; n < a->alloc; n++) { - *tmp++ = 0; - } -} -#endif - -#ifdef AWS_BN_MP_TORADIX_C - -/* stores a bignum as a ASCII string in a given radix (2..64) */ -int aws_mp_toradix(aws_mp_int *a, char *str, int radix) -{ - int res, digs; - aws_mp_int t; - aws_mp_digit d; - char *_s = str; - - /* check range of the radix */ - if (radix < 2 || radix > 64) { - return AWS_MP_VAL; - } - - /* quick out if its zero */ - if (aws_mp_iszero(a) == 1) { - *str++ = '0'; - *str = '\0'; - return AWS_MP_OKAY; - } - - if ((res = aws_mp_init_copy(&t, a)) != AWS_MP_OKAY) { - return res; - } - - /* if it is negative output a - */ - if (t.sign == AWS_MP_NEG) { - ++_s; - *str++ = '-'; - t.sign = AWS_MP_ZPOS; - } - - digs = 0; - while (aws_mp_iszero (&t) == 0) { - if ((res = aws_mp_div_d(&t, (aws_mp_digit) radix, &t, &d)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - *str++ = aws_mp_s_rmap[d]; - ++digs; - } - - /* reverse the digits of the string. In this case _s points - * to the first digit [exluding the sign] of the number] - */ - aws_bn_reverse((unsigned char *) _s, digs); - - /* append a NULL so the string is properly terminated */ - *str = '\0'; - - aws_mp_clear(&t); - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_DIV_D_C - -static int s_is_power_of_two(aws_mp_digit b, int *p) -{ - int x; - - /* fast return if no power of two */ - if ((b==0) || (b & (b-1))) { - return 0; - } - - for (x = 0; x < AWS_DIGIT_BIT; x++) { - if (b == (((aws_mp_digit)1)<dp[0] & ((((aws_mp_digit)1)<used)) != AWS_MP_OKAY) { - return res; - } - - q.used = a->used; - q.sign = a->sign; - w = 0; - for (ix = a->used - 1; ix >= 0; ix--) { - w = (w << ((aws_mp_word)AWS_DIGIT_BIT)) | ((aws_mp_word)a->dp[ix]); - - if (w >= b) { - t = (aws_mp_digit)(w / b); - w -= ((aws_mp_word)t) * ((aws_mp_word)b); - } else { - t = 0; - } - q.dp[ix] = (aws_mp_digit)t; - } - - if (d != NULL) { - *d = (aws_mp_digit)w; - } - - if (c != NULL) { - aws_mp_clamp(&q); - aws_mp_exch(&q, c); - } - aws_mp_clear(&q); - - return res; -} - -#endif - -#ifdef AWS_BN_MP_SUB_C - -/* high level subtraction (handles signs) */ -int -aws_mp_sub(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int sa, sb, res; - - sa = a->sign; - sb = b->sign; - - if (sa != sb) { - /* subtract a negative from a positive, OR */ - /* subtract a positive from a negative. */ - /* In either case, ADD their magnitudes, */ - /* and use the sign of the first number. */ - c->sign = sa; - res = aws_s_mp_add(a, b, c); - } else { - /* subtract a positive from a positive, OR */ - /* subtract a negative from a negative. */ - /* First, take the difference between their */ - /* magnitudes, then... */ - if (aws_mp_cmp_mag(a, b) != AWS_MP_LT) { - /* Copy the sign from the first */ - c->sign = sa; - /* The first has a larger or equal magnitude */ - res = aws_s_mp_sub(a, b, c); - } else { - /* The result has the *opposite* sign from */ - /* the first number. */ - c->sign = (sa == AWS_MP_ZPOS) ? AWS_MP_NEG : AWS_MP_ZPOS; - /* The second has a larger magnitude */ - res = aws_s_mp_sub(b, a, c); - } - } - return res; -} - -#endif - -#ifdef AWS_BN_MP_INIT_SIZE_C - -/* init an mp_init for a given size */ -int aws_mp_init_size(aws_mp_int *a, int size) -{ - int x; - - /* pad size so there are always extra digits */ - size += (AWS_MP_PREC * 2) - (size % AWS_MP_PREC); - - /* alloc mem */ - a->dp = AWS_OPT_CAST(aws_mp_digit) AWS_XMALLOC (sizeof (aws_mp_digit) * size); - if (a->dp == NULL) { - return AWS_MP_MEM; - } - - /* set the members */ - a->used = 0; - a->alloc = size; - a->sign = AWS_MP_ZPOS; - - /* zero the digits */ - for (x = 0; x < size; x++) { - a->dp[x] = 0; - } - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_PRIME_NEXT_PRIME_C - -/* finds the next prime after the number "a" using "t" trials - * of Miller-Rabin. - * - * bbs_style = 1 means the prime must be congruent to 3 mod 4 - */ -int aws_mp_prime_next_prime(aws_mp_int *a, int t, int bbs_style) -{ - int err, res = 0, x, y; - aws_mp_digit res_tab[AWS_JKTM_PRIME_SIZE], step, kstep; - aws_mp_int b; - - /* ensure t is valid */ - if (t <= 0 || t > AWS_JKTM_PRIME_SIZE) { - return AWS_MP_VAL; - } - - /* force positive */ - a->sign = AWS_MP_ZPOS; - - /* simple algo if a is less than the largest prime in the table */ - if (aws_mp_cmp_d(a, aws_ltm_prime_tab[AWS_JKTM_PRIME_SIZE - 1]) == AWS_MP_LT) { - /* find which prime it is bigger than */ - for (x = AWS_JKTM_PRIME_SIZE - 2; x >= 0; x--) { - if (aws_mp_cmp_d(a, aws_ltm_prime_tab[x]) != AWS_MP_LT) { - if (bbs_style == 1) { - /* ok we found a prime smaller or - * equal [so the next is larger] - * - * however, the prime must be - * congruent to 3 mod 4 - */ - if ((aws_ltm_prime_tab[x + 1] & 3) != 3) { - /* scan upwards for a prime congruent to 3 mod 4 */ - for (y = x + 1; y < AWS_JKTM_PRIME_SIZE; y++) { - if ((aws_ltm_prime_tab[y] & 3) == 3) { - aws_mp_set(a, aws_ltm_prime_tab[y]); - return AWS_MP_OKAY; - } - } - } - } else { - aws_mp_set(a, aws_ltm_prime_tab[x + 1]); - return AWS_MP_OKAY; - } - } - } - /* at this point a maybe 1 */ - if (aws_mp_cmp_d(a, 1) == AWS_MP_EQ) { - aws_mp_set(a, 2); - return AWS_MP_OKAY; - } - /* fall through to the sieve */ - } - - /* generate a prime congruent to 3 mod 4 or 1/3 mod 4? */ - if (bbs_style == 1) { - kstep = 4; - } else { - kstep = 2; - } - - /* at this point we will use a combination of a sieve and Miller-Rabin */ - - if (bbs_style == 1) { - /* if a mod 4 != 3 subtract the correct value to make it so */ - if ((a->dp[0] & 3) != 3) { - if ((err = aws_mp_sub_d(a, (a->dp[0] & 3) + 1, a)) != AWS_MP_OKAY) { return err; }; - } - } else { - if (aws_mp_iseven(a) == 1) { - /* force odd */ - if ((err = aws_mp_sub_d(a, 1, a)) != AWS_MP_OKAY) { - return err; - } - } - } - - /* generate the restable */ - for (x = 1; x < AWS_JKTM_PRIME_SIZE; x++) { - if ((err = aws_mp_mod_d(a, aws_ltm_prime_tab[x], res_tab + x)) != AWS_MP_OKAY) { - return err; - } - } - - /* init temp used for Miller-Rabin Testing */ - if ((err = aws_mp_init(&b)) != AWS_MP_OKAY) { - return err; - } - - for (;;) { - /* skip to the next non-trivially divisible candidate */ - step = 0; - do { - /* y == 1 if any residue was zero [e.g. cannot be prime] */ - y = 0; - - /* increase step to next candidate */ - step += kstep; - - /* compute the new residue without using division */ - for (x = 1; x < AWS_JKTM_PRIME_SIZE; x++) { - /* add the step to each residue */ - res_tab[x] += kstep; - - /* subtract the modulus [instead of using division] */ - if (res_tab[x] >= aws_ltm_prime_tab[x]) { - res_tab[x] -= aws_ltm_prime_tab[x]; - } - - /* set flag if zero */ - if (res_tab[x] == 0) { - y = 1; - } - } - } while (y == 1 && step < ((((aws_mp_digit)1)<= ((((aws_mp_digit)1)<sign == AWS_MP_NEG || aws_mp_iszero(b) == 1) { - return AWS_MP_VAL; - } - -#ifdef AWS_BN_FAST_MP_INVMOD_C - /* if the modulus is odd we can use a faster routine instead */ - if (aws_mp_isodd (b) == 1) { - return aws_fast_mp_invmod(a, b, c); - } -#endif - -#ifdef AWS_BN_MP_INVMOD_SLOW_C - return aws_mp_invmod_slow(a, b, c); -#endif - - return AWS_MP_VAL; -} -#endif - -#ifdef AWS_BN_MP_DIV_2_C - -/* b = a/2 */ -int aws_mp_div_2(aws_mp_int *a, aws_mp_int *b) -{ - int x, res, oldused; - - /* copy */ - if (b->alloc < a->used) { - if ((res = aws_mp_grow(b, a->used)) != AWS_MP_OKAY) { - return res; - } - } - - oldused = b->used; - b->used = a->used; - { - register aws_mp_digit r, rr, *tmpa, *tmpb; - - /* source alias */ - tmpa = a->dp + b->used - 1; - - /* dest alias */ - tmpb = b->dp + b->used - 1; - - /* carry */ - r = 0; - for (x = b->used - 1; x >= 0; x--) { - /* get the carry for the next iteration */ - rr = *tmpa & 1; - - /* shift the current digit, add in carry and store */ - *tmpb-- = (*tmpa-- >> 1) | (r << (AWS_DIGIT_BIT - 1)); - - /* forward carry to next iteration */ - r = rr; - } - - /* zero excess digits */ - tmpb = b->dp + b->used; - for (x = b->used; x < oldused; x++) { - *tmpb++ = 0; - } - } - b->sign = a->sign; - aws_mp_clamp(b); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_INIT_MULTI_C - -#include - -int aws_mp_init_multi(aws_mp_int *mp, ...) -{ - aws_mp_err res = AWS_MP_OKAY; /* Assume ok until proven otherwise */ - int n = 0; /* Number of ok inits */ - aws_mp_int * cur_arg = mp; - va_list args; - - va_start(args, mp); /* init args to next argument from caller */ - while (cur_arg != NULL) { - if (aws_mp_init(cur_arg) != AWS_MP_OKAY) { - /* Oops - error! Back-track and aws_mp_clear what we already - succeeded in init-ing, then return error. - */ - va_list clean_args; - - /* end the current list */ - va_end(args); - - /* now start cleaning up */ - cur_arg = mp; - va_start(clean_args, mp); - while (n--) { - aws_mp_clear(cur_arg); - cur_arg = va_arg(clean_args, aws_mp_int*); - } - va_end(clean_args); - res = AWS_MP_MEM; - break; - } - n++; - cur_arg = va_arg(args, aws_mp_int*); - } - va_end(args); - return res; /* Assumed ok, if error flagged above. */ -} - -#endif - -#ifdef AWS_BN_MP_READ_UNSIGNED_BIN_C - -/* reads a unsigned char array, assumes the msb is stored first [big endian] */ -int aws_mp_read_unsigned_bin(aws_mp_int *a, const unsigned char *b, int c) -{ - int res; - - /* make sure there are at least two digits */ - if (a->alloc < 2) { - if ((res = aws_mp_grow(a, 2)) != AWS_MP_OKAY) { - return res; - } - } - - /* zero the int */ - aws_mp_zero(a); - - /* read the bytes in */ - while (c-- > 0) { - if ((res = aws_mp_mul_2d(a, 8, a)) != AWS_MP_OKAY) { - return res; - } - -#ifndef AWS_MP_8BIT - a->dp[0] |= *b++; - a->used += 1; -#else - a->dp[0] = (*b & AWS_MP_MASK); - a->dp[1] |= ((*b++ >> 7U) & 1); - a->used += 2; -#endif - } - aws_mp_clamp(a); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_KARATSUBA_MUL_C - -/* c = |a| * |b| using Karatsuba Multiplication using - * three half size multiplications - * - * Let B represent the radix [e.g. 2**AWS_DIGIT_BIT] and - * let n represent half of the number of digits in - * the min(a,b) - * - * a = a1 * B**n + a0 - * b = b1 * B**n + b0 - * - * Then, a * b => - a1b1 * B**2n + ((a1 + a0)(b1 + b0) - (a0b0 + a1b1)) * B + a0b0 - * - * Note that a1b1 and a0b0 are used twice and only need to be - * computed once. So in total three half size (half # of - * digit) multiplications are performed, a0b0, a1b1 and - * (a1+b1)(a0+b0) - * - * Note that a multiplication of half the digits requires - * 1/4th the number of single precision multiplications so in - * total after one call 25% of the single precision multiplications - * are saved. Note also that the call to aws_mp_mul can end up back - * in this function if the a0, a1, b0, or b1 are above the threshold. - * This is known as divide-and-conquer and leads to the famous - * O(N**lg(3)) or O(N**1.584) work which is asymptopically lower than - * the standard O(N**2) that the baseline/comba methods use. - * Generally though the overhead of this method doesn't pay off - * until a certain size (N ~ 80) is reached. - */ -int aws_mp_karatsuba_mul(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - aws_mp_int x0, x1, y0, y1, t1, x0y0, x1y1; - int B, err; - - /* default the return code to an error */ - err = AWS_MP_MEM; - - /* min # of digits */ - B = AWS_MIN (a->used, b->used); - - /* now divide in two */ - B = B >> 1; - - /* init copy all the temps */ - if (aws_mp_init_size(&x0, B) != AWS_MP_OKAY) - goto ERR; - if (aws_mp_init_size(&x1, a->used - B) != AWS_MP_OKAY) - goto X0; - if (aws_mp_init_size(&y0, B) != AWS_MP_OKAY) - goto X1; - if (aws_mp_init_size(&y1, b->used - B) != AWS_MP_OKAY) - goto Y0; - - /* init temps */ - if (aws_mp_init_size(&t1, B * 2) != AWS_MP_OKAY) - goto Y1; - if (aws_mp_init_size(&x0y0, B * 2) != AWS_MP_OKAY) - goto T1; - if (aws_mp_init_size(&x1y1, B * 2) != AWS_MP_OKAY) - goto X0Y0; - - /* now shift the digits */ - x0.used = y0.used = B; - x1.used = a->used - B; - y1.used = b->used - B; - - { - register int x; - register aws_mp_digit *tmpa, *tmpb, *tmpx, *tmpy; - - /* we copy the digits directly instead of using higher level functions - * since we also need to shift the digits - */ - tmpa = a->dp; - tmpb = b->dp; - - tmpx = x0.dp; - tmpy = y0.dp; - for (x = 0; x < B; x++) { - *tmpx++ = *tmpa++; - *tmpy++ = *tmpb++; - } - - tmpx = x1.dp; - for (x = B; x < a->used; x++) { - *tmpx++ = *tmpa++; - } - - tmpy = y1.dp; - for (x = B; x < b->used; x++) { - *tmpy++ = *tmpb++; - } - } - - /* only need to clamp the lower words since by definition the - * upper words x1/y1 must have a known number of digits - */ - aws_mp_clamp(&x0); - aws_mp_clamp(&y0); - - /* now calc the products x0y0 and x1y1 */ - /* after this x0 is no longer required, free temp [x0==t2]! */ - if (aws_mp_mul(&x0, &y0, &x0y0) != AWS_MP_OKAY) - goto X1Y1; /* x0y0 = x0*y0 */ - if (aws_mp_mul(&x1, &y1, &x1y1) != AWS_MP_OKAY) - goto X1Y1; /* x1y1 = x1*y1 */ - - /* now calc x1+x0 and y1+y0 */ - if (aws_s_mp_add(&x1, &x0, &t1) != AWS_MP_OKAY) - goto X1Y1; /* t1 = x1 - x0 */ - if (aws_s_mp_add(&y1, &y0, &x0) != AWS_MP_OKAY) - goto X1Y1; /* t2 = y1 - y0 */ - if (aws_mp_mul(&t1, &x0, &t1) != AWS_MP_OKAY) - goto X1Y1; /* t1 = (x1 + x0) * (y1 + y0) */ - - /* add x0y0 */ - if (aws_mp_add(&x0y0, &x1y1, &x0) != AWS_MP_OKAY) - goto X1Y1; /* t2 = x0y0 + x1y1 */ - if (aws_s_mp_sub(&t1, &x0, &t1) != AWS_MP_OKAY) - goto X1Y1; /* t1 = (x1+x0)*(y1+y0) - (x1y1 + x0y0) */ - - /* shift by B */ - if (aws_mp_lshd(&t1, B) != AWS_MP_OKAY) - goto X1Y1; /* t1 = (x0y0 + x1y1 - (x1-x0)*(y1-y0))<alloc < a->used + 1) { - if ((res = aws_mp_grow(b, a->used + 1)) != AWS_MP_OKAY) { - return res; - } - } - - oldused = b->used; - b->used = a->used; - - { - register aws_mp_digit r, rr, *tmpa, *tmpb; - - /* alias for source */ - tmpa = a->dp; - - /* alias for dest */ - tmpb = b->dp; - - /* carry */ - r = 0; - for (x = 0; x < a->used; x++) { - - /* get what will be the *next* carry bit from the - * MSB of the current digit - */ - rr = *tmpa >> ((aws_mp_digit)(AWS_DIGIT_BIT - 1)); - - /* now shift up this digit, add in the carry [from the previous] */ - *tmpb++ = ((*tmpa++ << ((aws_mp_digit)1)) | r) & AWS_MP_MASK; - - /* copy the carry that would be from the source - * digit into the next iteration - */ - r = rr; - } - - /* new leading digit? */ - if (r != 0) { - /* add a MSB which is always 1 at this point */ - *tmpb = 1; - ++(b->used); - } - - /* now zero any excess digits on the destination - * that we didn't write to - */ - tmpb = b->dp + b->used; - for (x = b->used; x < oldused; x++) { - *tmpb++ = 0; - } - } - b->sign = a->sign; - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_AND_C - -/* AND two ints together */ -int -aws_mp_and(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int res, ix, px; - aws_mp_int t, *x; - - if (a->used > b->used) { - if ((res = aws_mp_init_copy(&t, a)) != AWS_MP_OKAY) { - return res; - } - px = b->used; - x = b; - } else { - if ((res = aws_mp_init_copy(&t, b)) != AWS_MP_OKAY) { - return res; - } - px = a->used; - x = a; - } - - for (ix = 0; ix < px; ix++) { - t.dp[ix] &= x->dp[ix]; - } - - /* zero digits above the last from the smallest mp_int */ - for (; ix < t.used; ix++) { - t.dp[ix] = 0; - } - - aws_mp_clamp(&t); - aws_mp_exch(c, &t); - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_REVERSE_C - -/* reverse an array, used for radix code */ -void -aws_bn_reverse(unsigned char *s, int len) -{ - int ix, iy; - unsigned char t; - - ix = 0; - iy = len - 1; - while (ix < iy) { - t = s[ix]; - s[ix] = s[iy]; - s[iy] = t; - ++ix; - --iy; - } -} -#endif - -#ifdef AWS_BN_MP_PRIME_RABIN_MILLER_TRIALS_C - -static const struct { - int k, t; -} sizes[] = { -{ 128, 28 }, -{ 256, 16 }, -{ 384, 10 }, -{ 512, 7 }, -{ 640, 6 }, -{ 768, 5 }, -{ 896, 4 }, -{ 1024, 4 } -}; - -/* returns # of RM trials required for a given bit size */ -int aws_mp_prime_rabin_miller_trials(int size) -{ - int x; - - for (x = 0; x < (int)(sizeof(sizes)/(sizeof(sizes[0]))); x++) { - if (sizes[x].k == size) { - return sizes[x].t; - } else if (sizes[x].k > size) { - return (x == 0) ? sizes[0].t : sizes[x - 1].t; - } - } - return sizes[x-1].t + 1; -} - - -#endif - -#ifdef AWS_BN_MP_INIT_COPY_C - -/* creates "a" then copies b into it */ -int aws_mp_init_copy(aws_mp_int *a, aws_mp_int *b) -{ - int res; - - if ((res = aws_mp_init(a)) != AWS_MP_OKAY) { - return res; - } - return aws_mp_copy(b, a); -} -#endif - -#ifdef AWS_BN_FAST_MP_MONTGOMERY_REDUCE_C - -/* computes xR**-1 == x (mod N) via Montgomery Reduction - * - * This is an optimized implementation of montgomery_reduce - * which uses the comba method to quickly calculate the columns of the - * reduction. - * - * Based on Algorithm 14.32 on pp.601 of HAC. -*/ -int aws_fast_mp_montgomery_reduce(aws_mp_int *x, aws_mp_int *n, aws_mp_digit rho) -{ - int ix, res, olduse; - aws_mp_word W[AWS_MP_WARRAY] = {}; - - /* get old used count */ - olduse = x->used; - - /* grow a as required */ - if (x->alloc < n->used + 1) { - if ((res = aws_mp_grow(x, n->used + 1)) != AWS_MP_OKAY) { - return res; - } - } - - /* first we have to get the digits of the input into - * an array of double precision words W[...] - */ - { - register aws_mp_word *_W; - register aws_mp_digit *tmpx; - - /* alias for the W[] array */ - _W = W; - - /* alias for the digits of x*/ - tmpx = x->dp; - - /* copy the digits of a into W[0..a->used-1] */ - for (ix = 0; ix < x->used; ix++) { - *_W++ = *tmpx++; - } - - /* zero the high words of W[a->used..m->used*2] */ - for (; ix < n->used * 2 + 1; ix++) { - *_W++ = 0; - } - } - - /* now we proceed to zero successive digits - * from the least significant upwards - */ - for (ix = 0; ix < n->used; ix++) { - /* mu = ai * m' mod b - * - * We avoid a double precision multiplication (which isn't required) - * by casting the value down to a aws_mp_digit. Note this requires - * that W[ix-1] have the carry cleared (see after the inner loop) - */ - register aws_mp_digit mu; - mu = (aws_mp_digit) (((W[ix] & AWS_MP_MASK) * rho) & AWS_MP_MASK); - - /* a = a + mu * m * b**i - * - * This is computed in place and on the fly. The multiplication - * by b**i is handled by offseting which columns the results - * are added to. - * - * Note the comba method normally doesn't handle carries in the - * inner loop In this case we fix the carry from the previous - * column since the Montgomery reduction requires digits of the - * result (so far) [see above] to work. This is - * handled by fixing up one carry after the inner loop. The - * carry fixups are done in order so after these loops the - * first m->used words of W[] have the carries fixed - */ - { - register int iy; - register aws_mp_digit *tmpn; - register aws_mp_word *_W; - - /* alias for the digits of the modulus */ - tmpn = n->dp; - - /* Alias for the columns set by an offset of ix */ - _W = W + ix; - - /* inner loop */ - for (iy = 0; iy < n->used; iy++) { - *_W++ += ((aws_mp_word)mu) * ((aws_mp_word)*tmpn++); - } - } - - /* now fix carry for next digit, W[ix+1] */ - W[ix + 1] += W[ix] >> ((aws_mp_word) AWS_DIGIT_BIT); - } - - /* now we have to propagate the carries and - * shift the words downward [all those least - * significant digits we zeroed]. - */ - { - register aws_mp_digit *tmpx; - register aws_mp_word *_W, *_W1; - - /* nox fix rest of carries */ - - /* alias for current word */ - _W1 = W + ix; - - /* alias for next word, where the carry goes */ - _W = W + ++ix; - - for (; ix <= n->used * 2 + 1; ix++) { - *_W++ += *_W1++ >> ((aws_mp_word) AWS_DIGIT_BIT); - } - - /* copy out, A = A/b**n - * - * The result is A/b**n but instead of converting from an - * array of aws_mp_word to aws_mp_digit than calling aws_mp_rshd - * we just copy them in the right order - */ - - /* alias for destination word */ - tmpx = x->dp; - - /* alias for shifted double precision result */ - _W = W + n->used; - - for (ix = 0; ix < n->used + 1; ix++) { - *tmpx++ = (aws_mp_digit)(*_W++ & ((aws_mp_word) AWS_MP_MASK)); - } - - /* zero oldused digits, if the input a was larger than - * m->used+1 we'll have to clear the digits - */ - for (; ix < olduse; ix++) { - *tmpx++ = 0; - } - } - - /* set the max used and clamp */ - x->used = n->used + 1; - aws_mp_clamp(x); - - /* if A >= m then A = A - m */ - if (aws_mp_cmp_mag(x, n) != AWS_MP_LT) { - return aws_s_mp_sub(x, n, x); - } - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_LSHD_C - -/* shift left a certain amount of digits */ -int aws_mp_lshd(aws_mp_int *a, int b) -{ - int x, res; - - /* if its less than zero return */ - if (b <= 0) { - return AWS_MP_OKAY; - } - - /* grow to fit the new digits */ - if (a->alloc < a->used + b) { - if ((res = aws_mp_grow(a, a->used + b)) != AWS_MP_OKAY) { - return res; - } - } - - { - register aws_mp_digit *top, *bottom; - - /* increment the used by the shift amount then copy upwards */ - a->used += b; - - /* top */ - top = a->dp + a->used - 1; - - /* base */ - bottom = a->dp + a->used - 1 - b; - - /* much like aws_mp_rshd this is implemented using a sliding window - * except the window goes the otherway around. Copying from - * the bottom to the top. see bn_mp_rshd.c for more info. - */ - for (x = a->used - 1; x >= b; x--) { - *top-- = *bottom--; - } - - /* zero the lower digits */ - top = a->dp; - for (x = 0; x < b; x++) { - *top++ = 0; - } - } - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_CMP_C - -/* compare two ints (signed)*/ -int -aws_mp_cmp(aws_mp_int *a, aws_mp_int *b) -{ - /* compare based on sign */ - if (a->sign != b->sign) { - if (a->sign == AWS_MP_NEG) { - return AWS_MP_LT; - } else { - return AWS_MP_GT; - } - } - - /* compare digits */ - if (a->sign == AWS_MP_NEG) { - /* if negative compare opposite direction */ - return aws_mp_cmp_mag(b, a); - } else { - return aws_mp_cmp_mag(a, b); - } -} -#endif - -#ifdef AWS_BN_MP_COUNT_BITS_C - -/* returns the number of bits in an int */ -int -aws_mp_count_bits(aws_mp_int *a) -{ - int r; - aws_mp_digit q; - - /* shortcut */ - if (a->used == 0) { - return 0; - } - - /* get number of digits and add that */ - r = (a->used - 1) * AWS_DIGIT_BIT; - - /* take the last digit and count the bits in it */ - q = a->dp[a->used - 1]; - while (q > ((aws_mp_digit) 0)) { - ++r; - q >>= ((aws_mp_digit) 1); - } - return r; -} -#endif - -#ifdef AWS_BN_MP_OR_C - -/* OR two ints together */ -int aws_mp_or(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int res, ix, px; - aws_mp_int t, *x; - - if (a->used > b->used) { - if ((res = aws_mp_init_copy(&t, a)) != AWS_MP_OKAY) { - return res; - } - px = b->used; - x = b; - } else { - if ((res = aws_mp_init_copy(&t, b)) != AWS_MP_OKAY) { - return res; - } - px = a->used; - x = a; - } - - for (ix = 0; ix < px; ix++) { - t.dp[ix] |= x->dp[ix]; - } - aws_mp_clamp(&t); - aws_mp_exch(c, &t); - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_EXTEUCLID_C - -/* Extended euclidean algorithm of (a, b) produces - a*u1 + b*u2 = u3 - */ -int aws_mp_exteuclid(aws_mp_int *a, aws_mp_int *b, aws_mp_int *U1, aws_mp_int *U2, aws_mp_int *U3) -{ - aws_mp_int u1,u2,u3,v1,v2,v3,t1,t2,t3,q,tmp; - int err; - - if ((err = aws_mp_init_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL)) != AWS_MP_OKAY) { - return err; - } - - /* initialize, (u1,u2,u3) = (1,0,a) */ - aws_mp_set(&u1, 1); - if ((err = aws_mp_copy(a, &u3)) != AWS_MP_OKAY) { goto _ERR; } - - /* initialize, (v1,v2,v3) = (0,1,b) */ - aws_mp_set(&v2, 1); - if ((err = aws_mp_copy(b, &v3)) != AWS_MP_OKAY) { goto _ERR; } - - /* loop while v3 != 0 */ - while (aws_mp_iszero(&v3) == AWS_MP_NO) { - /* q = u3/v3 */ - if ((err = aws_mp_div(&u3, &v3, &q, NULL)) != AWS_MP_OKAY) { goto _ERR; } - - /* (t1,t2,t3) = (u1,u2,u3) - (v1,v2,v3)q */ - if ((err = aws_mp_mul(&v1, &q, &tmp)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_sub(&u1, &tmp, &t1)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_mul(&v2, &q, &tmp)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_sub(&u2, &tmp, &t2)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_mul(&v3, &q, &tmp)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_sub(&u3, &tmp, &t3)) != AWS_MP_OKAY) { goto _ERR; } - - /* (u1,u2,u3) = (v1,v2,v3) */ - if ((err = aws_mp_copy(&v1, &u1)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_copy(&v2, &u2)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_copy(&v3, &u3)) != AWS_MP_OKAY) { goto _ERR; } - - /* (v1,v2,v3) = (t1,t2,t3) */ - if ((err = aws_mp_copy(&t1, &v1)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_copy(&t2, &v2)) != AWS_MP_OKAY) { goto _ERR; } - if ((err = aws_mp_copy(&t3, &v3)) != AWS_MP_OKAY) { goto _ERR; } - } - - /* make sure U3 >= 0 */ - if (u3.sign == AWS_MP_NEG) { - aws_mp_neg(&u1, &u1); - aws_mp_neg(&u2, &u2); - aws_mp_neg(&u3, &u3); - } - - /* copy result out */ - if (U1 != NULL) {aws_mp_exch(U1, &u1); } - if (U2 != NULL) {aws_mp_exch(U2, &u2); } - if (U3 != NULL) {aws_mp_exch(U3, &u3); } - - err = AWS_MP_OKAY; -_ERR: -aws_mp_clear_multi(&u1, &u2, &u3, &v1, &v2, &v3, &t1, &t2, &t3, &q, &tmp, NULL); - return err; -} -#endif - -#ifdef AWS_BN_MP_PRIME_RANDOM_EX_C - -/* makes a truly random prime of a given size (bits), - * - * Flags are as follows: - * - * LTM_PRIME_BBS - make prime congruent to 3 mod 4 - * LTM_PRIME_SAFE - make sure (p-1)/2 is prime as well (implies LTM_PRIME_BBS) - * LTM_PRIME_2MSB_OFF - make the 2nd highest bit zero - * LTM_PRIME_2MSB_ON - make the 2nd highest bit one - * - * You have to supply a callback which fills in a buffer with random bytes. "dat" is a parameter you can - * have passed to the callback (e.g. a state or something). This function doesn't use "dat" itself - * so it can be NULL - * - */ - -/* This is possibly the mother of all prime generation functions, muahahahahaha! */ -int aws_mp_prime_random_ex(aws_mp_int *a, int t, int size, int flags, aws_ltm_prime_callback cb, void *dat) -{ - unsigned char *tmp, maskAND, maskOR_msb, maskOR_lsb; - int res, err, bsize, maskOR_msb_offset; - - /* sanity check the input */ - if (size <= 1 || t <= 0) { - return AWS_MP_VAL; - } - - /* LTM_PRIME_SAFE implies LTM_PRIME_BBS */ - if (flags & AWS_LTM_PRIME_SAFE) { - flags |= AWS_LTM_PRIME_BBS; - } - - /* calc the byte size */ - bsize = (size>>3) + ((size&7)?1:0); - - /* we need a buffer of bsize bytes */ - tmp = AWS_OPT_CAST(unsigned char) AWS_XMALLOC(bsize); - if (tmp == NULL) { - return AWS_MP_MEM; - } - - /* calc the maskAND value for the MSbyte*/ - maskAND = ((size&7) == 0) ? 0xFF : (0xFF >> (8 - (size & 7))); - - /* calc the maskOR_msb */ - maskOR_msb = 0; - maskOR_msb_offset = ((size & 7) == 1) ? 1 : 0; - if (flags & AWS_LTM_PRIME_2MSB_ON) { - maskOR_msb |= 0x80 >> ((9 - size) & 7); - } - - /* get the maskOR_lsb */ - maskOR_lsb = 1; - if (flags & AWS_LTM_PRIME_BBS) { - maskOR_lsb |= 3; - } - - do { - /* read the bytes */ - if (cb(tmp, bsize, dat) != bsize) { - err = AWS_MP_VAL; - goto error; - } - - /* work over the MSbyte */ - tmp[0] &= maskAND; - tmp[0] |= 1 << ((size - 1) & 7); - - /* mix in the maskORs */ - tmp[maskOR_msb_offset] |= maskOR_msb; - tmp[bsize-1] |= maskOR_lsb; - - /* read it in */ - if ((err = aws_mp_read_unsigned_bin(a, tmp, bsize)) != AWS_MP_OKAY) { goto error; } - - /* is it prime? */ - if ((err = aws_mp_prime_is_prime(a, t, &res)) != AWS_MP_OKAY) { goto error; } - if (res == AWS_MP_NO) { - continue; - } - - if (flags & AWS_LTM_PRIME_SAFE) { - /* see if (a-1)/2 is prime */ - if ((err = aws_mp_sub_d(a, 1, a)) != AWS_MP_OKAY) { goto error; } - if ((err = aws_mp_div_2(a, a)) != AWS_MP_OKAY) { goto error; } - - /* is it prime? */ - if ((err = aws_mp_prime_is_prime(a, t, &res)) != AWS_MP_OKAY) { goto error; } - } - } while (res == AWS_MP_NO); - - if (flags & AWS_LTM_PRIME_SAFE) { - /* restore a to the original value */ - if ((err = aws_mp_mul_2(a, a)) != AWS_MP_OKAY) { goto error; } - if ((err = aws_mp_add_d(a, 1, a)) != AWS_MP_OKAY) { goto error; } - } - - err = AWS_MP_OKAY; -error: - AWS_XFREE(tmp); - return err; -} - - -#endif - -#ifdef AWS_BN_MP_JACOBI_C - -/* computes the jacobi c = (a | n) (or Legendre if n is prime) - * HAC pp. 73 Algorithm 2.149 - */ -int aws_mp_jacobi(aws_mp_int *a, aws_mp_int *p, int *c) -{ - aws_mp_int a1, p1; - int k, s, r, res; - aws_mp_digit residue; - - /* if p <= 0 return AWS_MP_VAL */ - if (aws_mp_cmp_d(p, 0) != AWS_MP_GT) { - return AWS_MP_VAL; - } - - /* step 1. if a == 0, return 0 */ - if (aws_mp_iszero (a) == 1) { - *c = 0; - return AWS_MP_OKAY; - } - - /* step 2. if a == 1, return 1 */ - if (aws_mp_cmp_d(a, 1) == AWS_MP_EQ) { - *c = 1; - return AWS_MP_OKAY; - } - - /* default */ - s = 0; - - /* step 3. write a = a1 * 2**k */ - if ((res = aws_mp_init_copy(&a1, a)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_init(&p1)) != AWS_MP_OKAY) { - goto LBL_A1; - } - - /* divide out larger power of two */ - k = aws_mp_cnt_lsb(&a1); - if ((res = aws_mp_div_2d(&a1, k, &a1, NULL)) != AWS_MP_OKAY) { - goto LBL_P1; - } - - /* step 4. if e is even set s=1 */ - if ((k & 1) == 0) { - s = 1; - } else { - /* else set s=1 if p = 1/7 (mod 8) or s=-1 if p = 3/5 (mod 8) */ - residue = p->dp[0] & 7; - - if (residue == 1 || residue == 7) { - s = 1; - } else if (residue == 3 || residue == 5) { - s = -1; - } - } - - /* step 5. if p == 3 (mod 4) *and* a1 == 3 (mod 4) then s = -s */ - if (((p->dp[0] & 3) == 3) && ((a1.dp[0] & 3) == 3)) { - s = -s; - } - - /* if a1 == 1 we're done */ - if (aws_mp_cmp_d(&a1, 1) == AWS_MP_EQ) { - *c = s; - } else { - /* n1 = n mod a1 */ - if ((res = aws_mp_mod(p, &a1, &p1)) != AWS_MP_OKAY) { - goto LBL_P1; - } - if ((res = aws_mp_jacobi(&p1, &a1, &r)) != AWS_MP_OKAY) { - goto LBL_P1; - } - *c = s * r; - } - - /* done */ - res = AWS_MP_OKAY; -LBL_P1: -aws_mp_clear(&p1); -LBL_A1: -aws_mp_clear(&a1); - return res; -} -#endif - -#ifdef AWS_BN_MP_RADIX_SIZE_C - -/* returns size of ASCII reprensentation */ -int aws_mp_radix_size(aws_mp_int *a, int radix, int *size) -{ - int res, digs; - aws_mp_int t; - aws_mp_digit d; - - *size = 0; - - /* special case for binary */ - if (radix == 2) { - *size = aws_mp_count_bits(a) + (a->sign == AWS_MP_NEG ? 1 : 0) + 1; - return AWS_MP_OKAY; - } - - /* make sure the radix is in range */ - if (radix < 2 || radix > 64) { - return AWS_MP_VAL; - } - - if (aws_mp_iszero(a) == AWS_MP_YES) { - *size = 2; - return AWS_MP_OKAY; - } - - /* digs is the digit count */ - digs = 0; - - /* if it's negative add one for the sign */ - if (a->sign == AWS_MP_NEG) { - ++digs; - } - - /* init a copy of the input */ - if ((res = aws_mp_init_copy(&t, a)) != AWS_MP_OKAY) { - return res; - } - - /* force temp to positive */ - t.sign = AWS_MP_ZPOS; - - /* fetch out all of the digits */ - while (aws_mp_iszero (&t) == AWS_MP_NO) { - if ((res = aws_mp_div_d(&t, (aws_mp_digit) radix, &t, &d)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - ++digs; - } - aws_mp_clear(&t); - - /* return digs + 1, the 1 is for the NULL byte that would be required. */ - *size = digs + 1; - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_RSHD_C - -/* shift right a certain amount of digits */ -void aws_mp_rshd(aws_mp_int *a, int b) -{ - int x; - - /* if b <= 0 then ignore it */ - if (b <= 0) { - return; - } - - /* if b > used then simply zero it and return */ - if (a->used <= b) { - aws_mp_zero(a); - return; - } - - { - register aws_mp_digit *bottom, *top; - - /* shift the digits down */ - - /* bottom */ - bottom = a->dp; - - /* top [offset into digits] */ - top = a->dp + b; - - /* this is implemented as a sliding window where - * the window is b-digits long and digits from - * the top of the window are copied to the bottom - * - * e.g. - - b-2 | b-1 | b0 | b1 | b2 | ... | bb | ----> - /\ | ----> - \-------------------/ ----> - */ - for (x = 0; x < (a->used - b); x++) { - *bottom++ = *top++; - } - - /* zero the top digits */ - for (; x < a->used; x++) { - *bottom++ = 0; - } - } - - /* remove excess digits */ - a->used -= b; -} -#endif - -#ifdef AWS_BN_MP_MUL_D_C - -/* multiply by a digit */ -int -aws_mp_mul_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c) -{ - aws_mp_digit u, *tmpa, *tmpc; - aws_mp_word r; - int ix, res, olduse; - - /* make sure c is big enough to hold a*b */ - if (c->alloc < a->used + 1) { - if ((res = aws_mp_grow(c, a->used + 1)) != AWS_MP_OKAY) { - return res; - } - } - - /* get the original destinations used count */ - olduse = c->used; - - /* set the sign */ - c->sign = a->sign; - - /* alias for a->dp [source] */ - tmpa = a->dp; - - /* alias for c->dp [dest] */ - tmpc = c->dp; - - /* zero carry */ - u = 0; - - /* compute columns */ - for (ix = 0; ix < a->used; ix++) { - /* compute product and carry sum for this term */ - r = ((aws_mp_word) u) + ((aws_mp_word)*tmpa++) * ((aws_mp_word)b); - - /* mask off higher bits to get a single digit */ - *tmpc++ = (aws_mp_digit) (r & ((aws_mp_word) AWS_MP_MASK)); - - /* send carry into next iteration */ - u = (aws_mp_digit) (r >> ((aws_mp_word) AWS_DIGIT_BIT)); - } - - /* store final carry [if any] and increment ix offset */ - *tmpc++ = u; - ++ix; - - /* now zero digits above the top */ - while (ix++ < olduse) { - *tmpc++ = 0; - } - - /* set used count */ - c->used = a->used + 1; - aws_mp_clamp(c); - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_MONTGOMERY_REDUCE_C - -/* computes xR**-1 == x (mod N) via Montgomery Reduction */ -int -aws_mp_montgomery_reduce(aws_mp_int *x, aws_mp_int *n, aws_mp_digit rho) -{ - int ix, res, digs; - aws_mp_digit mu; - - /* can the fast reduction [comba] method be used? - * - * Note that unlike in mul you're safely allowed *less* - * than the available columns [255 per default] since carries - * are fixed up in the inner loop. - */ - digs = n->used * 2 + 1; - if ((digs < AWS_MP_WARRAY) && - n->used < - (1 << ((CHAR_BIT * sizeof (aws_mp_word)) - (2 * AWS_DIGIT_BIT)))) { - return aws_fast_mp_montgomery_reduce(x, n, rho); - } - - /* grow the input as required */ - if (x->alloc < digs) { - if ((res = aws_mp_grow(x, digs)) != AWS_MP_OKAY) { - return res; - } - } - x->used = digs; - - for (ix = 0; ix < n->used; ix++) { - /* mu = ai * rho mod b - * - * The value of rho must be precalculated via - * montgomery_setup() such that - * it equals -1/n0 mod b this allows the - * following inner loop to reduce the - * input one digit at a time - */ - mu = (aws_mp_digit) (((aws_mp_word)x->dp[ix]) * ((aws_mp_word)rho) & AWS_MP_MASK); - - /* a = a + mu * m * b**i */ - { - register int iy; - register aws_mp_digit *tmpn, *tmpx, u; - register aws_mp_word r; - - /* alias for digits of the modulus */ - tmpn = n->dp; - - /* alias for the digits of x [the input] */ - tmpx = x->dp + ix; - - /* set the carry to zero */ - u = 0; - - /* Multiply and add in place */ - for (iy = 0; iy < n->used; iy++) { - /* compute product and sum */ - r = ((aws_mp_word)mu) * ((aws_mp_word)*tmpn++) + - ((aws_mp_word) u) + ((aws_mp_word) * tmpx); - - /* get carry */ - u = (aws_mp_digit)(r >> ((aws_mp_word) AWS_DIGIT_BIT)); - - /* fix digit */ - *tmpx++ = (aws_mp_digit)(r & ((aws_mp_word) AWS_MP_MASK)); - } - /* At this point the ix'th digit of x should be zero */ - - - /* propagate carries upwards as required*/ - while (u) { - *tmpx += u; - u = *tmpx >> AWS_DIGIT_BIT; - *tmpx++ &= AWS_MP_MASK; - } - } - } - - /* at this point the n.used'th least - * significant digits of x are all zero - * which means we can shift x to the - * right by n.used digits and the - * residue is unchanged. - */ - - /* x = x/b**n.used */ - aws_mp_clamp(x); - aws_mp_rshd(x, n->used); - - /* if x >= n then x = x - n */ - if (aws_mp_cmp_mag(x, n) != AWS_MP_LT) { - return aws_s_mp_sub(x, n, x); - } - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_S_MP_EXPTMOD_C - -#ifdef AWS_MP_LOW_MEM - #define TAB_SIZE 32 -#else - #define TAB_SIZE 256 -#endif - -int aws_s_mp_exptmod(aws_mp_int *G, aws_mp_int *X, aws_mp_int *P, aws_mp_int *Y, int redmode) -{ - aws_mp_int M[TAB_SIZE], res, mu; - aws_mp_digit buf; - int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; - int (*redux)(aws_mp_int *, aws_mp_int *, aws_mp_int *); - - /* find window size */ - x = aws_mp_count_bits(X); - if (x <= 7) { - winsize = 2; - } else if (x <= 36) { - winsize = 3; - } else if (x <= 140) { - winsize = 4; - } else if (x <= 450) { - winsize = 5; - } else if (x <= 1303) { - winsize = 6; - } else if (x <= 3529) { - winsize = 7; - } else { - winsize = 8; - } - -#ifdef AWS_MP_LOW_MEM - if (winsize > 5) { - winsize = 5; - } -#endif - - /* init M array */ - /* init first cell */ - if ((err = aws_mp_init(&M[1])) != AWS_MP_OKAY) { - return err; - } - - /* now init the second half of the array */ - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - if ((err = aws_mp_init(&M[x])) != AWS_MP_OKAY) { - for (y = 1<<(winsize-1); y < x; y++) { - aws_mp_clear(&M[y]); - } - aws_mp_clear(&M[1]); - return err; - } - } - - /* create mu, used for Barrett reduction */ - if ((err = aws_mp_init(&mu)) != AWS_MP_OKAY) { - goto LBL_M; - } - - if (redmode == 0) { - if ((err = aws_mp_reduce_setup(&mu, P)) != AWS_MP_OKAY) { - goto LBL_MU; - } - redux = aws_mp_reduce; - } else { - if ((err = aws_mp_reduce_2k_setup_l(P, &mu)) != AWS_MP_OKAY) { - goto LBL_MU; - } - redux = aws_mp_reduce_2k_l; - } - - /* create M table - * - * The M table contains powers of the base, - * e.g. M[x] = G**x mod P - * - * The first half of the table is not - * computed though accept for M[0] and M[1] - */ - if ((err = aws_mp_mod(G, P, &M[1])) != AWS_MP_OKAY) { - goto LBL_MU; - } - - /* compute the value at M[1<<(winsize-1)] by squaring - * M[1] (winsize-1) times - */ - if ((err = aws_mp_copy(&M[1], &M[1 << (winsize - 1)])) != AWS_MP_OKAY) { - goto LBL_MU; - } - - for (x = 0; x < (winsize - 1); x++) { - /* square it */ - if ((err = aws_mp_sqr(&M[1 << (winsize - 1)], - &M[1 << (winsize - 1)])) != AWS_MP_OKAY) { - goto LBL_MU; - } - - /* reduce modulo P */ - if ((err = redux (&M[1 << (winsize - 1)], P, &mu)) != AWS_MP_OKAY) { - goto LBL_MU; - } - } - - /* create upper table, that is M[x] = M[x-1] * M[1] (mod P) - * for x = (2**(winsize - 1) + 1) to (2**winsize - 1) - */ - for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { - if ((err = aws_mp_mul(&M[x - 1], &M[1], &M[x])) != AWS_MP_OKAY) { - goto LBL_MU; - } - if ((err = redux (&M[x], P, &mu)) != AWS_MP_OKAY) { - goto LBL_MU; - } - } - - /* setup result */ - if ((err = aws_mp_init(&res)) != AWS_MP_OKAY) { - goto LBL_MU; - } - aws_mp_set(&res, 1); - - /* set initial mode and bit cnt */ - mode = 0; - bitcnt = 1; - buf = 0; - digidx = X->used - 1; - bitcpy = 0; - bitbuf = 0; - - for (;;) { - /* grab next digit as required */ - if (--bitcnt == 0) { - /* if digidx == -1 we are out of digits */ - if (digidx == -1) { - break; - } - /* read next digit and reset the bitcnt */ - buf = X->dp[digidx--]; - bitcnt = (int) AWS_DIGIT_BIT; - } - - /* grab the next msb from the exponent */ - y = (buf >> (aws_mp_digit)(AWS_DIGIT_BIT - 1)) & 1; - buf <<= (aws_mp_digit)1; - - /* if the bit is zero and mode == 0 then we ignore it - * These represent the leading zero bits before the first 1 bit - * in the exponent. Technically this opt is not required but it - * does lower the # of trivial squaring/reductions used - */ - if (mode == 0 && y == 0) { - continue; - } - - /* if the bit is zero and mode == 1 then we square */ - if (mode == 1 && y == 0) { - if ((err = aws_mp_sqr(&res, &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != AWS_MP_OKAY) { - goto LBL_RES; - } - continue; - } - - /* else we add it to the window */ - bitbuf |= (y << (winsize - ++bitcpy)); - mode = 2; - - if (bitcpy == winsize) { - /* ok window is filled so square as required and multiply */ - /* square first */ - for (x = 0; x < winsize; x++) { - if ((err = aws_mp_sqr(&res, &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - - /* then multiply */ - if ((err = aws_mp_mul(&res, &M[bitbuf], &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != AWS_MP_OKAY) { - goto LBL_RES; - } - - /* empty window and reset */ - bitcpy = 0; - bitbuf = 0; - mode = 1; - } - } - - /* if bits remain then square/multiply */ - if (mode == 2 && bitcpy > 0) { - /* square then multiply if the bit is set */ - for (x = 0; x < bitcpy; x++) { - if ((err = aws_mp_sqr(&res, &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != AWS_MP_OKAY) { - goto LBL_RES; - } - - bitbuf <<= 1; - if ((bitbuf & (1 << winsize)) != 0) { - /* then multiply */ - if ((err = aws_mp_mul(&res, &M[1], &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, &mu)) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - } - } - - aws_mp_exch(&res, Y); - err = AWS_MP_OKAY; -LBL_RES: -aws_mp_clear(&res); -LBL_MU: -aws_mp_clear(&mu); -LBL_M: -aws_mp_clear(&M[1]); - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - aws_mp_clear(&M[x]); - } - return err; -} -#endif - -#ifdef AWS_BN_MP_SUB_D_C - -/* single digit subtraction */ -int -aws_mp_sub_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c) -{ - aws_mp_digit *tmpa, *tmpc, mu; - int res, ix, oldused; - - /* grow c as required */ - if (c->alloc < a->used + 1) { - if ((res = aws_mp_grow(c, a->used + 1)) != AWS_MP_OKAY) { - return res; - } - } - - /* if a is negative just do an unsigned - * addition [with fudged signs] - */ - if (a->sign == AWS_MP_NEG) { - a->sign = AWS_MP_ZPOS; - res = aws_mp_add_d(a, b, c); - a->sign = c->sign = AWS_MP_NEG; - - /* clamp */ - aws_mp_clamp(c); - - return res; - } - - /* setup regs */ - oldused = c->used; - tmpa = a->dp; - tmpc = c->dp; - - /* if a <= b simply fix the single digit */ - if ((a->used == 1 && a->dp[0] <= b) || a->used == 0) { - if (a->used == 1) { - *tmpc++ = b - *tmpa; - } else { - *tmpc++ = b; - } - ix = 1; - - /* negative/1digit */ - c->sign = AWS_MP_NEG; - c->used = 1; - } else { - /* positive/size */ - c->sign = AWS_MP_ZPOS; - c->used = a->used; - - /* subtract first digit */ - *tmpc = *tmpa++ - b; - mu = *tmpc >> (sizeof(aws_mp_digit) * CHAR_BIT - 1); - *tmpc++ &= AWS_MP_MASK; - - /* handle rest of the digits */ - for (ix = 1; ix < a->used; ix++) { - *tmpc = *tmpa++ - mu; - mu = *tmpc >> (sizeof(aws_mp_digit) * CHAR_BIT - 1); - *tmpc++ &= AWS_MP_MASK; - } - } - - /* zero excess digits */ - while (ix++ < oldused) { - *tmpc++ = 0; - } - aws_mp_clamp(c); - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_DIV_2D_C - -/* shift right by a certain bit count (store quotient in c, optional remainder in d) */ -int aws_mp_div_2d(aws_mp_int *a, int b, aws_mp_int *c, aws_mp_int *d) -{ - aws_mp_digit D, r, rr; - int x, res; - aws_mp_int t; - - - /* if the shift count is <= 0 then we do no work */ - if (b <= 0) { - res = aws_mp_copy(a, c); - if (d != NULL) { - aws_mp_zero(d); - } - return res; - } - - if ((res = aws_mp_init(&t)) != AWS_MP_OKAY) { - return res; - } - - /* get the remainder */ - if (d != NULL) { - if ((res = aws_mp_mod_2d(a, b, &t)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - } - - /* copy */ - if ((res = aws_mp_copy(a, c)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - - /* shift by as many digits in the bit count */ - if (b >= (int)AWS_DIGIT_BIT) { - aws_mp_rshd(c, b / AWS_DIGIT_BIT); - } - - /* shift any bit count < AWS_DIGIT_BIT */ - D = (aws_mp_digit) (b % AWS_DIGIT_BIT); - if (D != 0) { - register aws_mp_digit *tmpc, mask, shift; - - /* mask */ - mask = (((aws_mp_digit)1) << D) - 1; - - /* shift for lsb */ - shift = AWS_DIGIT_BIT - D; - - /* alias */ - tmpc = c->dp + (c->used - 1); - - /* carry */ - r = 0; - for (x = c->used - 1; x >= 0; x--) { - /* get the lower bits of this word in a temp */ - rr = *tmpc & mask; - - /* shift the current word and mix in the carry bits from the previous word */ - *tmpc = (*tmpc >> D) | (r << shift); - --tmpc; - - /* set the carry to the carry bits of the current word found above */ - r = rr; - } - } - aws_mp_clamp(c); - if (d != NULL) { - aws_mp_exch(&t, d); - } - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_ADD_D_C - -/* single digit addition */ -int -aws_mp_add_d(aws_mp_int *a, aws_mp_digit b, aws_mp_int *c) -{ - int res, ix, oldused; - aws_mp_digit *tmpa, *tmpc, mu; - - /* grow c as required */ - if (c->alloc < a->used + 1) { - if ((res = aws_mp_grow(c, a->used + 1)) != AWS_MP_OKAY) { - return res; - } - } - - /* if a is negative and |a| >= b, call c = |a| - b */ - if (a->sign == AWS_MP_NEG && (a->used > 1 || a->dp[0] >= b)) { - /* temporarily fix sign of a */ - a->sign = AWS_MP_ZPOS; - - /* c = |a| - b */ - res = aws_mp_sub_d(a, b, c); - - /* fix sign */ - a->sign = c->sign = AWS_MP_NEG; - - /* clamp */ - aws_mp_clamp(c); - - return res; - } - - /* old number of used digits in c */ - oldused = c->used; - - /* sign always positive */ - c->sign = AWS_MP_ZPOS; - - /* source alias */ - tmpa = a->dp; - - /* destination alias */ - tmpc = c->dp; - - /* if a is positive */ - if (a->sign == AWS_MP_ZPOS) { - /* add digit, after this we're propagating - * the carry. - */ - *tmpc = *tmpa++ + b; - mu = *tmpc >> AWS_DIGIT_BIT; - *tmpc++ &= AWS_MP_MASK; - - /* now handle rest of the digits */ - for (ix = 1; ix < a->used; ix++) { - *tmpc = *tmpa++ + mu; - mu = *tmpc >> AWS_DIGIT_BIT; - *tmpc++ &= AWS_MP_MASK; - } - /* set final carry */ - ix++; - *tmpc++ = mu; - - /* setup size */ - c->used = a->used + 1; - } else { - /* a was negative and |a| < b */ - c->used = 1; - - /* the result is a single digit */ - if (a->used == 1) { - *tmpc++ = b - a->dp[0]; - } else { - *tmpc++ = b; - } - - /* setup count so the clearing of oldused - * can fall through correctly - */ - ix = 1; - } - - /* now zero to oldused */ - while (ix++ < oldused) { - *tmpc++ = 0; - } - aws_mp_clamp(c); - - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_SQR_C - -/* computes b = a*a */ -int -aws_mp_sqr(aws_mp_int *a, aws_mp_int *b) -{ - int res; - -#ifdef AWS_BN_MP_TOOM_SQR_C - /* use Toom-Cook? */ - if (a->used >= AWS_TOOM_SQR_CUTOFF) { - res = aws_mp_toom_sqr(a, b); - /* Karatsuba? */ - } else -#endif -#ifdef AWS_BN_MP_KARATSUBA_SQR_C -if (a->used >= AWS_KARATSUBA_SQR_CUTOFF) { - res = aws_mp_karatsuba_sqr(a, b); - } else -#endif - { -#ifdef AWS_BN_FAST_S_MP_SQR_C - /* can we use the fast comba multiplier? */ - if ((a->used * 2 + 1) < AWS_MP_WARRAY && - a->used < - (1 << (sizeof(aws_mp_word) * CHAR_BIT - 2*AWS_DIGIT_BIT - 1))) { - res = aws_fast_s_mp_sqr(a, b); - } else -#endif -#ifdef AWS_BN_S_MP_SQR_C - res = aws_s_mp_sqr(a, b); -#else - res = AWS_MP_VAL; -#endif - } - b->sign = AWS_MP_ZPOS; - return res; -} -#endif - -#ifdef AWS_BN_MP_GROW_C - -/* grow as required */ -int aws_mp_grow(aws_mp_int *a, int size) -{ - int i; - aws_mp_digit *tmp; - - /* if the alloc size is smaller alloc more ram */ - if (a->alloc < size) { - /* ensure there are always at least AWS_MP_PREC digits extra on top */ - size += (AWS_MP_PREC * 2) - (size % AWS_MP_PREC); - - /* reallocate the array a->dp - * - * We store the return in a temporary variable - * in case the operation failed we don't want - * to overwrite the dp member of a. - */ - tmp = AWS_OPT_CAST(aws_mp_digit) AWS_XREALLOC (a->dp, sizeof (aws_mp_digit) * size); - if (tmp == NULL) { - /* reallocation failed but "a" is still valid [can be freed] */ - return AWS_MP_MEM; - } - - /* reallocation succeeded so set a->dp */ - a->dp = tmp; - - /* zero excess digits */ - i = a->alloc; - a->alloc = size; - for (; i < a->alloc; i++) { - a->dp[i] = 0; - } - } - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_MUL_2D_C - -/* shift left by a certain bit count */ -int aws_mp_mul_2d(aws_mp_int *a, int b, aws_mp_int *c) -{ - aws_mp_digit d; - int res; - - /* copy */ - if (a != c) { - if ((res = aws_mp_copy(a, c)) != AWS_MP_OKAY) { - return res; - } - } - - if (c->alloc < (int)(c->used + b/AWS_DIGIT_BIT + 1)) { - if ((res = aws_mp_grow(c, c->used + b / AWS_DIGIT_BIT + 1)) != AWS_MP_OKAY) { - return res; - } - } - - /* shift by as many digits in the bit count */ - if (b >= (int)AWS_DIGIT_BIT) { - if ((res = aws_mp_lshd(c, b / AWS_DIGIT_BIT)) != AWS_MP_OKAY) { - return res; - } - } - - /* shift any bit count < AWS_DIGIT_BIT */ - d = (aws_mp_digit) (b % AWS_DIGIT_BIT); - if (d != 0) { - register aws_mp_digit *tmpc, shift, mask, r, rr; - register int x; - - /* bitmask for carries */ - mask = (((aws_mp_digit)1) << d) - 1; - - /* shift for msbs */ - shift = AWS_DIGIT_BIT - d; - - /* alias */ - tmpc = c->dp; - - /* carry */ - r = 0; - for (x = 0; x < c->used; x++) { - /* get the higher bits of the current word */ - rr = (*tmpc >> shift) & mask; - - /* shift the current word and OR in the carry */ - *tmpc = ((*tmpc << d) | r) & AWS_MP_MASK; - ++tmpc; - - /* set the carry to the carry bits of the current word */ - r = rr; - } - - /* set final carry */ - if (r != 0) { - c->dp[(c->used)++] = r; - } - } - aws_mp_clamp(c); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_CMP_D_C - -/* compare a digit */ -int aws_mp_cmp_d(aws_mp_int *a, aws_mp_digit b) -{ - /* compare based on sign */ - if (a->sign == AWS_MP_NEG) { - return AWS_MP_LT; - } - - /* compare based on magnitude */ - if (a->used > 1) { - return AWS_MP_GT; - } - - /* compare the only digit of a to b */ - if (a->dp[0] > b) { - return AWS_MP_GT; - } else if (a->dp[0] < b) { - return AWS_MP_LT; - } else { - return AWS_MP_EQ; - } -} -#endif - -#ifdef AWS_BN_MP_CMP_MAG_C - -/* compare maginitude of two ints (unsigned) */ -int aws_mp_cmp_mag(aws_mp_int *a, aws_mp_int *b) -{ - int n; - aws_mp_digit *tmpa, *tmpb; - - /* compare based on # of non-zero digits */ - if (a->used > b->used) { - return AWS_MP_GT; - } - - if (a->used < b->used) { - return AWS_MP_LT; - } - - /* alias for a */ - tmpa = a->dp + (a->used - 1); - - /* alias for b */ - tmpb = b->dp + (a->used - 1); - - /* compare based on digits */ - for (n = 0; n < a->used; ++n, --tmpa, --tmpb) { - if (*tmpa > *tmpb) { - return AWS_MP_GT; - } - - if (*tmpa < *tmpb) { - return AWS_MP_LT; - } - } - return AWS_MP_EQ; -} -#endif - -#ifdef AWS_BN_MP_CLEAR_C - -/* clear one (frees) */ -void -aws_mp_clear(aws_mp_int *a) -{ - int i; - - /* only do anything if a hasn't been freed previously */ - if (a->dp != NULL) { - /* first zero the digits */ - for (i = 0; i < a->used; i++) { - a->dp[i] = 0; - } - - /* free ram */ - AWS_XFREE(a->dp); - - /* reset members to make debugging easier */ - a->dp = NULL; - a->alloc = a->used = 0; - a->sign = AWS_MP_ZPOS; - } -} -#endif - -#ifdef AWS_BN_MP_INVMOD_SLOW_C - -/* hac 14.61, pp608 */ -int aws_mp_invmod_slow(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - aws_mp_int x, y, u, v, A, B, C, D; - int res; - - /* b cannot be negative */ - if (b->sign == AWS_MP_NEG || aws_mp_iszero(b) == 1) { - return AWS_MP_VAL; - } - - /* init temps */ - if ((res = aws_mp_init_multi(&x, &y, &u, &v, - &A, &B, &C, &D, NULL)) != AWS_MP_OKAY) { - return res; - } - - /* x = a, y = b */ - if ((res = aws_mp_mod(a, b, &x)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - if ((res = aws_mp_copy(b, &y)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - /* 2. [modified] if x,y are both even then return an error! */ - if (aws_mp_iseven (&x) == 1 && aws_mp_iseven (&y) == 1) { - res = AWS_MP_VAL; - goto LBL_ERR; - } - - /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ - if ((res = aws_mp_copy(&x, &u)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - if ((res = aws_mp_copy(&y, &v)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - aws_mp_set(&A, 1); - aws_mp_set(&D, 1); - -top: - /* 4. while u is even do */ - while (aws_mp_iseven (&u) == 1) { - /* 4.1 u = u/2 */ - if ((res = aws_mp_div_2(&u, &u)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - /* 4.2 if A or B is odd then */ - if (aws_mp_isodd (&A) == 1 || aws_mp_isodd (&B) == 1) { - /* A = (A+y)/2, B = (B-x)/2 */ - if ((res = aws_mp_add(&A, &y, &A)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - if ((res = aws_mp_sub(&B, &x, &B)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - /* A = A/2, B = B/2 */ - if ((res = aws_mp_div_2(&A, &A)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - if ((res = aws_mp_div_2(&B, &B)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* 5. while v is even do */ - while (aws_mp_iseven (&v) == 1) { - /* 5.1 v = v/2 */ - if ((res = aws_mp_div_2(&v, &v)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - /* 5.2 if C or D is odd then */ - if (aws_mp_isodd (&C) == 1 || aws_mp_isodd (&D) == 1) { - /* C = (C+y)/2, D = (D-x)/2 */ - if ((res = aws_mp_add(&C, &y, &C)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - if ((res = aws_mp_sub(&D, &x, &D)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - /* C = C/2, D = D/2 */ - if ((res = aws_mp_div_2(&C, &C)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - if ((res = aws_mp_div_2(&D, &D)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* 6. if u >= v then */ - if (aws_mp_cmp(&u, &v) != AWS_MP_LT) { - /* u = u - v, A = A - C, B = B - D */ - if ((res = aws_mp_sub(&u, &v, &u)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - if ((res = aws_mp_sub(&A, &C, &A)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - if ((res = aws_mp_sub(&B, &D, &B)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } else { - /* v - v - u, C = C - A, D = D - B */ - if ((res = aws_mp_sub(&v, &u, &v)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - if ((res = aws_mp_sub(&C, &A, &C)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - if ((res = aws_mp_sub(&D, &B, &D)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* if not zero goto step 4 */ - if (aws_mp_iszero (&u) == 0) - goto top; - - /* now a = C, b = D, gcd == g*v */ - - /* if v != 1 then there is no inverse */ - if (aws_mp_cmp_d(&v, 1) != AWS_MP_EQ) { - res = AWS_MP_VAL; - goto LBL_ERR; - } - - /* if its too low */ - while (aws_mp_cmp_d(&C, 0) == AWS_MP_LT) { - if ((res = aws_mp_add(&C, b, &C)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* too big */ - while (aws_mp_cmp_mag(&C, b) != AWS_MP_LT) { - if ((res = aws_mp_sub(&C, b, &C)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* C is now the inverse */ - aws_mp_exch(&C, c); - res = AWS_MP_OKAY; -LBL_ERR: -aws_mp_clear_multi(&x, &y, &u, &v, &A, &B, &C, &D, NULL); - return res; -} -#endif - -#ifdef AWS_BN_MP_DIV_C - -#ifdef AWS_BN_MP_DIV_SMALL - -/* slower bit-bang division... also smaller */ -int mp_div(mp_int * a, mp_int * b, mp_int * c, mp_int * d) -{ - mp_int ta, tb, tq, q; - int res, n, n2; - - /* is divisor zero ? */ - if (aws_mp_iszero (b) == 1) { - return AWS_MP_VAL; - } - - /* if a < b then q=0, r = a */ - if (mp_cmp_mag (a, b) == AWS_MP_LT) { - if (d != NULL) { - res = mp_copy (a, d); - } else { - res = AWS_MP_OKAY; - } - if (c != NULL) { - mp_zero (c); - } - return res; - } - - /* init our temps */ - if ((res = mp_init_multi(&ta, &tb, &tq, &q, NULL) != AWS_MP_OKAY)) { - return res; - } - - - mp_set(&tq, 1); - n = mp_count_bits(a) - mp_count_bits(b); - if (((res = mp_abs(a, &ta)) != AWS_MP_OKAY) || - ((res = mp_abs(b, &tb)) != AWS_MP_OKAY) || - ((res = mp_mul_2d(&tb, n, &tb)) != AWS_MP_OKAY) || - ((res = mp_mul_2d(&tq, n, &tq)) != AWS_MP_OKAY)) { - goto LBL_ERR; - } - - while (n-- >= 0) { - if (mp_cmp(&tb, &ta) != AWS_MP_GT) { - if (((res = mp_sub(&ta, &tb, &ta)) != AWS_MP_OKAY) || - ((res = mp_add(&q, &tq, &q)) != AWS_MP_OKAY)) { - goto LBL_ERR; - } - } - if (((res = mp_div_2d(&tb, 1, &tb, NULL)) != AWS_MP_OKAY) || - ((res = mp_div_2d(&tq, 1, &tq, NULL)) != AWS_MP_OKAY)) { - goto LBL_ERR; - } - } - - /* now q == quotient and ta == remainder */ - n = a->sign; - n2 = (a->sign == b->sign ? AWS_MP_ZPOS : AWS_MP_NEG); - if (c != NULL) { - mp_exch(c, &q); - c->sign = (aws_mp_iszero(c) == AWS_MP_YES) ? AWS_MP_ZPOS : n2; - } - if (d != NULL) { - mp_exch(d, &ta); - d->sign = (aws_mp_iszero(d) == AWS_MP_YES) ? AWS_MP_ZPOS : n; - } -LBL_ERR: - mp_clear_multi(&ta, &tb, &tq, &q, NULL); - return res; -} - -#else - -/* integer signed division. - * c*b + d == a [e.g. a/b, c=quotient, d=remainder] - * HAC pp.598 Algorithm 14.20 - * - * Note that the description in HAC is horribly - * incomplete. For example, it doesn't consider - * the case where digits are removed from 'x' in - * the inner loop. It also doesn't consider the - * case that y has fewer than three digits, etc.. - * - * The overall algorithm is as described as - * 14.20 from HAC but fixed to treat these cases. -*/ -int aws_mp_div(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d) -{ - aws_mp_int q, x, y, t1, t2; - int res, n, t, i, norm, neg; - - /* is divisor zero ? */ - if (aws_mp_iszero (b) == 1) { - return AWS_MP_VAL; - } - - /* if a < b then q=0, r = a */ - if (aws_mp_cmp_mag(a, b) == AWS_MP_LT) { - if (d != NULL) { - res = aws_mp_copy(a, d); - } else { - res = AWS_MP_OKAY; - } - if (c != NULL) { - aws_mp_zero(c); - } - return res; - } - - if ((res = aws_mp_init_size(&q, a->used + 2)) != AWS_MP_OKAY) { - return res; - } - q.used = a->used + 2; - - if ((res = aws_mp_init(&t1)) != AWS_MP_OKAY) { - goto LBL_Q; - } - - if ((res = aws_mp_init(&t2)) != AWS_MP_OKAY) { - goto LBL_T1; - } - - if ((res = aws_mp_init_copy(&x, a)) != AWS_MP_OKAY) { - goto LBL_T2; - } - - if ((res = aws_mp_init_copy(&y, b)) != AWS_MP_OKAY) { - goto LBL_X; - } - - /* fix the sign */ - neg = (a->sign == b->sign) ? AWS_MP_ZPOS : AWS_MP_NEG; - x.sign = y.sign = AWS_MP_ZPOS; - - /* normalize both x and y, ensure that y >= b/2, [b == 2**AWS_DIGIT_BIT] */ - norm = aws_mp_count_bits(&y) % AWS_DIGIT_BIT; - if (norm < (int)(AWS_DIGIT_BIT-1)) { - norm = (AWS_DIGIT_BIT-1) - norm; - if ((res = aws_mp_mul_2d(&x, norm, &x)) != AWS_MP_OKAY) { - goto LBL_Y; - } - if ((res = aws_mp_mul_2d(&y, norm, &y)) != AWS_MP_OKAY) { - goto LBL_Y; - } - } else { - norm = 0; - } - - /* note hac does 0 based, so if used==5 then its 0,1,2,3,4, e.g. use 4 */ - n = x.used - 1; - t = y.used - 1; - - /* while (x >= y*b**n-t) do { q[n-t] += 1; x -= y*b**{n-t} } */ - if ((res = aws_mp_lshd(&y, n - t)) != AWS_MP_OKAY) { /* y = y*b**{n-t} */ - goto LBL_Y; - } - - while (aws_mp_cmp(&x, &y) != AWS_MP_LT) { - ++(q.dp[n - t]); - if ((res = aws_mp_sub(&x, &y, &x)) != AWS_MP_OKAY) { - goto LBL_Y; - } - } - - /* reset y by shifting it back down */ - aws_mp_rshd(&y, n - t); - - /* step 3. for i from n down to (t + 1) */ - for (i = n; i >= (t + 1); i--) { - if (i > x.used) { - continue; - } - - /* step 3.1 if xi == yt then set q{i-t-1} to b-1, - * otherwise set q{i-t-1} to (xi*b + x{i-1})/yt */ - if (x.dp[i] == y.dp[t]) { - q.dp[i - t - 1] = ((((aws_mp_digit)1) << AWS_DIGIT_BIT) - 1); - } else { - aws_mp_word tmp; - tmp = ((aws_mp_word) x.dp[i]) << ((aws_mp_word) AWS_DIGIT_BIT); - tmp |= ((aws_mp_word) x.dp[i - 1]); - tmp /= ((aws_mp_word) y.dp[t]); - if (tmp > (aws_mp_word) AWS_MP_MASK) - tmp = AWS_MP_MASK; - q.dp[i - t - 1] = (aws_mp_digit) (tmp & (aws_mp_word) (AWS_MP_MASK)); - } - - /* while (q{i-t-1} * (yt * b + y{t-1})) > - xi * b**2 + xi-1 * b + xi-2 - - do q{i-t-1} -= 1; - */ - q.dp[i - t - 1] = (q.dp[i - t - 1] + 1) & AWS_MP_MASK; - do { - q.dp[i - t - 1] = (q.dp[i - t - 1] - 1) & AWS_MP_MASK; - - /* find left hand */ - aws_mp_zero(&t1); - t1.dp[0] = (t - 1 < 0) ? 0 : y.dp[t - 1]; - t1.dp[1] = y.dp[t]; - t1.used = 2; - if ((res = aws_mp_mul_d(&t1, q.dp[i - t - 1], &t1)) != AWS_MP_OKAY) { - goto LBL_Y; - } - - /* find right hand */ - t2.dp[0] = (i - 2 < 0) ? 0 : x.dp[i - 2]; - t2.dp[1] = (i - 1 < 0) ? 0 : x.dp[i - 1]; - t2.dp[2] = x.dp[i]; - t2.used = 3; - } while (aws_mp_cmp_mag(&t1, &t2) == AWS_MP_GT); - - /* step 3.3 x = x - q{i-t-1} * y * b**{i-t-1} */ - if ((res = aws_mp_mul_d(&y, q.dp[i - t - 1], &t1)) != AWS_MP_OKAY) { - goto LBL_Y; - } - - if ((res = aws_mp_lshd(&t1, i - t - 1)) != AWS_MP_OKAY) { - goto LBL_Y; - } - - if ((res = aws_mp_sub(&x, &t1, &x)) != AWS_MP_OKAY) { - goto LBL_Y; - } - - /* if x < 0 then { x = x + y*b**{i-t-1}; q{i-t-1} -= 1; } */ - if (x.sign == AWS_MP_NEG) { - if ((res = aws_mp_copy(&y, &t1)) != AWS_MP_OKAY) { - goto LBL_Y; - } - if ((res = aws_mp_lshd(&t1, i - t - 1)) != AWS_MP_OKAY) { - goto LBL_Y; - } - if ((res = aws_mp_add(&x, &t1, &x)) != AWS_MP_OKAY) { - goto LBL_Y; - } - - q.dp[i - t - 1] = (q.dp[i - t - 1] - 1UL) & AWS_MP_MASK; - } - } - - /* now q is the quotient and x is the remainder - * [which we have to normalize] - */ - - /* get sign before writing to c */ - x.sign = x.used == 0 ? AWS_MP_ZPOS : a->sign; - - if (c != NULL) { - aws_mp_clamp(&q); - aws_mp_exch(&q, c); - c->sign = neg; - } - - if (d != NULL) { - aws_mp_div_2d(&x, norm, &x, NULL); - aws_mp_exch(&x, d); - } - - res = AWS_MP_OKAY; - -LBL_Y: -aws_mp_clear(&y); -LBL_X: -aws_mp_clear(&x); -LBL_T2: -aws_mp_clear(&t2); -LBL_T1: -aws_mp_clear(&t1); -LBL_Q: -aws_mp_clear(&q); - return res; -} - -#endif - -#endif - -#ifdef AWS_BN_MP_REDUCE_2K_SETUP_L_C - -/* determines the setup value */ -int aws_mp_reduce_2k_setup_l(aws_mp_int *a, aws_mp_int *d) -{ - int res; - aws_mp_int tmp; - - if ((res = aws_mp_init(&tmp)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_2expt(&tmp, aws_mp_count_bits(a))) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_s_mp_sub(&tmp, a, d)) != AWS_MP_OKAY) { - goto ERR; - } - -ERR: -aws_mp_clear(&tmp); - return res; -} -#endif - -#ifdef AWS_BN_MP_MONTGOMERY_CALC_NORMALIZATION_C - -/* - * shifts with subtractions when the result is greater than b. - * - * The method is slightly modified to shift B unconditionally upto just under - * the leading bit of b. This saves alot of multiple precision shifting. - */ -int aws_mp_montgomery_calc_normalization(aws_mp_int *a, aws_mp_int *b) -{ - int x, bits, res; - - /* how many bits of last digit does b use */ - bits = aws_mp_count_bits(b) % AWS_DIGIT_BIT; - - if (b->used > 1) { - if ((res = aws_mp_2expt(a, (b->used - 1) * AWS_DIGIT_BIT + bits - 1)) != AWS_MP_OKAY) { - return res; - } - } else { - aws_mp_set(a, 1); - bits = 1; - } - - - /* now compute C = A * B mod b */ - for (x = bits - 1; x < (int)AWS_DIGIT_BIT; x++) { - if ((res = aws_mp_mul_2(a, a)) != AWS_MP_OKAY) { - return res; - } - if (aws_mp_cmp_mag(a, b) != AWS_MP_LT) { - if ((res = aws_s_mp_sub(a, b, a)) != AWS_MP_OKAY) { - return res; - } - } - } - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_READ_SIGNED_BIN_C - - -/* read signed bin, big endian, first byte is 0==positive or 1==negative */ -int aws_mp_read_signed_bin(aws_mp_int *a, const unsigned char *b, int c) -{ - int res; - - /* read magnitude */ - if ((res = aws_mp_read_unsigned_bin(a, b + 1, c - 1)) != AWS_MP_OKAY) { - return res; - } - - /* first byte is 0 for positive, non-zero for negative */ - if (b[0] == 0) { - a->sign = AWS_MP_ZPOS; - } else { - a->sign = AWS_MP_NEG; - } - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_XOR_C - -/* XOR two ints together */ -int -aws_mp_xor(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int res, ix, px; - aws_mp_int t, *x; - - if (a->used > b->used) { - if ((res = aws_mp_init_copy(&t, a)) != AWS_MP_OKAY) { - return res; - } - px = b->used; - x = b; - } else { - if ((res = aws_mp_init_copy(&t, b)) != AWS_MP_OKAY) { - return res; - } - px = a->used; - x = a; - } - - for (ix = 0; ix < px; ix++) { - t.dp[ix] ^= x->dp[ix]; - } - aws_mp_clamp(&t); - aws_mp_exch(c, &t); - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_EXPTMOD_C - -/* this is a shell function that calls either the normal or Montgomery - * exptmod functions. Originally the call to the montgomery code was - * embedded in the normal function but that wasted alot of stack space - * for nothing (since 99% of the time the Montgomery code would be called) - */ -int aws_mp_exptmod(aws_mp_int *G, aws_mp_int *X, aws_mp_int *P, aws_mp_int *Y) -{ - int dr; - - /* modulus P must be positive */ - if (P->sign == AWS_MP_NEG) { - return AWS_MP_VAL; - } - - /* if exponent X is negative we have to recurse */ - if (X->sign == AWS_MP_NEG) { -#ifdef AWS_BN_MP_INVMOD_C - aws_mp_int tmpG, tmpX; - int err; - - /* first compute 1/G mod P */ - if ((err = aws_mp_init(&tmpG)) != AWS_MP_OKAY) { - return err; - } - if ((err = aws_mp_invmod(G, P, &tmpG)) != AWS_MP_OKAY) { - aws_mp_clear(&tmpG); - return err; - } - - /* now get |X| */ - if ((err = aws_mp_init(&tmpX)) != AWS_MP_OKAY) { - aws_mp_clear(&tmpG); - return err; - } - if ((err = aws_mp_abs(X, &tmpX)) != AWS_MP_OKAY) { - aws_mp_clear_multi(&tmpG, &tmpX, NULL); - return err; - } - - /* and now compute (1/G)**|X| instead of G**X [X < 0] */ - err = aws_mp_exptmod(&tmpG, &tmpX, P, Y); - aws_mp_clear_multi(&tmpG, &tmpX, NULL); - return err; -#else - /* no invmod */ - return AWS_MP_VAL; -#endif - } - -/* modified diminished radix reduction */ -#if defined(AWS_BN_MP_REDUCE_IS_2K_L_C) && defined(AWS_BN_MP_REDUCE_2K_L_C) && defined(AWS_BN_S_MP_EXPTMOD_C) - if (aws_mp_reduce_is_2k_l(P) == AWS_MP_YES) { - return aws_s_mp_exptmod(G, X, P, Y, 1); - } -#endif - -#ifdef AWS_BN_MP_DR_IS_MODULUS_C - /* is it a DR modulus? */ - dr = aws_mp_dr_is_modulus(P); -#else - /* default to no */ - dr = 0; -#endif - -#ifdef AWS_BN_MP_REDUCE_IS_2K_C - /* if not, is it a unrestricted DR modulus? */ - if (dr == 0) { - dr = aws_mp_reduce_is_2k(P) << 1; - } -#endif - - /* if the modulus is odd or dr != 0 use the montgomery method */ -#ifdef AWS_BN_MP_EXPTMOD_FAST_C - if (aws_mp_isodd (P) == 1 || dr != 0) { - return aws_mp_exptmod_fast(G, X, P, Y, dr); - } else { -#endif -#ifdef AWS_BN_S_MP_EXPTMOD_C - /* otherwise use the generic Barrett reduction technique */ - return aws_s_mp_exptmod(G, X, P, Y, 0); -#else - /* no exptmod for evens */ - return AWS_MP_VAL; -#endif -#ifdef AWS_BN_MP_EXPTMOD_FAST_C - } -#endif -} - -#endif - -#ifdef AWS_BN_MP_PRIME_IS_PRIME_C - -/* performs a variable number of rounds of Miller-Rabin - * - * Probability of error after t rounds is no more than - - * - * Sets result to 1 if probably prime, 0 otherwise - */ -int aws_mp_prime_is_prime(aws_mp_int *a, int t, int *result) -{ - aws_mp_int b; - int ix, err, res; - - /* default to no */ - *result = AWS_MP_NO; - - /* valid value of t? */ - if (t <= 0 || t > AWS_JKTM_PRIME_SIZE) { - return AWS_MP_VAL; - } - - /* is the input equal to one of the primes in the table? */ - for (ix = 0; ix < AWS_JKTM_PRIME_SIZE; ix++) { - if (aws_mp_cmp_d(a, aws_ltm_prime_tab[ix]) == AWS_MP_EQ) { - *result = 1; - return AWS_MP_OKAY; - } - } - - /* first perform trial division */ - if ((err = aws_mp_prime_is_divisible(a, &res)) != AWS_MP_OKAY) { - return err; - } - - /* return if it was trivially divisible */ - if (res == AWS_MP_YES) { - return AWS_MP_OKAY; - } - - /* now perform the miller-rabin rounds */ - if ((err = aws_mp_init(&b)) != AWS_MP_OKAY) { - return err; - } - - for (ix = 0; ix < t; ix++) { - /* set the prime */ - aws_mp_set(&b, aws_ltm_prime_tab[ix]); - - if ((err = aws_mp_prime_miller_rabin(a, &b, &res)) != AWS_MP_OKAY) { - goto LBL_B; - } - - if (res == AWS_MP_NO) { - goto LBL_B; - } - } - - /* passed the test */ - *result = AWS_MP_YES; -LBL_B: -aws_mp_clear(&b); - return err; -} -#endif - -#ifdef AWS_BN_MP_REDUCE_2K_L_C - -/* reduces a modulo n where n is of the form 2**p - d - This differs from reduce_2k since "d" can be larger - than a single digit. -*/ -int aws_mp_reduce_2k_l(aws_mp_int *a, aws_mp_int *n, aws_mp_int *d) -{ - aws_mp_int q; - int p, res; - - if ((res = aws_mp_init(&q)) != AWS_MP_OKAY) { - return res; - } - - p = aws_mp_count_bits(n); -top: - /* q = a/2**p, a = a mod 2**p */ - if ((res = aws_mp_div_2d(a, p, &q, a)) != AWS_MP_OKAY) { - goto ERR; - } - - /* q = q * d */ - if ((res = aws_mp_mul(&q, d, &q)) != AWS_MP_OKAY) { - goto ERR; - } - - /* a = a + q */ - if ((res = aws_s_mp_add(a, &q, a)) != AWS_MP_OKAY) { - goto ERR; - } - - if (aws_mp_cmp_mag(a, n) != AWS_MP_LT) { - aws_s_mp_sub(a, n, a); - goto top; - } - -ERR: -aws_mp_clear(&q); - return res; -} - -#endif - -#ifdef AWS_BN_MP_EXPTMOD_FAST_C - -/* computes Y == G**X mod P, HAC pp.616, Algorithm 14.85 - * - * Uses a left-to-right k-ary sliding window to compute the modular exponentiation. - * The value of k changes based on the size of the exponent. - * - * Uses Montgomery or Diminished Radix reduction [whichever appropriate] - */ - -#ifdef AWS_MP_LOW_MEM - #define TAB_SIZE 32 -#else - #define TAB_SIZE 256 -#endif - -int aws_mp_exptmod_fast(aws_mp_int *G, aws_mp_int *X, aws_mp_int *P, aws_mp_int *Y, int redmode) -{ - aws_mp_int M[TAB_SIZE], res; - aws_mp_digit buf, mp; - int err, bitbuf, bitcpy, bitcnt, mode, digidx, x, y, winsize; - - /* use a pointer to the reduction algorithm. This allows us to use - * one of many reduction algorithms without modding the guts of - * the code with if statements everywhere. - */ - int (*redux)(aws_mp_int *, aws_mp_int *,aws_mp_digit); - - /* find window size */ - x = aws_mp_count_bits(X); - if (x <= 7) { - winsize = 2; - } else if (x <= 36) { - winsize = 3; - } else if (x <= 140) { - winsize = 4; - } else if (x <= 450) { - winsize = 5; - } else if (x <= 1303) { - winsize = 6; - } else if (x <= 3529) { - winsize = 7; - } else { - winsize = 8; - } - -#ifdef AWS_MP_LOW_MEM - if (winsize > 5) { - winsize = 5; - } -#endif - - /* init M array */ - /* init first cell */ - if ((err = aws_mp_init(&M[1])) != AWS_MP_OKAY) { - return err; - } - - /* now init the second half of the array */ - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - if ((err = aws_mp_init(&M[x])) != AWS_MP_OKAY) { - for (y = 1<<(winsize-1); y < x; y++) { - aws_mp_clear(&M[y]); - } - aws_mp_clear(&M[1]); - return err; - } - } - - /* determine and setup reduction code */ - if (redmode == 0) { -#ifdef AWS_BN_MP_MONTGOMERY_SETUP_C - /* now setup montgomery */ - if ((err = aws_mp_montgomery_setup(P, &mp)) != AWS_MP_OKAY) { - goto LBL_M; - } -#else - err = AWS_MP_VAL; - goto LBL_M; -#endif - - /* automatically pick the comba one if available (saves quite a few calls/ifs) */ -#ifdef AWS_BN_FAST_MP_MONTGOMERY_REDUCE_C - if (((P->used * 2 + 1) < AWS_MP_WARRAY) && - P->used < (1 << ((CHAR_BIT * sizeof (aws_mp_word)) - (2 * AWS_DIGIT_BIT)))) { - redux = aws_fast_mp_montgomery_reduce; - } else -#endif - { -#ifdef AWS_BN_MP_MONTGOMERY_REDUCE_C - /* use slower baseline Montgomery method */ - redux = aws_mp_montgomery_reduce; -#else - err = AWS_MP_VAL; - goto LBL_M; -#endif - } - } else if (redmode == 1) { -#if defined(AWS_BN_MP_DR_SETUP_C) && defined(AWS_BN_MP_DR_REDUCE_C) - /* setup DR reduction for moduli of the form B**k - b */ - aws_mp_dr_setup(P, &mp); - redux = aws_mp_dr_reduce; -#else - err = AWS_MP_VAL; - goto LBL_M; -#endif - } else { -#if defined(AWS_BN_MP_REDUCE_2K_SETUP_C) && defined(AWS_BN_MP_REDUCE_2K_C) - /* setup DR reduction for moduli of the form 2**k - b */ - if ((err = aws_mp_reduce_2k_setup(P, &mp)) != AWS_MP_OKAY) { - goto LBL_M; - } - redux = aws_mp_reduce_2k; -#else - err = AWS_MP_VAL; - goto LBL_M; -#endif - } - - /* setup result */ - if ((err = aws_mp_init(&res)) != AWS_MP_OKAY) { - goto LBL_M; - } - - /* create M table - * - - * - * The first half of the table is not computed though accept for M[0] and M[1] - */ - - if (redmode == 0) { -#ifdef AWS_BN_MP_MONTGOMERY_CALC_NORMALIZATION_C - /* now we need R mod m */ - if ((err = aws_mp_montgomery_calc_normalization(&res, P)) != AWS_MP_OKAY) { - goto LBL_RES; - } -#else - err = AWS_MP_VAL; - goto LBL_RES; -#endif - - /* now set M[1] to G * R mod m */ - if ((err = aws_mp_mulmod(G, &res, P, &M[1])) != AWS_MP_OKAY) { - goto LBL_RES; - } - } else { - aws_mp_set(&res, 1); - if ((err = aws_mp_mod(G, P, &M[1])) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - - /* compute the value at M[1<<(winsize-1)] by squaring M[1] (winsize-1) times */ - if ((err = aws_mp_copy(&M[1], &M[1 << (winsize - 1)])) != AWS_MP_OKAY) { - goto LBL_RES; - } - - for (x = 0; x < (winsize - 1); x++) { - if ((err = aws_mp_sqr(&M[1 << (winsize - 1)], &M[1 << (winsize - 1)])) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&M[1 << (winsize - 1)], P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - - /* create upper table */ - for (x = (1 << (winsize - 1)) + 1; x < (1 << winsize); x++) { - if ((err = aws_mp_mul(&M[x - 1], &M[1], &M[x])) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&M[x], P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - - /* set initial mode and bit cnt */ - mode = 0; - bitcnt = 1; - buf = 0; - digidx = X->used - 1; - bitcpy = 0; - bitbuf = 0; - - for (;;) { - /* grab next digit as required */ - if (--bitcnt == 0) { - /* if digidx == -1 we are out of digits so break */ - if (digidx == -1) { - break; - } - /* read next digit and reset bitcnt */ - buf = X->dp[digidx--]; - bitcnt = (int)AWS_DIGIT_BIT; - } - - /* grab the next msb from the exponent */ - y = (aws_mp_digit)(buf >> (AWS_DIGIT_BIT - 1)) & 1; - buf <<= (aws_mp_digit)1; - - /* if the bit is zero and mode == 0 then we ignore it - * These represent the leading zero bits before the first 1 bit - * in the exponent. Technically this opt is not required but it - * does lower the # of trivial squaring/reductions used - */ - if (mode == 0 && y == 0) { - continue; - } - - /* if the bit is zero and mode == 1 then we square */ - if (mode == 1 && y == 0) { - if ((err = aws_mp_sqr(&res, &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - continue; - } - - /* else we add it to the window */ - bitbuf |= (y << (winsize - ++bitcpy)); - mode = 2; - - if (bitcpy == winsize) { - /* ok window is filled so square as required and multiply */ - /* square first */ - for (x = 0; x < winsize; x++) { - if ((err = aws_mp_sqr(&res, &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - - /* then multiply */ - if ((err = aws_mp_mul(&res, &M[bitbuf], &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - - /* empty window and reset */ - bitcpy = 0; - bitbuf = 0; - mode = 1; - } - } - - /* if bits remain then square/multiply */ - if (mode == 2 && bitcpy > 0) { - /* square then multiply if the bit is set */ - for (x = 0; x < bitcpy; x++) { - if ((err = aws_mp_sqr(&res, &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - - /* get next bit of the window */ - bitbuf <<= 1; - if ((bitbuf & (1 << winsize)) != 0) { - /* then multiply */ - if ((err = aws_mp_mul(&res, &M[1], &res)) != AWS_MP_OKAY) { - goto LBL_RES; - } - if ((err = redux (&res, P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - } - } - - if (redmode == 0) { - /* fixup result if Montgomery reduction is used - * recall that any value in a Montgomery system is - * actually multiplied by R mod n. So we have - * to reduce one more time to cancel out the factor - * of R. - */ - if ((err = redux(&res, P, mp)) != AWS_MP_OKAY) { - goto LBL_RES; - } - } - - /* swap res with Y */ - aws_mp_exch(&res, Y); - err = AWS_MP_OKAY; -LBL_RES: -aws_mp_clear(&res); -LBL_M: -aws_mp_clear(&M[1]); - for (x = 1<<(winsize-1); x < (1 << winsize); x++) { - aws_mp_clear(&M[x]); - } - return err; -} -#endif - -#ifdef AWS_BN_S_MP_ADD_C - -/* low level addition, based on HAC pp.594, Algorithm 14.7 */ -int -aws_s_mp_add(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - aws_mp_int *x; - int olduse, res, min, max; - - /* find sizes, we let |a| <= |b| which means we have to sort - * them. "x" will point to the input with the most digits - */ - if (a->used > b->used) { - min = b->used; - max = a->used; - x = a; - } else { - min = a->used; - max = b->used; - x = b; - } - - /* init result */ - if (c->alloc < max + 1) { - if ((res = aws_mp_grow(c, max + 1)) != AWS_MP_OKAY) { - return res; - } - } - - /* get old used digit count and set new one */ - olduse = c->used; - c->used = max + 1; - - { - register aws_mp_digit u, *tmpa, *tmpb, *tmpc; - register int i; - - /* alias for digit pointers */ - - /* first input */ - tmpa = a->dp; - - /* second input */ - tmpb = b->dp; - - /* destination */ - tmpc = c->dp; - - /* zero the carry */ - u = 0; - for (i = 0; i < min; i++) { - /* Compute the sum at one digit, T[i] = A[i] + B[i] + U */ - *tmpc = *tmpa++ + *tmpb++ + u; - - /* U = carry bit of T[i] */ - u = *tmpc >> ((aws_mp_digit)AWS_DIGIT_BIT); - - /* take away carry bit from T[i] */ - *tmpc++ &= AWS_MP_MASK; - } - - /* now copy higher words if any, that is in A+B - * if A or B has more digits add those in - */ - if (min != max) { - for (; i < max; i++) { - /* T[i] = X[i] + U */ - *tmpc = x->dp[i] + u; - - /* U = carry bit of T[i] */ - u = *tmpc >> ((aws_mp_digit)AWS_DIGIT_BIT); - - /* take away carry bit from T[i] */ - *tmpc++ &= AWS_MP_MASK; - } - } - - /* add carry */ - *tmpc++ = u; - - /* clear digits above oldused */ - for (i = c->used; i < olduse; i++) { - *tmpc++ = 0; - } - } - - aws_mp_clamp(c); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_PRIME_FERMAT_C - -/* performs one Fermat test. - * - * If "a" were prime then b**a == b (mod a) since the order of - * the multiplicative sub-group would be phi(a) = a-1. That means - * it would be the same as b**(a mod (a-1)) == b**1 == b (mod a). - * - * Sets result to 1 if the congruence holds, or zero otherwise. - */ -int aws_mp_prime_fermat(aws_mp_int *a, aws_mp_int *b, int *result) -{ - aws_mp_int t; - int err; - - /* default to composite */ - *result = AWS_MP_NO; - - /* ensure b > 1 */ - if (aws_mp_cmp_d(b, 1) != AWS_MP_GT) { - return AWS_MP_VAL; - } - - /* init t */ - if ((err = aws_mp_init(&t)) != AWS_MP_OKAY) { - return err; - } - - /* compute t = b**a mod a */ - if ((err = aws_mp_exptmod(b, a, a, &t)) != AWS_MP_OKAY) { - goto LBL_T; - } - - /* is it equal to b? */ - if (aws_mp_cmp(&t, b) == AWS_MP_EQ) { - *result = AWS_MP_YES; - } - - err = AWS_MP_OKAY; -LBL_T: -aws_mp_clear(&t); - return err; -} -#endif - -#ifdef AWS_BN_MP_ABS_C - -/* b = |a| - * - * Simple function copies the input and fixes the sign to positive - */ -int -aws_mp_abs(aws_mp_int *a, aws_mp_int *b) -{ - int res; - - /* copy a to b */ - if (a != b) { - if ((res = aws_mp_copy(a, b)) != AWS_MP_OKAY) { - return res; - } - } - - /* force the sign of b to positive */ - b->sign = AWS_MP_ZPOS; - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_CLAMP_C - -/* trim unused digits - * - * This is used to ensure that leading zero digits are - * trimed and the leading "used" digit will be non-zero - * Typically very fast. Also fixes the sign if there - * are no more leading digits - */ -void -aws_mp_clamp(aws_mp_int *a) -{ - /* decrease used while the most significant digit is - * zero. - */ - while (a->used > 0 && a->dp[a->used - 1] == 0) { - --(a->used); - } - - /* reset the sign flag if used == 0 */ - if (a->used == 0) { - a->sign = AWS_MP_ZPOS; - } -} -#endif - -/* $Source$ */ -/* $Revision: 0.41 $ */ -/* $Date: 2007-04-18 09:58:18 +0000 $ */ - -#ifdef AWS_BN_MP_SIGNED_BIN_SIZE_C - -/* get the size for an signed equivalent */ -int aws_mp_signed_bin_size(aws_mp_int *a) -{ - return 1 + aws_mp_unsigned_bin_size(a); -} -#endif - -#ifdef AWS_BN_MP_SQRT_C - -/* this function is less generic than mp_n_root, simpler and faster */ -int aws_mp_sqrt(aws_mp_int *arg, aws_mp_int *ret) -{ - int res; - aws_mp_int t1,t2; - - /* must be positive */ - if (arg->sign == AWS_MP_NEG) { - return AWS_MP_VAL; - } - - /* easy out */ - if (aws_mp_iszero(arg) == AWS_MP_YES) { - aws_mp_zero(ret); - return AWS_MP_OKAY; - } - - if ((res = aws_mp_init_copy(&t1, arg)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_init(&t2)) != AWS_MP_OKAY) { - goto E2; - } - - /* First approx. (not very bad for large arg) */ - aws_mp_rshd(&t1, t1.used / 2); - - /* t1 > 0 */ - if ((res = aws_mp_div(arg, &t1, &t2, NULL)) != AWS_MP_OKAY) { - goto E1; - } - if ((res = aws_mp_add(&t1, &t2, &t1)) != AWS_MP_OKAY) { - goto E1; - } - if ((res = aws_mp_div_2(&t1, &t1)) != AWS_MP_OKAY) { - goto E1; - } - /* And now t1 > sqrt(arg) */ - do { - if ((res = aws_mp_div(arg, &t1, &t2, NULL)) != AWS_MP_OKAY) { - goto E1; - } - if ((res = aws_mp_add(&t1, &t2, &t1)) != AWS_MP_OKAY) { - goto E1; - } - if ((res = aws_mp_div_2(&t1, &t1)) != AWS_MP_OKAY) { - goto E1; - } - /* t1 >= sqrt(arg) >= t2 at this point */ - } while (aws_mp_cmp_mag(&t1, &t2) == AWS_MP_GT); - - aws_mp_exch(&t1, ret); - -E1: -aws_mp_clear(&t2); -E2: -aws_mp_clear(&t1); - return res; -} - -#endif - -#ifdef AWS_BN_MP_MONTGOMERY_SETUP_C - -/* setups the montgomery reduction stuff */ -int -aws_mp_montgomery_setup(aws_mp_int *n, aws_mp_digit *rho) -{ - aws_mp_digit x, b; - -/* fast inversion mod 2**k - * - * Based on the fact that - * - * XA = 1 (mod 2**n) => (X(2-XA)) A = 1 (mod 2**2n) - * => 2*X*A - X*X*A*A = 1 - * => 2*(1) - (1) = 1 - */ - b = n->dp[0]; - - if ((b & 1) == 0) { - return AWS_MP_VAL; - } - - x = (((b + 2) & 4) << 1) + b; /* here x*a==1 mod 2**4 */ - x *= 2 - b * x; /* here x*a==1 mod 2**8 */ -#if !defined(AWS_MP_8BIT) - x *= 2 - b * x; /* here x*a==1 mod 2**16 */ -#endif -#if defined(AWS_MP_64BIT) || !(defined(AWS_MP_8BIT) || defined(AWS_MP_16BIT)) - x *= 2 - b * x; /* here x*a==1 mod 2**32 */ -#endif -#ifdef AWS_MP_64BIT - x *= 2 - b * x; /* here x*a==1 mod 2**64 */ -#endif - - /* rho = -1/m mod b */ - *rho = (unsigned long)(((aws_mp_word)1 << ((aws_mp_word) AWS_DIGIT_BIT)) - x) & AWS_MP_MASK; - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_FWRITE_C - -int aws_mp_fwrite(aws_mp_int *a, int radix, FILE *stream) -{ - char *buf = NULL; - int err = 0, len = 0, x = 0; - - if ((err = aws_mp_radix_size(a, radix, &len)) != AWS_MP_OKAY) { - return err; - } - - buf = AWS_OPT_CAST(char) AWS_XMALLOC (len); - if (buf == NULL) { - return AWS_MP_MEM; - } - - if ((err = aws_mp_toradix(a, buf, radix)) != AWS_MP_OKAY) { - AWS_XFREE (buf); - return err; - } - - for (x = 0; x < len; x++) { - if (fputc(buf[x], stream) == EOF) { - AWS_XFREE (buf); - return AWS_MP_VAL; - } - } - - AWS_XFREE (buf); - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_EXCH_C - -/* swap the elements of two integers, for cases where you can't simply swap the - * mp_int pointers around - */ -void -aws_mp_exch(aws_mp_int *a, aws_mp_int *b) -{ - aws_mp_int t; - - t = *a; - *a = *b; - *b = t; -} -#endif - -#ifdef AWS_BN_PRIME_TAB_C - -const aws_mp_digit aws_ltm_prime_tab[] = { - 0x0002, 0x0003, 0x0005, 0x0007, 0x000B, 0x000D, 0x0011, 0x0013, - 0x0017, 0x001D, 0x001F, 0x0025, 0x0029, 0x002B, 0x002F, 0x0035, - 0x003B, 0x003D, 0x0043, 0x0047, 0x0049, 0x004F, 0x0053, 0x0059, - 0x0061, 0x0065, 0x0067, 0x006B, 0x006D, 0x0071, 0x007F, -#ifndef AWS_MP_8BIT - 0x0083, - 0x0089, 0x008B, 0x0095, 0x0097, 0x009D, 0x00A3, 0x00A7, 0x00AD, - 0x00B3, 0x00B5, 0x00BF, 0x00C1, 0x00C5, 0x00C7, 0x00D3, 0x00DF, - 0x00E3, 0x00E5, 0x00E9, 0x00EF, 0x00F1, 0x00FB, 0x0101, 0x0107, - 0x010D, 0x010F, 0x0115, 0x0119, 0x011B, 0x0125, 0x0133, 0x0137, - - 0x0139, 0x013D, 0x014B, 0x0151, 0x015B, 0x015D, 0x0161, 0x0167, - 0x016F, 0x0175, 0x017B, 0x017F, 0x0185, 0x018D, 0x0191, 0x0199, - 0x01A3, 0x01A5, 0x01AF, 0x01B1, 0x01B7, 0x01BB, 0x01C1, 0x01C9, - 0x01CD, 0x01CF, 0x01D3, 0x01DF, 0x01E7, 0x01EB, 0x01F3, 0x01F7, - 0x01FD, 0x0209, 0x020B, 0x021D, 0x0223, 0x022D, 0x0233, 0x0239, - 0x023B, 0x0241, 0x024B, 0x0251, 0x0257, 0x0259, 0x025F, 0x0265, - 0x0269, 0x026B, 0x0277, 0x0281, 0x0283, 0x0287, 0x028D, 0x0293, - 0x0295, 0x02A1, 0x02A5, 0x02AB, 0x02B3, 0x02BD, 0x02C5, 0x02CF, - - 0x02D7, 0x02DD, 0x02E3, 0x02E7, 0x02EF, 0x02F5, 0x02F9, 0x0301, - 0x0305, 0x0313, 0x031D, 0x0329, 0x032B, 0x0335, 0x0337, 0x033B, - 0x033D, 0x0347, 0x0355, 0x0359, 0x035B, 0x035F, 0x036D, 0x0371, - 0x0373, 0x0377, 0x038B, 0x038F, 0x0397, 0x03A1, 0x03A9, 0x03AD, - 0x03B3, 0x03B9, 0x03C7, 0x03CB, 0x03D1, 0x03D7, 0x03DF, 0x03E5, - 0x03F1, 0x03F5, 0x03FB, 0x03FD, 0x0407, 0x0409, 0x040F, 0x0419, - 0x041B, 0x0425, 0x0427, 0x042D, 0x043F, 0x0443, 0x0445, 0x0449, - 0x044F, 0x0455, 0x045D, 0x0463, 0x0469, 0x047F, 0x0481, 0x048B, - - 0x0493, 0x049D, 0x04A3, 0x04A9, 0x04B1, 0x04BD, 0x04C1, 0x04C7, - 0x04CD, 0x04CF, 0x04D5, 0x04E1, 0x04EB, 0x04FD, 0x04FF, 0x0503, - 0x0509, 0x050B, 0x0511, 0x0515, 0x0517, 0x051B, 0x0527, 0x0529, - 0x052F, 0x0551, 0x0557, 0x055D, 0x0565, 0x0577, 0x0581, 0x058F, - 0x0593, 0x0595, 0x0599, 0x059F, 0x05A7, 0x05AB, 0x05AD, 0x05B3, - 0x05BF, 0x05C9, 0x05CB, 0x05CF, 0x05D1, 0x05D5, 0x05DB, 0x05E7, - 0x05F3, 0x05FB, 0x0607, 0x060D, 0x0611, 0x0617, 0x061F, 0x0623, - 0x062B, 0x062F, 0x063D, 0x0641, 0x0647, 0x0649, 0x064D, 0x0653 -#endif -}; -#endif - -#ifdef AWS_BN_MP_INIT_SET_C - -/* initialize and set a digit */ -int aws_mp_init_set(aws_mp_int *a, aws_mp_digit b) -{ - int err; - if ((err = aws_mp_init(a)) != AWS_MP_OKAY) { - return err; - } - aws_mp_set(a, b); - return err; -} -#endif - -#ifdef AWS_BN_MP_GET_INT_C - -/* get the lower 32-bits of an mp_int */ -unsigned long aws_mp_get_int(aws_mp_int *a) -{ - int i; - unsigned long res; - - if (a->used == 0) { - return 0; - } - - /* get number of digits of the lsb we have to read */ - i = AWS_MIN(a->used,(int)((sizeof(unsigned long)*CHAR_BIT+AWS_DIGIT_BIT-1)/AWS_DIGIT_BIT))-1; - - /* get most significant digit of result */ - res = AWS_JKTM_DIGIT(a,i); - - while (--i >= 0) { - res = (res << AWS_DIGIT_BIT) | AWS_JKTM_DIGIT(a,i); - } - - /* force result to 32-bits always so it is consistent on non 32-bit platforms */ - return res & 0xFFFFFFFFUL; -} -#endif - -#ifdef AWS_BN_MP_MUL_C - -/* high level multiplication (handles sign) */ -int aws_mp_mul(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int res, neg; - neg = (a->sign == b->sign) ? AWS_MP_ZPOS : AWS_MP_NEG; - - /* use Toom-Cook? */ -#ifdef AWS_BN_MP_TOOM_MUL_C - if (AWS_MIN (a->used, b->used) >= AWS_TOOM_MUL_CUTOFF) { - res = aws_mp_toom_mul(a, b, c); - } else -#endif -#ifdef AWS_BN_MP_KARATSUBA_MUL_C - /* use Karatsuba? */ - if (AWS_MIN (a->used, b->used) >= AWS_KARATSUBA_MUL_CUTOFF) { - res = aws_mp_karatsuba_mul(a, b, c); - } else -#endif - { - /* can we use the fast multiplier? - * - * The fast multiplier can be used if the output will - * have less than AWS_MP_WARRAY digits and the number of - * digits won't affect carry propagation - */ - int digs = a->used + b->used + 1; - -#ifdef AWS_BN_FAST_S_MP_MUL_DIGS_C - if ((digs < AWS_MP_WARRAY) && - AWS_MIN(a->used, b->used) <= - (1 << ((CHAR_BIT * sizeof (aws_mp_word)) - (2 * AWS_DIGIT_BIT)))) { - res = aws_fast_s_mp_mul_digs(a, b, c, digs); - } else -#endif -#ifdef AWS_BN_S_MP_MUL_DIGS_C - res = aws_s_mp_mul (a, b, c); /* uses s_mp_mul_digs */ -#else - res = AWS_MP_VAL; -#endif - - } - c->sign = (c->used > 0) ? neg : AWS_MP_ZPOS; - return res; -} -#endif - -#ifdef AWS_BN_MP_SQRMOD_C - -/* c = a * a (mod b) */ -int -aws_mp_sqrmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int res; - aws_mp_int t; - - if ((res = aws_mp_init(&t)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_sqr(a, &t)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - res = aws_mp_mod(&t, b, c); - aws_mp_clear(&t); - return res; -} -#endif - -#ifdef AWS_BN_MP_TO_UNSIGNED_BIN_C - -/* store in unsigned [big endian] format */ -int aws_mp_to_unsigned_bin(aws_mp_int *a, unsigned char *b) -{ - int x, res; - aws_mp_int t; - - if ((res = aws_mp_init_copy(&t, a)) != AWS_MP_OKAY) { - return res; - } - - x = 0; - while (aws_mp_iszero (&t) == 0) { -#ifndef AWS_MP_8BIT - b[x++] = (unsigned char) (t.dp[0] & 255); -#else - b[x++] = (unsigned char) (t.dp[0] | ((t.dp[1] & 0x01) << 7)); -#endif - if ((res = aws_mp_div_2d(&t, 8, &t, NULL)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - } - aws_bn_reverse(b, x); - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_S_MP_SQR_C - -/* low level squaring, b = a*a, HAC pp.596-597, Algorithm 14.16 */ -int aws_s_mp_sqr(aws_mp_int *a, aws_mp_int *b) -{ - aws_mp_int t; - int res, ix, iy, pa; - aws_mp_word r; - aws_mp_digit u, tmpx, *tmpt; - - pa = a->used; - if ((res = aws_mp_init_size(&t, 2 * pa + 1)) != AWS_MP_OKAY) { - return res; - } - - /* default used is maximum possible size */ - t.used = 2*pa + 1; - - for (ix = 0; ix < pa; ix++) { - /* first calculate the digit at 2*ix */ - /* calculate double precision result */ - r = ((aws_mp_word) t.dp[2*ix]) + - ((aws_mp_word)a->dp[ix])*((aws_mp_word)a->dp[ix]); - - /* store lower part in result */ - t.dp[ix+ix] = (aws_mp_digit) (r & ((aws_mp_word) AWS_MP_MASK)); - - /* get the carry */ - u = (aws_mp_digit)(r >> ((aws_mp_word) AWS_DIGIT_BIT)); - - /* left hand side of A[ix] * A[iy] */ - tmpx = a->dp[ix]; - - /* alias for where to store the results */ - tmpt = t.dp + (2*ix + 1); - - for (iy = ix + 1; iy < pa; iy++) { - /* first calculate the product */ - r = ((aws_mp_word)tmpx) * ((aws_mp_word)a->dp[iy]); - - /* now calculate the double precision result, note we use - * addition instead of *2 since it's easier to optimize - */ - r = ((aws_mp_word) *tmpt) + r + r + ((aws_mp_word) u); - - /* store lower part */ - *tmpt++ = (aws_mp_digit) (r & ((aws_mp_word) AWS_MP_MASK)); - - /* get carry */ - u = (aws_mp_digit)(r >> ((aws_mp_word) AWS_DIGIT_BIT)); - } - /* propagate upwards */ - while (u != ((aws_mp_digit) 0)) { - r = ((aws_mp_word) *tmpt) + ((aws_mp_word) u); - *tmpt++ = (aws_mp_digit) (r & ((aws_mp_word) AWS_MP_MASK)); - u = (aws_mp_digit)(r >> ((aws_mp_word) AWS_DIGIT_BIT)); - } - } - - aws_mp_clamp(&t); - aws_mp_exch(&t, b); - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_NEG_C - -/* b = -a */ -int aws_mp_neg(aws_mp_int *a, aws_mp_int *b) -{ - int res; - if (a != b) { - if ((res = aws_mp_copy(a, b)) != AWS_MP_OKAY) { - return res; - } - } - - if (aws_mp_iszero(b) != AWS_MP_YES) { - b->sign = (a->sign == AWS_MP_ZPOS) ? AWS_MP_NEG : AWS_MP_ZPOS; - } else { - b->sign = AWS_MP_ZPOS; - } - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_RADIX_SMAP_C - -/* chars used in radix conversions */ -const char *aws_mp_s_rmap = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz+/"; -#endif - -#ifdef AWS_BN_FAST_S_MP_MUL_DIGS_C - -/* Fast (comba) multiplier - * - * This is the fast column-array [comba] multiplier. It is - * designed to compute the columns of the product first - * then handle the carries afterwards. This has the effect - * of making the nested loops that compute the columns very - * simple and schedulable on super-scalar processors. - * - * This has been modified to produce a variable number of - * digits of output so if say only a half-product is required - * you don't have to compute the upper half (a feature - * required for fast Barrett reduction). - * - * Based on Algorithm 14.12 on pp.595 of HAC. - * - */ -int aws_fast_s_mp_mul_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs) -{ - int olduse, res, pa, ix, iz; - aws_mp_digit W[AWS_MP_WARRAY] = {}; - register aws_mp_word _W; - - /* grow the destination as required */ - if (c->alloc < digs) { - if ((res = aws_mp_grow(c, digs)) != AWS_MP_OKAY) { - return res; - } - } - - /* number of output digits to produce */ - pa = AWS_MIN(digs, a->used + b->used); - - /* clear the carry */ - _W = 0; - for (ix = 0; ix < pa; ix++) { - int tx, ty; - int iy; - aws_mp_digit *tmpx, *tmpy; - - /* get offsets into the two bignums */ - ty = AWS_MIN(b->used-1, ix); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = a->dp + tx; - tmpy = b->dp + ty; - - /* this is the number of times the loop will iterrate, essentially - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = AWS_MIN(a->used-tx, ty+1); - - /* execute loop */ - for (iz = 0; iz < iy; ++iz) { - _W += ((aws_mp_word)*tmpx++)*((aws_mp_word)*tmpy--); - - } - - /* store term */ - W[ix] = ((aws_mp_digit)_W) & AWS_MP_MASK; - - /* make next carry */ - _W = _W >> ((aws_mp_word)AWS_DIGIT_BIT); - } - - /* setup dest */ - olduse = c->used; - c->used = pa; - - { - register aws_mp_digit *tmpc; - tmpc = c->dp; - for (ix = 0; ix < pa+1; ix++) { - /* now extract the previous digit [below the carry] */ - *tmpc++ = W[ix]; - } - - /* clear unused digits [that existed in the old copy of c] */ - for (; ix < olduse; ix++) { - *tmpc++ = 0; - } - } - aws_mp_clamp(c); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C - -/* this is a modified version of fast_s_mul_digs that only produces - * output digits *above* digs. See the comments for fast_s_mul_digs - * to see how it works. - * - * This is used in the Barrett reduction since for one of the multiplications - * only the higher digits were needed. This essentially halves the work. - * - * Based on Algorithm 14.12 on pp.595 of HAC. - */ -int aws_fast_s_mp_mul_high_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs) -{ - int olduse, res, pa, ix, iz; - aws_mp_digit W[AWS_MP_WARRAY]; - aws_mp_word _W; - - /* grow the destination as required */ - pa = a->used + b->used; - if (c->alloc < pa) { - if ((res = aws_mp_grow(c, pa)) != AWS_MP_OKAY) { - return res; - } - } - - /* number of output digits to produce */ - pa = a->used + b->used; - _W = 0; - for (ix = digs; ix < pa; ix++) { - int tx, ty, iy; - aws_mp_digit *tmpx, *tmpy; - - /* get offsets into the two bignums */ - ty = AWS_MIN(b->used-1, ix); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = a->dp + tx; - tmpy = b->dp + ty; - - /* this is the number of times the loop will iterrate, essentially its - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = AWS_MIN(a->used-tx, ty+1); - - /* execute loop */ - for (iz = 0; iz < iy; iz++) { - _W += ((aws_mp_word)*tmpx++)*((aws_mp_word)*tmpy--); - } - - /* store term */ - W[ix] = ((aws_mp_digit)_W) & AWS_MP_MASK; - - /* make next carry */ - _W = _W >> ((aws_mp_word)AWS_DIGIT_BIT); - } - - /* setup dest */ - olduse = c->used; - c->used = pa; - - { - register aws_mp_digit *tmpc; - - tmpc = c->dp + digs; - for (ix = digs; ix < pa; ix++) { - /* now extract the previous digit [below the carry] */ - *tmpc++ = W[ix]; - } - - /* clear unused digits [that existed in the old copy of c] */ - for (; ix < olduse; ix++) { - *tmpc++ = 0; - } - } - aws_mp_clamp(c); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_REDUCE_2K_C - -/* reduces a modulo n where n is of the form 2**p - d */ -int aws_mp_reduce_2k(aws_mp_int *a, aws_mp_int *n, aws_mp_digit d) -{ - aws_mp_int q; - int p, res; - - if ((res = aws_mp_init(&q)) != AWS_MP_OKAY) { - return res; - } - - p = aws_mp_count_bits(n); -top: - /* q = a/2**p, a = a mod 2**p */ - if ((res = aws_mp_div_2d(a, p, &q, a)) != AWS_MP_OKAY) { - goto ERR; - } - - if (d != 1) { - /* q = q * d */ - if ((res = aws_mp_mul_d(&q, d, &q)) != AWS_MP_OKAY) { - goto ERR; - } - } - - /* a = a + q */ - if ((res = aws_s_mp_add(a, &q, a)) != AWS_MP_OKAY) { - goto ERR; - } - - if (aws_mp_cmp_mag(a, n) != AWS_MP_LT) { - aws_s_mp_sub(a, n, a); - goto top; - } - -ERR: -aws_mp_clear(&q); - return res; -} - -#endif - -#ifdef AWS_BN_MP_SET_C - -/* set to a digit */ -void aws_mp_set(aws_mp_int *a, aws_mp_digit b) -{ - aws_mp_zero(a); - a->dp[0] = b & AWS_MP_MASK; - a->used = (a->dp[0] != 0) ? 1 : 0; -} -#endif - -#ifdef AWS_BN_MP_MOD_D_C - -int -aws_mp_mod_d(aws_mp_int *a, aws_mp_digit b, aws_mp_digit *c) -{ - return aws_mp_div_d(a, b, NULL, c); -} -#endif - -#ifdef AWS_BN_MP_COPY_C - -/* copy, b = a */ -int -aws_mp_copy(aws_mp_int *a, aws_mp_int *b) -{ - int res, n; - - /* if dst == src do nothing */ - if (a == b) { - return AWS_MP_OKAY; - } - - /* grow dest */ - if (b->alloc < a->used) { - if ((res = aws_mp_grow(b, a->used)) != AWS_MP_OKAY) { - return res; - } - } - - /* zero b and copy the parameters over */ - { - register aws_mp_digit *tmpa, *tmpb; - - /* pointer aliases */ - - /* source */ - tmpa = a->dp; - - /* destination */ - tmpb = b->dp; - - /* copy all the digits */ - for (n = 0; n < a->used; n++) { - *tmpb++ = *tmpa++; - } - - /* clear high digits */ - for (; n < b->used; n++) { - *tmpb++ = 0; - } - } - - /* copy used count and sign */ - b->used = a->used; - b->sign = a->sign; - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_TO_SIGNED_BIN_N_C - -/* store in signed [big endian] format */ -int aws_mp_to_signed_bin_n(aws_mp_int *a, unsigned char *b, unsigned long *outlen) -{ - if (*outlen < (unsigned long) aws_mp_signed_bin_size(a)) { - return AWS_MP_VAL; - } - *outlen = aws_mp_signed_bin_size(a); - return aws_mp_to_signed_bin(a, b); -} -#endif - -#ifdef AWS_BN_FAST_S_MP_SQR_C - -/* the jist of squaring... - * you do like mult except the offset of the tmpx [one that - * starts closer to zero] can't equal the offset of tmpy. - * So basically you set up iy like before then you min it with - * (ty-tx) so that it never happens. You double all those - * you add in the inner loop - -After that loop you do the squares and add them in. -*/ - -int aws_fast_s_mp_sqr(aws_mp_int *a, aws_mp_int *b) -{ - int olduse, res, pa, ix, iz; - aws_mp_digit W[AWS_MP_WARRAY], *tmpx; - aws_mp_word W1; - - /* grow the destination as required */ - pa = a->used + a->used; - if (b->alloc < pa) { - if ((res = aws_mp_grow(b, pa)) != AWS_MP_OKAY) { - return res; - } - } - - /* number of output digits to produce */ - W1 = 0; - for (ix = 0; ix < pa; ix++) { - int tx, ty, iy; - aws_mp_word _W; - aws_mp_digit *tmpy; - - /* clear counter */ - _W = 0; - - /* get offsets into the two bignums */ - ty = AWS_MIN(a->used-1, ix); - tx = ix - ty; - - /* setup temp aliases */ - tmpx = a->dp + tx; - tmpy = a->dp + ty; - - /* this is the number of times the loop will iterrate, essentially - while (tx++ < a->used && ty-- >= 0) { ... } - */ - iy = AWS_MIN(a->used-tx, ty+1); - - /* now for squaring tx can never equal ty - * we halve the distance since they approach at a rate of 2x - * and we have to round because odd cases need to be executed - */ - iy = AWS_MIN(iy, (ty-tx+1)>>1); - - /* execute loop */ - for (iz = 0; iz < iy; iz++) { - _W += ((aws_mp_word)*tmpx++)*((aws_mp_word)*tmpy--); - } - - /* double the inner product and add carry */ - _W = _W + _W + W1; - - /* even columns have the square term in them */ - if ((ix&1) == 0) { - _W += ((aws_mp_word)a->dp[ix>>1])*((aws_mp_word)a->dp[ix>>1]); - } - - /* store it */ - W[ix] = (aws_mp_digit)(_W & AWS_MP_MASK); - - /* make next carry */ - W1 = _W >> ((aws_mp_word)AWS_DIGIT_BIT); - } - - /* setup dest */ - olduse = b->used; - b->used = a->used+a->used; - - { - aws_mp_digit *tmpb; - tmpb = b->dp; - for (ix = 0; ix < pa; ix++) { - *tmpb++ = W[ix] & AWS_MP_MASK; - } - - /* clear unused digits [that existed in the old copy of c] */ - for (; ix < olduse; ix++) { - *tmpb++ = 0; - } - } - aws_mp_clamp(b); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_SHRINK_C - -/* shrink a bignum */ -int aws_mp_shrink(aws_mp_int *a) -{ - aws_mp_digit *tmp; - int used = 1; - - if(a->used > 0) - used = a->used; - - if (a->alloc != used) { - if ((tmp = AWS_OPT_CAST(aws_mp_digit) AWS_XREALLOC (a->dp, sizeof (aws_mp_digit) * used)) == NULL) { - return AWS_MP_MEM; - } - a->dp = tmp; - a->alloc = used; - } - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_2EXPT_C - -/* computes a = 2**b - * - * Simple algorithm which zeroes the int, grows it then just sets one bit - * as required. - */ -int -aws_mp_2expt(aws_mp_int *a, int b) -{ - int res; - - /* zero a as per default */ - aws_mp_zero(a); - - /* grow a to accomodate the single bit */ - if ((res = aws_mp_grow(a, b / AWS_DIGIT_BIT + 1)) != AWS_MP_OKAY) { - return res; - } - - /* set the used count of where the bit will go */ - a->used = b / AWS_DIGIT_BIT + 1; - - /* put the single bit in its place */ - a->dp[b / AWS_DIGIT_BIT] = ((aws_mp_digit)1) << (b % AWS_DIGIT_BIT); - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_DR_REDUCE_C - -/* reduce "x" in place modulo "n" using the Diminished Radix algorithm. - * - * Based on algorithm from the paper - * - * "Generating Efficient Primes for Discrete Log Cryptosystems" - * Chae Hoon Lim, Pil Joong Lee, - * POSTECH Information Research Laboratories - * - * The modulus must be of a special format [see manual] - * - * Has been modified to use algorithm 7.10 from the LTM book instead - * - * Input x must be in the range 0 <= x <= (n-1)**2 - */ -int -aws_mp_dr_reduce(aws_mp_int *x, aws_mp_int *n, aws_mp_digit k) -{ - int err, i, m; - aws_mp_word r; - aws_mp_digit mu, *tmpx1, *tmpx2; - - /* m = digits in modulus */ - m = n->used; - - /* ensure that "x" has at least 2m digits */ - if (x->alloc < m + m) { - if ((err = aws_mp_grow(x, m + m)) != AWS_MP_OKAY) { - return err; - } - } - -/* top of loop, this is where the code resumes if - * another reduction pass is required. - */ -top: - /* aliases for digits */ - /* alias for lower half of x */ - tmpx1 = x->dp; - - /* alias for upper half of x, or x/B**m */ - tmpx2 = x->dp + m; - - /* set carry to zero */ - mu = 0; - - /* compute (x mod B**m) + k * [x/B**m] inline and inplace */ - for (i = 0; i < m; i++) { - r = ((aws_mp_word)*tmpx2++) * ((aws_mp_word)k) + *tmpx1 + mu; - *tmpx1++ = (aws_mp_digit)(r & AWS_MP_MASK); - mu = (aws_mp_digit)(r >> ((aws_mp_word)AWS_DIGIT_BIT)); - } - - /* set final carry */ - *tmpx1++ = mu; - - /* zero words above m */ - for (i = m + 1; i < x->used; i++) { - *tmpx1++ = 0; - } - - /* clamp, sub and return */ - aws_mp_clamp(x); - - /* if x >= n then subtract and reduce again - * Each successive "recursion" makes the input smaller and smaller. - */ - if (aws_mp_cmp_mag(x, n) != AWS_MP_LT) { - aws_s_mp_sub(x, n, x); - goto top; - } - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_TORADIX_N_C - -/* stores a bignum as a ASCII string in a given radix (2..64) - * - * Stores upto maxlen-1 chars and always a NULL byte - */ -int aws_mp_toradix_n(aws_mp_int *a, char *str, int radix, int maxlen) -{ - int res, digs; - aws_mp_int t; - aws_mp_digit d; - char *_s = str; - - /* check range of the maxlen, radix */ - if (maxlen < 2 || radix < 2 || radix > 64) { - return AWS_MP_VAL; - } - - /* quick out if its zero */ - if (aws_mp_iszero(a) == AWS_MP_YES) { - *str++ = '0'; - *str = '\0'; - return AWS_MP_OKAY; - } - - if ((res = aws_mp_init_copy(&t, a)) != AWS_MP_OKAY) { - return res; - } - - /* if it is negative output a - */ - if (t.sign == AWS_MP_NEG) { - /* we have to reverse our digits later... but not the - sign!! */ - ++_s; - - /* store the flag and mark the number as positive */ - *str++ = '-'; - t.sign = AWS_MP_ZPOS; - - /* subtract a char */ - --maxlen; - } - - digs = 0; - while (aws_mp_iszero (&t) == 0) { - if (--maxlen < 1) { - /* no more room */ - break; - } - if ((res = aws_mp_div_d(&t, (aws_mp_digit) radix, &t, &d)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - *str++ = aws_mp_s_rmap[d]; - ++digs; - } - - /* reverse the digits of the string. In this case _s points - * to the first digit [exluding the sign] of the number - */ - aws_bn_reverse((unsigned char *) _s, digs); - - /* append a NULL so the string is properly terminated */ - *str = '\0'; - - aws_mp_clear(&t); - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_PRIME_MILLER_RABIN_C - -/* Miller-Rabin test of "a" to the base of "b" as described in - * HAC pp. 139 Algorithm 4.24 - * - * Sets result to 0 if definitely composite or 1 if probably prime. - * Randomly the chance of error is no more than 1/4 and often - * very much lower. - */ -int aws_mp_prime_miller_rabin(aws_mp_int *a, aws_mp_int *b, int *result) -{ - aws_mp_int n1, y, r; - int s, j, err; - - /* default */ - *result = AWS_MP_NO; - - /* ensure b > 1 */ - if (aws_mp_cmp_d(b, 1) != AWS_MP_GT) { - return AWS_MP_VAL; - } - - /* get n1 = a - 1 */ - if ((err = aws_mp_init_copy(&n1, a)) != AWS_MP_OKAY) { - return err; - } - if ((err = aws_mp_sub_d(&n1, 1, &n1)) != AWS_MP_OKAY) { - goto LBL_N1; - } - - /* set 2**s * r = n1 */ - if ((err = aws_mp_init_copy(&r, &n1)) != AWS_MP_OKAY) { - goto LBL_N1; - } - - /* count the number of least significant bits - * which are zero - */ - s = aws_mp_cnt_lsb(&r); - - /* now divide n - 1 by 2**s */ - if ((err = aws_mp_div_2d(&r, s, &r, NULL)) != AWS_MP_OKAY) { - goto LBL_R; - } - - /* compute y = b**r mod a */ - if ((err = aws_mp_init(&y)) != AWS_MP_OKAY) { - goto LBL_R; - } - if ((err = aws_mp_exptmod(b, &r, a, &y)) != AWS_MP_OKAY) { - goto LBL_Y; - } - - /* if y != 1 and y != n1 do */ - if (aws_mp_cmp_d(&y, 1) != AWS_MP_EQ && aws_mp_cmp(&y, &n1) != AWS_MP_EQ) { - j = 1; - /* while j <= s-1 and y != n1 */ - while ((j <= (s - 1)) && aws_mp_cmp(&y, &n1) != AWS_MP_EQ) { - if ((err = aws_mp_sqrmod(&y, a, &y)) != AWS_MP_OKAY) { - goto LBL_Y; - } - - /* if y == 1 then composite */ - if (aws_mp_cmp_d(&y, 1) == AWS_MP_EQ) { - goto LBL_Y; - } - - ++j; - } - - /* if y != n1 then composite */ - if (aws_mp_cmp(&y, &n1) != AWS_MP_EQ) { - goto LBL_Y; - } - } - - /* probably prime now */ - *result = AWS_MP_YES; -LBL_Y: -aws_mp_clear(&y); -LBL_R: -aws_mp_clear(&r); -LBL_N1: -aws_mp_clear(&n1); - return err; -} -#endif - -#ifdef AWS_BN_MP_REDUCE_IS_2K_L_C - -/* determines if reduce_2k_l can be used */ -int aws_mp_reduce_is_2k_l(aws_mp_int *a) -{ - int ix, iy; - - if (a->used == 0) { - return AWS_MP_NO; - } else if (a->used == 1) { - return AWS_MP_YES; - } else if (a->used > 1) { - /* if more than half of the digits are -1 we're sold */ - for (iy = ix = 0; ix < a->used; ix++) { - if (a->dp[ix] == AWS_MP_MASK) { - ++iy; - } - } - return (iy >= (a->used/2)) ? AWS_MP_YES : AWS_MP_NO; - - } - return AWS_MP_NO; -} - -#endif - -#ifdef AWS_BN_MP_DR_SETUP_C - -/* determines the setup value */ -void aws_mp_dr_setup(aws_mp_int *a, aws_mp_digit *d) -{ - /* the casts are required if AWS_DIGIT_BIT is one less than - * the number of bits in a aws_mp_digit [e.g. AWS_DIGIT_BIT==31] - */ - *d = (aws_mp_digit)((((aws_mp_word)1) << ((aws_mp_word)AWS_DIGIT_BIT)) - - ((aws_mp_word)a->dp[0])); -} - -#endif - -#ifdef AWS_BN_MP_REDUCE_2K_SETUP_C - -/* determines the setup value */ -int aws_mp_reduce_2k_setup(aws_mp_int *a, aws_mp_digit *d) -{ - int res, p; - aws_mp_int tmp; - - if ((res = aws_mp_init(&tmp)) != AWS_MP_OKAY) { - return res; - } - - p = aws_mp_count_bits(a); - if ((res = aws_mp_2expt(&tmp, p)) != AWS_MP_OKAY) { - aws_mp_clear(&tmp); - return res; - } - - if ((res = aws_s_mp_sub(&tmp, a, &tmp)) != AWS_MP_OKAY) { - aws_mp_clear(&tmp); - return res; - } - - *d = tmp.dp[0]; - aws_mp_clear(&tmp); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_REDUCE_SETUP_C - -/* pre-calculate the value required for Barrett reduction - * For a given modulus "b" it calulates the value required in "a" - */ -int aws_mp_reduce_setup(aws_mp_int *a, aws_mp_int *b) -{ - int res; - - if ((res = aws_mp_2expt(a, b->used * 2 * AWS_DIGIT_BIT)) != AWS_MP_OKAY) { - return res; - } - return aws_mp_div(a, b, a, NULL); -} -#endif - -#ifdef AWS_BN_MP_GCD_C - -/* Greatest Common Divisor using the binary method */ -int aws_mp_gcd(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - aws_mp_int u, v; - int k, u_lsb, v_lsb, res; - - /* either zero than gcd is the largest */ - if (aws_mp_iszero (a) == AWS_MP_YES) { - return aws_mp_abs(b, c); - } - if (aws_mp_iszero (b) == AWS_MP_YES) { - return aws_mp_abs(a, c); - } - - /* get copies of a and b we can modify */ - if ((res = aws_mp_init_copy(&u, a)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_init_copy(&v, b)) != AWS_MP_OKAY) { - goto LBL_U; - } - - /* must be positive for the remainder of the algorithm */ - u.sign = v.sign = AWS_MP_ZPOS; - - /* B1. Find the common power of two for u and v */ - u_lsb = aws_mp_cnt_lsb(&u); - v_lsb = aws_mp_cnt_lsb(&v); - k = AWS_MIN(u_lsb, v_lsb); - - if (k > 0) { - /* divide the power of two out */ - if ((res = aws_mp_div_2d(&u, k, &u, NULL)) != AWS_MP_OKAY) { - goto LBL_V; - } - - if ((res = aws_mp_div_2d(&v, k, &v, NULL)) != AWS_MP_OKAY) { - goto LBL_V; - } - } - - /* divide any remaining factors of two out */ - if (u_lsb != k) { - if ((res = aws_mp_div_2d(&u, u_lsb - k, &u, NULL)) != AWS_MP_OKAY) { - goto LBL_V; - } - } - - if (v_lsb != k) { - if ((res = aws_mp_div_2d(&v, v_lsb - k, &v, NULL)) != AWS_MP_OKAY) { - goto LBL_V; - } - } - - while (aws_mp_iszero(&v) == 0) { - /* make sure v is the largest */ - if (aws_mp_cmp_mag(&u, &v) == AWS_MP_GT) { - /* swap u and v to make sure v is >= u */ - aws_mp_exch(&u, &v); - } - - /* subtract smallest from largest */ - if ((res = aws_s_mp_sub(&v, &u, &v)) != AWS_MP_OKAY) { - goto LBL_V; - } - - /* Divide out all factors of two */ - if ((res = aws_mp_div_2d(&v, aws_mp_cnt_lsb(&v), &v, NULL)) != AWS_MP_OKAY) { - goto LBL_V; - } - } - - /* multiply by 2**k which we divided out at the beginning */ - if ((res = aws_mp_mul_2d(&u, k, c)) != AWS_MP_OKAY) { - goto LBL_V; - } - c->sign = AWS_MP_ZPOS; - res = AWS_MP_OKAY; -LBL_V: -aws_mp_clear(&u); -LBL_U: -aws_mp_clear(&v); - return res; -} -#endif - -#ifdef AWS_BN_S_MP_SUB_C - -/* low level subtraction (assumes |a| > |b|), HAC pp.595 Algorithm 14.9 */ -int -aws_s_mp_sub(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - int olduse, res, min, max; - - /* find sizes */ - min = b->used; - max = a->used; - - /* init result */ - if (c->alloc < max) { - if ((res = aws_mp_grow(c, max)) != AWS_MP_OKAY) { - return res; - } - } - olduse = c->used; - c->used = max; - - { - register aws_mp_digit u, *tmpa, *tmpb, *tmpc; - register int i; - - /* alias for digit pointers */ - tmpa = a->dp; - tmpb = b->dp; - tmpc = c->dp; - - /* set carry to zero */ - u = 0; - for (i = 0; i < min; i++) { - /* T[i] = A[i] - B[i] - U */ - *tmpc = *tmpa++ - *tmpb++ - u; - - /* U = carry bit of T[i] - * Note this saves performing an AND operation since - * if a carry does occur it will propagate all the way to the - * MSB. As a result a single shift is enough to get the carry - */ - u = *tmpc >> ((aws_mp_digit)(CHAR_BIT * sizeof (aws_mp_digit) - 1)); - - /* Clear carry from T[i] */ - *tmpc++ &= AWS_MP_MASK; - } - - /* now copy higher words if any, e.g. if A has more digits than B */ - for (; i < max; i++) { - /* T[i] = A[i] - U */ - *tmpc = *tmpa++ - u; - - /* U = carry bit of T[i] */ - u = *tmpc >> ((aws_mp_digit)(CHAR_BIT * sizeof (aws_mp_digit) - 1)); - - /* Clear carry from T[i] */ - *tmpc++ &= AWS_MP_MASK; - } - - /* clear digits above used (since we may not have grown result above) */ - for (i = c->used; i < olduse; i++) { - *tmpc++ = 0; - } - } - - aws_mp_clamp(c); - return AWS_MP_OKAY; -} - -#endif - -#ifdef AWS_BN_MP_TOOM_MUL_C - -/* multiplication using the Toom-Cook 3-way algorithm - * - * Much more complicated than Karatsuba but has a lower - * asymptotic running time of O(N**1.464). This algorithm is - * only particularly useful on VERY large inputs - * (we're talking 1000s of digits here...). -*/ -int aws_mp_toom_mul(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - aws_mp_int w0, w1, w2, w3, w4, tmp1, tmp2, a0, a1, a2, b0, b1, b2; - int res, B; - - /* init temps */ - if ((res = aws_mp_init_multi(&w0, &w1, &w2, &w3, &w4, - &a0, &a1, &a2, &b0, &b1, - &b2, &tmp1, &tmp2, NULL)) != AWS_MP_OKAY) { - return res; - } - - /* B */ - B = AWS_MIN(a->used, b->used) / 3; - - /* a = a2 * B**2 + a1 * B + a0 */ - if ((res = aws_mp_mod_2d(a, AWS_DIGIT_BIT * B, &a0)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_copy(a, &a1)) != AWS_MP_OKAY) { - goto ERR; - } - aws_mp_rshd(&a1, B); - aws_mp_mod_2d(&a1, AWS_DIGIT_BIT * B, &a1); - - if ((res = aws_mp_copy(a, &a2)) != AWS_MP_OKAY) { - goto ERR; - } - aws_mp_rshd(&a2, B * 2); - - /* b = b2 * B**2 + b1 * B + b0 */ - if ((res = aws_mp_mod_2d(b, AWS_DIGIT_BIT * B, &b0)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_copy(b, &b1)) != AWS_MP_OKAY) { - goto ERR; - } - aws_mp_rshd(&b1, B); - aws_mp_mod_2d(&b1, AWS_DIGIT_BIT * B, &b1); - - if ((res = aws_mp_copy(b, &b2)) != AWS_MP_OKAY) { - goto ERR; - } - aws_mp_rshd(&b2, B * 2); - - /* w0 = a0*b0 */ - if ((res = aws_mp_mul(&a0, &b0, &w0)) != AWS_MP_OKAY) { - goto ERR; - } - - /* w4 = a2 * b2 */ - if ((res = aws_mp_mul(&a2, &b2, &w4)) != AWS_MP_OKAY) { - goto ERR; - } - - /* w1 = (a2 + 2(a1 + 2a0))(b2 + 2(b1 + 2b0)) */ - if ((res = aws_mp_mul_2(&a0, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_mul_2(&tmp1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a2, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_mul_2(&b0, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp2, &b1, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_mul_2(&tmp2, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp2, &b2, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_mul(&tmp1, &tmp2, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - - /* w3 = (a0 + 2(a1 + 2a2))(b0 + 2(b1 + 2b2)) */ - if ((res = aws_mp_mul_2(&a2, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_mul_2(&tmp1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a0, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_mul_2(&b2, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp2, &b1, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_mul_2(&tmp2, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp2, &b0, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_mul(&tmp1, &tmp2, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - - - /* w2 = (a2 + a1 + a0)(b2 + b1 + b0) */ - if ((res = aws_mp_add(&a2, &a1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, &a0, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&b2, &b1, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp2, &b0, &tmp2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_mul(&tmp1, &tmp2, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - - /* now solve the matrix - - 0 0 0 0 1 - 1 2 4 8 16 - 1 1 1 1 1 - 16 8 4 2 1 - 1 0 0 0 0 - - using 12 subtractions, 4 shifts, - 2 small divisions and 1 small multiplication - */ - - /* r1 - r4 */ - if ((res = aws_mp_sub(&w1, &w4, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - r0 */ - if ((res = aws_mp_sub(&w3, &w0, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1/2 */ - if ((res = aws_mp_div_2(&w1, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3/2 */ - if ((res = aws_mp_div_2(&w3, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r2 - r0 - r4 */ - if ((res = aws_mp_sub(&w2, &w0, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w2, &w4, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1 - r2 */ - if ((res = aws_mp_sub(&w1, &w2, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - r2 */ - if ((res = aws_mp_sub(&w3, &w2, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1 - 8r0 */ - if ((res = aws_mp_mul_2d(&w0, 3, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w1, &tmp1, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - 8r4 */ - if ((res = aws_mp_mul_2d(&w4, 3, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w3, &tmp1, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* 3r2 - r1 - r3 */ - if ((res = aws_mp_mul_d(&w2, 3, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w2, &w1, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sub(&w2, &w3, &w2)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1 - r2 */ - if ((res = aws_mp_sub(&w1, &w2, &w1)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3 - r2 */ - if ((res = aws_mp_sub(&w3, &w2, &w3)) != AWS_MP_OKAY) { - goto ERR; - } - /* r1/3 */ - if ((res = aws_mp_div_3(&w1, &w1, NULL)) != AWS_MP_OKAY) { - goto ERR; - } - /* r3/3 */ - if ((res = aws_mp_div_3(&w3, &w3, NULL)) != AWS_MP_OKAY) { - goto ERR; - } - - /* at this point shift W[n] by B*n */ - if ((res = aws_mp_lshd(&w1, 1 * B)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_lshd(&w2, 2 * B)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_lshd(&w3, 3 * B)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_lshd(&w4, 4 * B)) != AWS_MP_OKAY) { - goto ERR; - } - - if ((res = aws_mp_add(&w0, &w1, c)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&w2, &w3, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&w4, &tmp1, &tmp1)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_add(&tmp1, c, c)) != AWS_MP_OKAY) { - goto ERR; - } - -ERR: -aws_mp_clear_multi(&w0, &w1, &w2, &w3, &w4, - &a0, &a1, &a2, &b0, &b1, - &b2, &tmp1, &tmp2, NULL); - return res; -} - -#endif - -#ifdef AWS_BN_MP_INIT_SET_INT_C - -/* initialize and set a digit */ -int aws_mp_init_set_int(aws_mp_int *a, unsigned long b) -{ - int err; - if ((err = aws_mp_init(a)) != AWS_MP_OKAY) { - return err; - } - return aws_mp_set_int(a, b); -} -#endif - -#ifdef AWS_BN_FAST_MP_INVMOD_C - -/* computes the modular inverse via binary extended euclidean algorithm, - * that is c = 1/a mod b - * - * Based on slow invmod except this is optimized for the case where b is - * odd as per HAC Note 14.64 on pp. 610 - */ -int aws_fast_mp_invmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - aws_mp_int x, y, u, v, B, D; - int res, neg; - - /* 2. [modified] b must be odd */ - if (aws_mp_iseven (b) == 1) { - return AWS_MP_VAL; - } - - /* init all our temps */ - if ((res = aws_mp_init_multi(&x, &y, &u, &v, &B, &D, NULL)) != AWS_MP_OKAY) { - return res; - } - - /* x == modulus, y == value to invert */ - if ((res = aws_mp_copy(b, &x)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - /* we need y = |a| */ - if ((res = aws_mp_mod(a, b, &y)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - /* 3. u=x, v=y, A=1, B=0, C=0,D=1 */ - if ((res = aws_mp_copy(&x, &u)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - if ((res = aws_mp_copy(&y, &v)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - aws_mp_set(&D, 1); - -top: - /* 4. while u is even do */ - while (aws_mp_iseven (&u) == 1) { - /* 4.1 u = u/2 */ - if ((res = aws_mp_div_2(&u, &u)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - /* 4.2 if B is odd then */ - if (aws_mp_isodd (&B) == 1) { - if ((res = aws_mp_sub(&B, &x, &B)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - /* B = B/2 */ - if ((res = aws_mp_div_2(&B, &B)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* 5. while v is even do */ - while (aws_mp_iseven (&v) == 1) { - /* 5.1 v = v/2 */ - if ((res = aws_mp_div_2(&v, &v)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - /* 5.2 if D is odd then */ - if (aws_mp_isodd (&D) == 1) { - /* D = (D-x)/2 */ - if ((res = aws_mp_sub(&D, &x, &D)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - /* D = D/2 */ - if ((res = aws_mp_div_2(&D, &D)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* 6. if u >= v then */ - if (aws_mp_cmp(&u, &v) != AWS_MP_LT) { - /* u = u - v, B = B - D */ - if ((res = aws_mp_sub(&u, &v, &u)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - if ((res = aws_mp_sub(&B, &D, &B)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } else { - /* v - v - u, D = D - B */ - if ((res = aws_mp_sub(&v, &u, &v)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - - if ((res = aws_mp_sub(&D, &B, &D)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - - /* if not zero goto step 4 */ - if (aws_mp_iszero (&u) == 0) { - goto top; - } - - /* now a = C, b = D, gcd == g*v */ - - /* if v != 1 then there is no inverse */ - if (aws_mp_cmp_d(&v, 1) != AWS_MP_EQ) { - res = AWS_MP_VAL; - goto LBL_ERR; - } - - /* b is now the inverse */ - neg = a->sign; - while (D.sign == AWS_MP_NEG) { - if ((res = aws_mp_add(&D, b, &D)) != AWS_MP_OKAY) { - goto LBL_ERR; - } - } - aws_mp_exch(&D, c); - c->sign = neg; - res = AWS_MP_OKAY; - -LBL_ERR: -aws_mp_clear_multi(&x, &y, &u, &v, &B, &D, NULL); - return res; -} -#endif - -#ifdef AWS_BN_MP_TO_SIGNED_BIN_C - -/* store in signed [big endian] format */ -int aws_mp_to_signed_bin(aws_mp_int *a, unsigned char *b) -{ - int res; - - if ((res = aws_mp_to_unsigned_bin(a, b + 1)) != AWS_MP_OKAY) { - return res; - } - b[0] = (unsigned char) ((a->sign == AWS_MP_ZPOS) ? 0 : 1); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_MOD_C - -/* c = a mod b, 0 <= c < b */ -int -aws_mp_mod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c) -{ - aws_mp_int t; - int res; - - if ((res = aws_mp_init(&t)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_div(a, b, NULL, &t)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - - if (t.sign != b->sign) { - res = aws_mp_add(b, &t, c); - } else { - res = AWS_MP_OKAY; - aws_mp_exch(&t, c); - } - - aws_mp_clear(&t); - return res; -} -#endif - -#ifdef AWS_BN_MP_DR_IS_MODULUS_C - -/* determines if a number is a valid DR modulus */ -int aws_mp_dr_is_modulus(aws_mp_int *a) -{ - int ix; - - /* must be at least two digits */ - if (a->used < 2) { - return 0; - } - - /* must be of the form b**k - a [a <= b] so all - * but the first digit must be equal to -1 (mod b). - */ - for (ix = 1; ix < a->used; ix++) { - if (a->dp[ix] != AWS_MP_MASK) { - return 0; - } - } - return 1; -} - -#endif - -#ifdef AWS_BN_MP_IS_SQUARE_C - -/* Check if remainders are possible squares - fast exclude non-squares */ -static const char rem_128[128] = { - 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1 -}; - -static const char rem_105[105] = { - 0, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, - 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, - 0, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, - 1, 0, 1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, - 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, - 1, 1, 1, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 1, 1, - 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1 -}; - -/* Store non-zero to ret if arg is square, and zero if not */ -int aws_mp_is_square(aws_mp_int *arg, int *ret) -{ - int res; - aws_mp_digit c; - aws_mp_int t; - unsigned long r; - - /* Default to Non-square :) */ - *ret = AWS_MP_NO; - - if (arg->sign == AWS_MP_NEG) { - return AWS_MP_VAL; - } - - /* digits used? (TSD) */ - if (arg->used == 0) { - return AWS_MP_OKAY; - } - - /* First check mod 128 (suppose that AWS_DIGIT_BIT is at least 7) */ - if (rem_128[127 & AWS_JKTM_DIGIT(arg,0)] == 1) { - return AWS_MP_OKAY; - } - - /* Next check mod 105 (3*5*7) */ - if ((res = aws_mp_mod_d(arg, 105, &c)) != AWS_MP_OKAY) { - return res; - } - if (rem_105[c] == 1) { - return AWS_MP_OKAY; - } - - - if ((res = aws_mp_init_set_int(&t, 11L * 13L * 17L * 19L * 23L * 29L * 31L)) != AWS_MP_OKAY) { - return res; - } - if ((res = aws_mp_mod(arg, &t, &t)) != AWS_MP_OKAY) { - goto ERR; - } - r = aws_mp_get_int(&t); - /* Check for other prime modules, note it's not an ERROR but we must - * free "t" so the easiest way is to goto ERR. We know that res - * is already equal to AWS_MP_OKAY from the aws_mp_mod call - */ - if ( (1L<<(r%11)) & 0x5C4L ) goto ERR; - if ( (1L<<(r%13)) & 0x9E4L ) goto ERR; - if ( (1L<<(r%17)) & 0x5CE8L ) goto ERR; - if ( (1L<<(r%19)) & 0x4F50CL ) goto ERR; - if ( (1L<<(r%23)) & 0x7ACCA0L ) goto ERR; - if ( (1L<<(r%29)) & 0xC2EDD0CL ) goto ERR; - if ( (1L<<(r%31)) & 0x6DE2B848L ) goto ERR; - - /* Final check - is sqr(sqrt(arg)) == arg ? */ - if ((res = aws_mp_sqrt(arg, &t)) != AWS_MP_OKAY) { - goto ERR; - } - if ((res = aws_mp_sqr(&t, &t)) != AWS_MP_OKAY) { - goto ERR; - } - - *ret = (aws_mp_cmp_mag(&t, arg) == AWS_MP_EQ) ? AWS_MP_YES : AWS_MP_NO; -ERR: -aws_mp_clear(&t); - return res; -} -#endif - -#ifdef AWS_BN_MP_SUBMOD_C - -/* d = a - b (mod c) */ -int -aws_mp_submod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d) -{ - int res; - aws_mp_int t; - - - if ((res = aws_mp_init(&t)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_sub(a, b, &t)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - res = aws_mp_mod(&t, c, d); - aws_mp_clear(&t); - return res; -} -#endif - -#ifdef AWS_BN_MP_RAND_C - -/* makes a pseudo-random int of a given size */ -int -aws_mp_rand(aws_mp_int *a, int digits) -{ - int res; - aws_mp_digit d; - - aws_mp_zero(a); - if (digits <= 0) { - return AWS_MP_OKAY; - } - - /* first place a random non-zero digit */ - do { - d = ((aws_mp_digit) abs (rand ())) & AWS_MP_MASK; - } while (d == 0); - - if ((res = aws_mp_add_d(a, d, a)) != AWS_MP_OKAY) { - return res; - } - - while (--digits > 0) { - if ((res = aws_mp_lshd(a, 1)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_add_d(a, ((aws_mp_digit) abs(rand())), a)) != AWS_MP_OKAY) { - return res; - } - } - - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_READ_RADIX_C - -/* read a string [ASCII] in a given radix */ -int aws_mp_read_radix(aws_mp_int *a, const char *str, int radix) -{ - int y, res, neg; - char ch; - - /* zero the digit bignum */ - aws_mp_zero(a); - - /* make sure the radix is ok */ - if (radix < 2 || radix > 64) { - return AWS_MP_VAL; - } - - /* if the leading digit is a - * minus set the sign to negative. - */ - if (*str == '-') { - ++str; - neg = AWS_MP_NEG; - } else { - neg = AWS_MP_ZPOS; - } - - /* set the integer to the default of zero */ - aws_mp_zero(a); - - /* process each digit of the string */ - while (*str) { - /* if the radix < 36 the conversion is case insensitive - * this allows numbers like 1AB and 1ab to represent the same value - * [e.g. in hex] - */ - ch = (char) ((radix < 36) ? toupper (*str) : *str); - for (y = 0; y < 64; y++) { - if (ch == aws_mp_s_rmap[y]) { - break; - } - } - - /* if the char was found in the map - * and is less than the given radix add it - * to the number, otherwise exit the loop. - */ - if (y < radix) { - if ((res = aws_mp_mul_d(a, (aws_mp_digit) radix, a)) != AWS_MP_OKAY) { - return res; - } - if ((res = aws_mp_add_d(a, (aws_mp_digit) y, a)) != AWS_MP_OKAY) { - return res; - } - } else { - break; - } - ++str; - } - - /* set the sign only if a != 0 */ - if (aws_mp_iszero(a) != 1) { - a->sign = neg; - } - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_CLEAR_MULTI_C - -#include - -void aws_mp_clear_multi(aws_mp_int *mp, ...) -{ - aws_mp_int * next_mp = mp; - va_list args; - va_start(args, mp); - while (next_mp != NULL) { - aws_mp_clear(next_mp); - next_mp = va_arg(args, aws_mp_int*); - } - va_end(args); -} -#endif - -#ifdef AWS_BN_MP_ADDMOD_C - -/* d = a + b (mod c) */ -int -aws_mp_addmod(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, aws_mp_int *d) -{ - int res; - aws_mp_int t; - - if ((res = aws_mp_init(&t)) != AWS_MP_OKAY) { - return res; - } - - if ((res = aws_mp_add(a, b, &t)) != AWS_MP_OKAY) { - aws_mp_clear(&t); - return res; - } - res = aws_mp_mod(&t, c, d); - aws_mp_clear(&t); - return res; -} -#endif - -#ifdef AWS_BN_S_MP_MUL_HIGH_DIGS_C - -/* multiplies |a| * |b| and does not compute the lower digs digits - * [meant to get the higher part of the product] - */ -int -aws_s_mp_mul_high_digs(aws_mp_int *a, aws_mp_int *b, aws_mp_int *c, int digs) -{ - aws_mp_int t; - int res, pa, pb, ix, iy; - aws_mp_digit u; - aws_mp_word r; - aws_mp_digit tmpx, *tmpt, *tmpy; - - /* can we use the fast multiplier? */ -#ifdef AWS_BN_FAST_S_MP_MUL_HIGH_DIGS_C - if (((a->used + b->used + 1) < AWS_MP_WARRAY) - && AWS_MIN (a->used, b->used) < (1 << ((CHAR_BIT * sizeof (aws_mp_word)) - (2 * AWS_DIGIT_BIT)))) { - return aws_fast_s_mp_mul_high_digs(a, b, c, digs); - } -#endif - - if ((res = aws_mp_init_size(&t, a->used + b->used + 1)) != AWS_MP_OKAY) { - return res; - } - t.used = a->used + b->used + 1; - - pa = a->used; - pb = b->used; - for (ix = 0; ix < pa; ix++) { - /* clear the carry */ - u = 0; - - /* left hand side of A[ix] * B[iy] */ - tmpx = a->dp[ix]; - - /* alias to the address of where the digits will be stored */ - tmpt = &(t.dp[digs]); - - /* alias for where to read the right hand side from */ - tmpy = b->dp + (digs - ix); - - for (iy = digs - ix; iy < pb; iy++) { - /* calculate the double precision result */ - r = ((aws_mp_word)*tmpt) + - ((aws_mp_word)tmpx) * ((aws_mp_word)*tmpy++) + - ((aws_mp_word) u); - - /* get the lower part */ - *tmpt++ = (aws_mp_digit) (r & ((aws_mp_word) AWS_MP_MASK)); - - /* carry the carry */ - u = (aws_mp_digit) (r >> ((aws_mp_word) AWS_DIGIT_BIT)); - } - *tmpt = u; - } - aws_mp_clamp(&t); - aws_mp_exch(&t, c); - aws_mp_clear(&t); - return AWS_MP_OKAY; -} -#endif - -#ifdef AWS_BN_MP_UNSIGNED_BIN_SIZE_C - -/* get the size for an unsigned equivalent */ -int aws_mp_unsigned_bin_size(aws_mp_int *a) -{ - int size = aws_mp_count_bits(a); - return (size / 8 + ((size & 7) != 0 ? 1 : 0)); -} -#endif \ No newline at end of file diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/NSData+AWSCognitoIdentityProvider.h b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/NSData+AWSCognitoIdentityProvider.h deleted file mode 100644 index a9fa5e7..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/NSData+AWSCognitoIdentityProvider.h +++ /dev/null @@ -1,32 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import - -@class AWSJKBigInteger; - -NS_ASSUME_NONNULL_BEGIN - -@interface NSData (NSDataBigInteger) -+ (NSData*) aws_dataWithBigInteger:(AWSJKBigInteger *)bigInteger; -+ (NSData*) aws_dataWithSignedBigInteger:(AWSJKBigInteger *)bigInteger; -+ (NSData*) aws_dataFromHexString:(NSString*)hexString; -- (AWSJKBigInteger *)aws_toBigInt; -void awsbigint_loadBigInt(void); -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/NSData+AWSCognitoIdentityProvider.m b/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/NSData+AWSCognitoIdentityProvider.m deleted file mode 100644 index 208574d..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/AWSCognitoIdentityProvider/Internal/NSData+AWSCognitoIdentityProvider.m +++ /dev/null @@ -1,173 +0,0 @@ -// -// Copyright 2014-2016 Amazon.com, -// Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Amazon Software License (the "License"). -// You may not use this file except in compliance with the -// License. A copy of the License is located at -// -// http://aws.amazon.com/asl/ -// -// or in the "license" file accompanying this file. This file is -// distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR -// CONDITIONS OF ANY KIND, express or implied. See the License -// for the specific language governing permissions and -// limitations under the License. -// - -#import "NSData+AWSCognitoIdentityProvider.h" -#import "AWSJKBigInteger.h" - -void awsbigint_loadBigInt(){ -} - -AWSJKBigInteger *unsignedBigIntegerFromNSData(NSData* data) { - aws_mp_int bigInt; - aws_mp_init(&bigInt); - if (data.length > INT_MAX) { - return nil; - } - - int len = (int)data.length; - aws_mp_read_unsigned_bin(&bigInt, data.bytes, len); - - //bigInt is copied - AWSJKBigInteger *result = [[AWSJKBigInteger alloc] initWithValue:&bigInt]; - aws_mp_clear(&bigInt); - - return result; -} - -AWSJKBigInteger *signedBigIntegerFromNSData(NSData* data) { - - AWSJKBigInteger *twosComplementMinusOneMaybe = nil; - unsigned long bufferLength = data.length + 1; - uint8_t *bytes = malloc(sizeof(uint8_t) * bufferLength); - if (bytes == NULL) { - // this situation is irrecoverable and we don't want to return something corrupted, so we raise an exception (avoiding NSAssert that may be disabled) - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - - memcpy(bytes+1, data.bytes, data.length); - - bytes[0] = (bytes[1] & 0x80) == 0x80; - if (bytes[0]) { //two's complement; need to convert to unsigned - twosComplementMinusOneMaybe = [[AWSJKBigInteger alloc] initWithString:@"-1"]; - - for( int i = 1; i < bufferLength; i++) { - bytes[i] = ~bytes[i]; - } - } else { - twosComplementMinusOneMaybe = [[AWSJKBigInteger alloc] initWithString:@"0"]; - } - - aws_mp_int hashBigInt; - aws_mp_init(&hashBigInt); - aws_mp_read_signed_bin(&hashBigInt, bytes, (int)data.length); - - AWSJKBigInteger *result = [[AWSJKBigInteger alloc] initWithValue:&hashBigInt]; - result = [result add:twosComplementMinusOneMaybe]; - aws_mp_clear(&hashBigInt); - free(bytes); - return result; -} - -@implementation NSData (NSDataBigInteger) -+ (NSData*) aws_dataWithBigInteger:(AWSJKBigInteger *)bigInteger { - unsigned int byteCount = [bigInteger countBytes]; - if (byteCount == 0) { - return [NSData data]; - } - uint8_t *bytes = malloc(byteCount); - if (bytes == NULL) { - // this situation is irrecoverable and we don't want to return something corrupted, so we raise an exception (avoiding NSAssert that may be disabled) - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - - [bigInteger toByteArrayUnsigned:bytes]; - NSData *dataBigInt = [NSData dataWithBytes:bytes length:byteCount]; - free(bytes); - - return dataBigInt; -} - -+ (NSData*) aws_dataWithSignedBigInteger:(AWSJKBigInteger *)bigInteger { - - unsigned int byteCount = [bigInteger countBytes]; - - // +1 for sign byte - uint8_t *bytes = malloc(byteCount + 1); - if (bytes == NULL) { - // this situation is irrecoverable and we don't want to return something corrupted, so we raise an exception (avoiding NSAssert that may be disabled) - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - - [bigInteger toByteArraySigned:bytes]; - - NSData *dataBigInt = nil; - - if (byteCount > 1 && bytes[0] == 1) { - //two's complement - AWSJKBigInteger *modifier = [[AWSJKBigInteger alloc] initWithString:@"1"]; - for (unsigned int i = 1; i < byteCount + 1; i++) { - bytes[i] = ~bytes[i]; - } - - dataBigInt = [NSData dataWithBytes:bytes+1 length:byteCount]; - AWSJKBigInteger *temp = [dataBigInt aws_toBigInt]; - temp = [temp add:modifier]; - return [NSData aws_dataWithBigInteger:temp]; - - } else if (byteCount > 1 && ((bytes[1] & 0x80) == 0x80)) { - //if we have a positive number but the msb is set, make sure we allow the 0-sign byte to be serialized - dataBigInt = [NSData dataWithBytes:bytes length:byteCount + 1]; - } else { - //we don't need the extra 0 to make Java happy - dataBigInt = [NSData dataWithBytes:bytes+1 length:byteCount]; - } - free(bytes); - - return dataBigInt; -} - -- (AWSJKBigInteger *)aws_toBigInt { - return unsignedBigIntegerFromNSData(self); -} - -- (AWSJKBigInteger *)aws_toSignedBigInt { - return signedBigIntegerFromNSData(self); -} - -+ (NSData*) aws_dataFromHexString:(NSString*)hexString { - hexString = [[hexString lowercaseString] stringByReplacingOccurrencesOfString:@"0x" withString:@""]; - NSData *hexStrData = [hexString dataUsingEncoding:NSASCIIStringEncoding]; - NSUInteger len = [hexStrData length]; - if (len % 2 != 0) { - return nil; - } - - NSUInteger outputLen = len / 2; - if (outputLen == 0) { - return [NSData data]; - } - uint8_t *output = malloc(sizeof(uint8_t) * outputLen); - if (output == NULL) { - // this situation is irrecoverable and we don't want to return something corrupted, so we raise an exception (avoiding NSAssert that may be disabled) - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - - const char *hexBytes = (const char*)[hexStrData bytes]; - for (NSUInteger i = 0, j=0; i < len && j < outputLen; i += 2, j++) { - unsigned res; - sscanf(hexBytes+i, "%2x", &res); - output[j] = (uint8_t) (res & 0xff); - } - - return [NSData dataWithBytesNoCopy:output length:outputLen freeWhenDone:YES]; -} - -@end diff --git a/demo/Pods/AWSCognitoIdentityProvider/LICENSE b/demo/Pods/AWSCognitoIdentityProvider/LICENSE deleted file mode 100644 index da144d8..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/LICENSE +++ /dev/null @@ -1 +0,0 @@ -The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the Amazon Cognito Identity Provider and Amazon Cognito Sync subcomponents being licensed under the Amazon Software License and the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). diff --git a/demo/Pods/AWSCognitoIdentityProvider/LICENSE.AMAZON b/demo/Pods/AWSCognitoIdentityProvider/LICENSE.AMAZON deleted file mode 100644 index 0945c46..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/LICENSE.AMAZON +++ /dev/null @@ -1,27 +0,0 @@ -Amazon Software License -This Amazon Software License (“License”) governs your use, reproduction, and distribution of the accompanying software as specified below. -1. Definitions -“Licensor” means any person or entity that distributes its Work. - -“Software” means the original work of authorship made available under this License. - -“Work” means the Software and any additions to or derivative works of the Software that are made available under this License. - -The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work. - -Works, including the Software, are “made available” under this License by including in or with the Work either (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this License. -2. License Grants -2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form. -2.2 Patent Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free patent license to make, have made, use, sell, offer for sale, import, and otherwise transfer its Work, in whole or in part. The foregoing license applies only to the patent claims licensable by Licensor that would be infringed by Licensor’s Work (or portion thereof) individually and excluding any combinations with any other materials or technology. -3. Limitations -3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, (b) you include a complete copy of this License with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work. -3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this License (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself. -3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use with the web services, computing platforms or applications provided by Amazon.com, Inc. or its affiliates, including Amazon Web Services, Inc. -3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this License from such Licensor (including the grants in Sections 2.1 and 2.2) will terminate immediately. -3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, logos, or trademarks, except as necessary to reproduce the notices described in this License. -3.6 Termination. If you violate any term of this License, then your rights under this License (including the grants in Sections 2.1 and 2.2) will terminate immediately. -4. Disclaimer of Warranty. -THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF M ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE. SOME STATES’ CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU. -5. Limitation of Liability. -EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -Effective Date – April 18, 2008 © 2008 Amazon.com, Inc. or its affiliates. All rights reserved. \ No newline at end of file diff --git a/demo/Pods/AWSCognitoIdentityProvider/LICENSE.APACHE b/demo/Pods/AWSCognitoIdentityProvider/LICENSE.APACHE deleted file mode 100644 index 2c99318..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/LICENSE.APACHE +++ /dev/null @@ -1,51 +0,0 @@ -Apache License -Version 2.0, January 2004 - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and - 2. You must cause any modified files to carry prominent notices stating that You changed the files; and - 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/demo/Pods/AWSCognitoIdentityProvider/README.md b/demo/Pods/AWSCognitoIdentityProvider/README.md deleted file mode 100644 index a0164aa..0000000 --- a/demo/Pods/AWSCognitoIdentityProvider/README.md +++ /dev/null @@ -1,443 +0,0 @@ -# AWS SDK for iOS - -[![Release](https://img.shields.io/github/release/aws/aws-sdk-ios.svg)](../../releases) -[![CocoaPods](https://img.shields.io/cocoapods/v/AWSiOSSDKv2.svg)](https://cocoapods.org/pods/AWSiOSSDKv2) -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![CircleCI](https://circleci.com/gh/aws-amplify/aws-sdk-ios.svg?style=svg)](https://circleci.com/gh/aws-amplify/aws-sdk-ios) - -The AWS SDK for iOS provides a library and documentation for developers to build connected mobile applications using AWS. - -### Features / APIs - -- [__Authentication__](https://aws-amplify.github.io/docs/ios/authentication): APIs and building blocks for developers who want to create user authentication experiences. -- [__Analytics__](https://aws-amplify.github.io/docs/ios/analytics): Easily collect analytics data for your app. Analytics data includes user sessions and other custom events that you want to track in your app. -- [__API__](https://aws-amplify.github.io/docs/ios/api): Provides a simple solution when making HTTP requests. It provides an automatic, lightweight signing process which complies with AWS Signature Version 4. -- [__Storage__](https://aws-amplify.github.io/docs/ios/storage): Provides a simple mechanism for managing user content for your app in public, protected or private storage buckets. -- [__Push Notifications__](https://aws-amplify.github.io/docs/ios/push-notifications): Allows you to integrate push notifications in your app with Amazon Pinpoint targeting and campaign management support. -- [__PubSub__](https://aws-amplify.github.io/docs/ios/pubsub): Provides connectivity with cloud-based message-oriented middleware. -- [__Generated AWS Service Interfaces__](https://aws-amplify.github.io/docs/ios/manualsetup): Provides direct interaction with any AWS service. - -#### Visit our [Web Site](https://aws-amplify.github.io) to learn more about Amplify Framework. - -* [Documentation](https://aws-amplify.github.io/docs) -* [Setup](#setup) -* [Examples](https://github.com/awslabs/aws-sdk-ios-samples) - -## Setup - -To get started with the AWS SDK for iOS, check out the [Developer Guide for iOS](https://aws-amplify.github.io/docs/ios/start). You can set up the SDK and start building a new project, or you integrate the SDK in an existing project. You can also run the samples to get a sense of how the SDK works. - -To use the AWS SDK for iOS, you will need the following installed on your development machine: - -* Xcode 9.2 or later -* iOS 8 or later - -## Include the SDK for iOS in an Existing Application - -The [samples](https://github.com/awslabs/aws-sdk-ios-samples) included with the SDK for iOS are standalone projects that are already set up for you. You can also integrate the SDK for iOS with your own existing project. There are three ways to import the AWS Mobile SDK for iOS into your project: - -* [CocoaPods](https://cocoapods.org/) -* [Carthage](https://github.com/Carthage/Carthage) -* [Dynamic Frameworks](https://aws.amazon.com/mobile/sdk/) - -You should use one of these three ways to import the AWS Mobile SDK but not multiple. Importing the SDK in multiple ways loads duplicate copies of the SDK into the project and causes compiler errors. - -### CocoaPods - -1. The AWS Mobile SDK for iOS is available through [CocoaPods](http://cocoapods.org). If you have not installed CocoaPods, install CocoaPods by running the command: - - $ gem install cocoapods - $ pod setup - - Depending on your system settings, you may have to use `sudo` for installing `cocoapods` as follows: - - $ sudo gem install cocoapods - $ pod setup - -2. In your project directory (the directory where your `*.xcodeproj` file is), create a plain text file named `Podfile` (without any file extension) and add the lines below. Replace `YourTarget` with your actual target name. - - source 'https://github.com/CocoaPods/Specs.git' - - platform :ios, '8.0' - use_frameworks! - - target :'YourTarget' do - pod 'AWSAutoScaling' - pod 'AWSCloudWatch' - pod 'AWSCognito' - pod 'AWSCognitoIdentityProvider' - pod 'AWSDynamoDB' - pod 'AWSEC2' - pod 'AWSElasticLoadBalancing' - pod 'AWSIoT' - pod 'AWSKinesis' - pod 'AWSLambda' - pod 'AWSMachineLearning' - pod 'AWSMobileAnalytics' - pod 'AWSS3' - pod 'AWSSES' - pod 'AWSSimpleDB' - pod 'AWSSNS' - pod 'AWSSQS' - end - - ![image](readme-images/cocoapods-setup-01.png?raw=true) - -3. Then run the following command: - - $ pod install - -4. Open up `*.xcworkspace` with Xcode and start using the SDK. - - ![image](readme-images/cocoapods-setup-02.png?raw=true) - - **Note**: Do **NOT** use `*.xcodeproj`. If you open up a project file instead of a workspace, you receive an error: - - ld: library not found for -lPods-AWSCore - clang: error: linker command failed with exit code 1 (use -v to see invocation) - -### Carthage - -1. Install the latest version of [Carthage](https://github.com/Carthage/Carthage#installing-carthage). - -2. Add the following to your `Cartfile`: - - github "aws/aws-sdk-ios" - -3. Then run the following command: - - $ carthage update - -4. With your project open in Xcode, select your **Target**. Under **General** tab, find **Embedded Binaries** and then click the **+** button. - -5. Click the **Add Other...** button, navigate to the `AWS<#ServiceName#>.framework` files under `Carthage` > `Build` > `iOS` and select them. Do not check the **Destination: Copy items if needed** checkbox when prompted. - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -6. Under the **Build Phases** tab in your **Target**, click the **+** button on the top left and then select **New Run Script Phase**. Then setup the build phase as follows. Make sure this phase is below the `Embed Frameworks` phase. - - Shell /bin/sh - - bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh" - - Show environment variables in build log: Checked - Run script only when installing: Not checked - - Input Files: Empty - Output Files: Empty - -> Note: Currently, the AWS SDK for iOS builds the Carthage binaries using Xcode 10.1.0. To consume the pre-built binaries your Xcode version needs to be the same, else you have to build the frameworks on your machine by passing `--no-use-binaries` flag to `carthage update` command. - -### Frameworks - -1. Download the SDK from our [AWS Mobile SDK](http://aws.amazon.com/mobile/sdk) page. The SDK is stored in a compressed file archive named `aws-ios-sdk-#.#.#` (where `#.#.#` represents the version number, so for version 2.7.0, the filename is `aws-ios-sdk-2.7.0`). - -2. With your project open in Xcode, select your **Target**. Under **General** tab, find **Embedded Binaries** and then click the **+** button. - -3. Click the **Add Other...** button, navigate to the `AWS<#ServiceName#>.framework` files and select them. Check the **Destination: Copy items if needed** checkbox when prompted. - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -4. Under the **Buid Phases** tab in your **Target**, click the **+** button on the top left and then select **New Run Script Phase**. Then setup the build phase as follows. Make sure this phase is below the `Embed Frameworks` phase. - - Shell /bin/sh - - bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh" - - Show environment variables in build log: Checked - Run script only when installing: Not checked - - Input Files: Empty - Output Files: Empty - -## Update the SDK to a Newer Version - -When we release a new version of the SDK, you can pick up the changes as described below. - -### CocoaPods - -1. Run the following command in your project directory. CocoaPods automatically picks up the new changes. - - $ pod update - - **Note**: If your pod is having an issue, you can delete `Podfile.lock` and `Pods/` then run `pod install` to cleanly install the SDK. - - ![image](readme-images/cocoapods-setup-03.png?raw=true) - -### Carthage - -1. Run the following command in your project directory. Carthage automatically picks up the new changes. - - $ carthage update - -### Frameworks - -1. In Xcode select the following frameworks in **Project Navigator** and hit **delete** on your keyboard. Then select **Move to Trash**: - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -2. Follow the installation process above to include the new version of the SDK. - -## Getting Started with Swift - -1. Import the AWSCore header in the application delegate. - - ```swift - import AWSCore - ``` - -2. Create a default service configuration by adding the following code snippet in the `application:didFinishLaunchingWithOptions:` application delegate method. - - ```swift - let credentialsProvider = AWSCognitoCredentialsProvider( - regionType: CognitoRegionType, - identityPoolId: CognitoIdentityPoolId) - let configuration = AWSServiceConfiguration( - region: DefaultServiceRegionType, - credentialsProvider: credentialsProvider) - AWSServiceManager.default().defaultServiceConfiguration = configuration - ``` - -3. In Swift file you want to use the SDK, import the appropriate headers for the services you are using. The header file import convention is `import AWSServiceName`, as in the following examples: - - ```swift - import AWSS3 - import AWSDynamoDB - import AWSSQS - import AWSSNS - import AWSCognito - ``` - -4. Make a call to the AWS services. - - ```swift - let dynamoDB = AWSDynamoDB.default() - let listTableInput = AWSDynamoDBListTablesInput() - dynamoDB.listTables(listTableInput!).continueWith { (task:AWSTask) -> Any? in - if let error = task.error as? NSError { - print("Error occurred: \(error)") - return nil - } - - let listTablesOutput = task.result - - for tableName in listTablesOutput!.tableNames! { - print("\(tableName)") - } - - return nil - } - ``` - -**Note**: Most of the service client classes have a singleton method to get a default client. The naming convention is `+ defaultSERVICENAME` (e.g. `+ defaultDynamoDB` in the above code snippet). This singleton method creates a service client with `defaultServiceConfiguration`, which you set up in step 5, and maintains a strong reference to the client. - -## Getting Started with Objective-C - -1. Import the AWSCore header in the application delegate. - - ```objective-c - @import AWSCore; - ``` - -2. Create a default service configuration by adding the following code snippet in the `application:didFinishLaunchingWithOptions:` application delegate method. - - ```objective-c - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:CognitoRegionType - identityPoolId:CognitoIdentityPoolId]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:DefaultServiceRegionType - credentialsProvider:credentialsProvider]; - AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration; - ``` - -3. Import the appropriate headers for the services you are using. The header file import convention is `@import AWSServiceName;`, as in the following examples: - - ```objective-c - @import AWSS3; - @import AWSDynamoDB; - @import AWSSQS; - @import AWSSNS; - @import AWSCognito; - ``` - -4. Make a call to the AWS services. - - ```objective-c - AWSS3TransferManager *transferManager = [AWSS3TransferManager defaultS3TransferManager]; - AWSS3TransferManagerUploadRequest *uploadRequest = [AWSS3TransferManagerUploadRequest new]; - uploadRequest.bucket = yourBucket; - uploadRequest.key = yourKey; - uploadRequest.body = yourDataURL; - uploadRequest.contentLength = [NSNumber numberWithUnsignedLongLong:fileSize]; - - [[transferManager upload:uploadRequest] continueWithBlock:^id(AWSTask *task) { - // Do something with the response - return nil; - }]; - ``` - -**Note**: Most of the service client classes have a singleton method to get a default client. The naming convention is `+ defaultSERVICENAME` (e.g. `+ defaultS3TransferManager` in the above code snippet). This singleton method creates a service client with `defaultServiceConfiguration`, which you set up in step 5, and maintains a strong reference to the client. - -## AWSTask - -With native AWSTask support in the SDK for iOS, you can chain async requests instead of nesting them. It makes the logic cleaner, while keeping the code more readable. Read [Working with AWSTask](http://docs.aws.amazon.com/mobile/sdkforios/developerguide/awstask.html) to learn how to use AWSTask. - -## Logging - -As of version 2.5.4 of this SDK, logging utilizes [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack), a flexible, fast, open source logging framework. It supports many capabilities including the ability to set logging level per output target, for instance, concise messages logged to the console and verbose messages to a log file. - -CocoaLumberjack logging levels are additive such that when the level is set to verbose, all messages from the levels below verbose are logged. It is also possible to set custom logging to meet your needs. For more information, see [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/Documentation/CustomLogLevels.md) - -### Changing Log Levels - -**Swift** - -```swift -AWSDDLog.sharedInstance.logLevel = .verbose -``` - -The following logging level options are available: - -* `.off` -* `.error` -* `.warning` -* `.info` -* `.debug` -* `.verbose` - -**Objective-C** - -```objective-c -[AWSDDLog sharedInstance].logLevel = AWSDDLogLevelVerbose; -``` - -The following logging level options are available: - -* `AWSDDLogLevelOff` -* `AWSDDLogLevelError` -* `AWSDDLogLevelWarning` -* `AWSDDLogLevelInfo` -* `AWSDDLogLevelDebug` -* `AWSDDLogLevelVerbose` - -We recommend setting the log level to `Off` before publishing to the Apple App Store. - -### Targeting Log Output - -CocoaLumberjack can direct logs to file or used as a framework that integrates with the Xcode console. - -To initialize logging to files, use the following code: - -**Swift** - -```swift -let fileLogger: AWSDDFileLogger = AWSDDFileLogger() // File Logger -fileLogger.rollingFrequency = TimeInterval(60*60*24) // 24 hours -fileLogger.logFileManager.maximumNumberOfLogFiles = 7 -AWSDDLog.add(fileLogger) -``` - -**Objective-C** - -```objective-c -AWSDDFileLogger *fileLogger = [[AWSDDFileLogger alloc] init]; // File Logger -fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling -fileLogger.logFileManager.maximumNumberOfLogFiles = 7; -[AWSDDLog addLogger:fileLogger]; -``` - -To initialize logging to your Xcode console, use the following code: - -**Swift** - -```swift -AWSDDLog.add(AWSDDTTYLogger.sharedInstance()) // TTY = Xcode console -``` - -**Objective-C** - -```objective-c -[AWSDDLog addLogger:[AWSDDTTYLogger sharedInstance]]; // TTY = Xcode console -``` - -## Install the Reference Documentation in Xcode - -The AWS Mobile SDK for iOS zip file includes documentation in the DocSets format that you can view within Xcode. The easiest way to install the documentation is to use the Mac OS X terminal. - -1. Open the Mac OS X terminal and go to the directory containing the expanded archive. For example: - - $ cd ~/Downloads/aws-ios-sdk-2.7.0 - - **Note**: Remember to replace 2.7.0 in the example above with the actual version number of the AWS SDK for iOS that you downloaded. - -2. Create a directory called `~/Library/Developer/Shared/Documentation/DocSets`: - - $ mkdir -p ~/Library/Developer/Shared/Documentation/DocSets - -3. Copy (or move) `Documentation/com.amazon.aws.ios.docset` from the SDK installation files to the directory you created in the previous step: - - $ mv Documentation/com.amazon.aws.ios.docset ~/Library/Developer/Shared/Documentation/DocSets/ - -4. If Xcode was running during this procedure, restart Xcode. To browse the documentation, go to **Help**, click **Documentation and API Reference**, and select **AWS Mobile SDK for iOS v2.7.0 Documentation** (where '2.7.0' is the appropriate version number). - -## Talk to Us - -Visit our GitHub [Issues](https://github.com/aws-amplify/aws-sdk-ios/issues) to leave feedback and to connect with other users of the SDK. - -## Author - -Amazon Web Services - -## License - -See the **LICENSE** file for more info. diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF.h b/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF.h deleted file mode 100644 index 5dcacc9..0000000 --- a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF.h +++ /dev/null @@ -1,27 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -//! Project version number for AWSCognitoIdentityProviderASF. -FOUNDATION_EXPORT double AWSCognitoIdentityProviderASFVersionNumber; - -//! Project version string for AWSCognitoIdentityProviderASF. -FOUNDATION_EXPORT const unsigned char AWSCognitoIdentityProviderASFVersionString[]; - -@interface AWSCognitoIdentityProviderASF : NSObject - -+ (NSString * _Nullable) userContextData: (NSString* _Nonnull) userPoolId username: (NSString * _Nullable) username deviceId: (NSString * _Nullable ) deviceId userPoolClientId: (NSString * _Nonnull) userPoolClientId; -@end diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF.m b/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF.m deleted file mode 100644 index 2473dff..0000000 --- a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF.m +++ /dev/null @@ -1,31 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentityProviderASF.h" -#import "AWSCognitoIdentityASF.h" - -@implementation AWSCognitoIdentityProviderASF - -+ (NSString *)userContextData: (NSString*) userPoolId username: (NSString * _Nullable) username deviceId: ( NSString * _Nullable ) deviceId userPoolClientId: (NSString *) userPoolClientId { - NSString * build = @"release"; -#ifdef DEBUG - build = @"debug"; -#endif - - return [AWSCognitoIdentityASF userContextData: __IPHONE_OS_VERSION_MIN_REQUIRED - build:build userPoolId: userPoolId username:username deviceId:deviceId userPoolClientId:userPoolClientId]; -} - -@end diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/AWSCognitoIdentityASF.h b/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/AWSCognitoIdentityASF.h deleted file mode 100644 index 38fec4a..0000000 --- a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/AWSCognitoIdentityASF.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSCognitoIdentityASF : NSObject -+ (NSString *)userContextData: (int) minTarget build: (NSString *) build userPoolId: (NSString*) userPoolId username: (NSString *) username deviceId: ( NSString * _Nullable ) deviceId userPoolClientId: (NSString *) userPoolClientId; -@end -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/libAWSCognitoIdentityProviderASFBinary.a b/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/libAWSCognitoIdentityProviderASFBinary.a deleted file mode 100644 index b11021d..0000000 Binary files a/demo/Pods/AWSCognitoIdentityProviderASF/AWSCognitoIdentityProviderASF/Internal/libAWSCognitoIdentityProviderASFBinary.a and /dev/null differ diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE b/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE deleted file mode 100644 index da144d8..0000000 --- a/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE +++ /dev/null @@ -1 +0,0 @@ -The AWS Mobile SDK for iOS is generally licensed under the Apache 2.0 License, with the Amazon Cognito Identity Provider and Amazon Cognito Sync subcomponents being licensed under the Amazon Software License and the AWSLex/Bluefront folder under the AWS Customer Agreement (https://aws.amazon.com/agreement/ ). diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE.AMAZON b/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE.AMAZON deleted file mode 100644 index 0945c46..0000000 --- a/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE.AMAZON +++ /dev/null @@ -1,27 +0,0 @@ -Amazon Software License -This Amazon Software License (“License”) governs your use, reproduction, and distribution of the accompanying software as specified below. -1. Definitions -“Licensor” means any person or entity that distributes its Work. - -“Software” means the original work of authorship made available under this License. - -“Work” means the Software and any additions to or derivative works of the Software that are made available under this License. - -The terms “reproduce,” “reproduction,” “derivative works,” and “distribution” have the meaning as provided under U.S. copyright law; provided, however, that for the purposes of this License, derivative works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work. - -Works, including the Software, are “made available” under this License by including in or with the Work either (a) a copyright notice referencing the applicability of this License to the Work, or (b) a copy of this License. -2. License Grants -2.1 Copyright Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free, copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense and distribute its Work and any resulting derivative works in any form. -2.2 Patent Grant. Subject to the terms and conditions of this License, each Licensor grants to you a perpetual, worldwide, non-exclusive, royalty-free patent license to make, have made, use, sell, offer for sale, import, and otherwise transfer its Work, in whole or in part. The foregoing license applies only to the patent claims licensable by Licensor that would be infringed by Licensor’s Work (or portion thereof) individually and excluding any combinations with any other materials or technology. -3. Limitations -3.1 Redistribution. You may reproduce or distribute the Work only if (a) you do so under this License, (b) you include a complete copy of this License with your distribution, and (c) you retain without modification any copyright, patent, trademark, or attribution notices that are present in the Work. -3.2 Derivative Works. You may specify that additional or different terms apply to the use, reproduction, and distribution of your derivative works of the Work (“Your Terms”) only if (a) Your Terms provide that the use limitation in Section 3.3 applies to your derivative works, and (b) you identify the specific derivative works that are subject to Your Terms. Notwithstanding Your Terms, this License (including the redistribution requirements in Section 3.1) will continue to apply to the Work itself. -3.3 Use Limitation. The Work and any derivative works thereof only may be used or intended for use with the web services, computing platforms or applications provided by Amazon.com, Inc. or its affiliates, including Amazon Web Services, Inc. -3.4 Patent Claims. If you bring or threaten to bring a patent claim against any Licensor (including any claim, cross-claim or counterclaim in a lawsuit) to enforce any patents that you allege are infringed by any Work, then your rights under this License from such Licensor (including the grants in Sections 2.1 and 2.2) will terminate immediately. -3.5 Trademarks. This License does not grant any rights to use any Licensor’s or its affiliates’ names, logos, or trademarks, except as necessary to reproduce the notices described in this License. -3.6 Termination. If you violate any term of this License, then your rights under this License (including the grants in Sections 2.1 and 2.2) will terminate immediately. -4. Disclaimer of Warranty. -THE WORK IS PROVIDED “AS IS” WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WARRANTIES OR CONDITIONS OF M ERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE OR NON-INFRINGEMENT. YOU BEAR THE RISK OF UNDERTAKING ANY ACTIVITIES UNDER THIS LICENSE. SOME STATES’ CONSUMER LAWS DO NOT ALLOW EXCLUSION OF AN IMPLIED WARRANTY, SO THIS DISCLAIMER MAY NOT APPLY TO YOU. -5. Limitation of Liability. -EXCEPT AS PROHIBITED BY APPLICABLE LAW, IN NO EVENT AND UNDER NO LEGAL THEORY, WHETHER IN TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE SHALL ANY LICENSOR BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF OR RELATED TO THIS LICENSE, THE USE OR INABILITY TO USE THE WORK (INCLUDING BUT NOT LIMITED TO LOSS OF GOODWILL, BUSINESS INTERRUPTION, LOST PROFITS OR DATA, COMPUTER FAILURE OR MALFUNCTION, OR ANY OTHER COMM ERCIAL DAMAGES OR LOSSES), EVEN IF THE LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. -Effective Date – April 18, 2008 © 2008 Amazon.com, Inc. or its affiliates. All rights reserved. \ No newline at end of file diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE.APACHE b/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE.APACHE deleted file mode 100644 index 2c99318..0000000 --- a/demo/Pods/AWSCognitoIdentityProviderASF/LICENSE.APACHE +++ /dev/null @@ -1,51 +0,0 @@ -Apache License -Version 2.0, January 2004 - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - -"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and - 2. You must cause any modified files to carry prominent notices stating that You changed the files; and - 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and - 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/demo/Pods/AWSCognitoIdentityProviderASF/README.md b/demo/Pods/AWSCognitoIdentityProviderASF/README.md deleted file mode 100644 index 7eae995..0000000 --- a/demo/Pods/AWSCognitoIdentityProviderASF/README.md +++ /dev/null @@ -1,502 +0,0 @@ -# AWS Mobile SDK for iOS - -[![Release](https://img.shields.io/github/release/aws/aws-sdk-ios.svg)]() -[![CocoaPods](https://img.shields.io/cocoapods/v/AWSiOSSDKv2.svg)]() -[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) -[![Twitter Follow](https://img.shields.io/twitter/follow/AWSforMobile.svg?style=social&label=Follow)](https://twitter.com/AWSforMobile) - -## Setting Up - -To get started with the AWS SDK for iOS, you can set up the SDK and start building a new project, or you integrate the SDK in an existing project. You can also run the samples to get a sense of how the SDK works. - -To use the AWS SDK for iOS, you will need the following installed on your development machine: - -* Xcode 7 or later -* iOS 8 or later - -At the AWS GitHub repo, you can check out the [SDK source code](https://github.com/aws/aws-sdk-ios). - -For more information, see [AWS Mobile SDK for iOS Developer Guide](http://docs.aws.amazon.com/mobile/sdkforios/developerguide/). - -## Include the SDK for iOS in an Existing Application - -The [samples](https://github.com/awslabs/aws-sdk-ios-samples) included with the SDK for iOS are standalone projects that are already set up for you. You can also integrate the SDK for iOS with your own existing project. There are three ways to import the AWS Mobile SDK for iOS into your project: - -* [CocoaPods](https://cocoapods.org/) -* [Carthage](https://github.com/Carthage/Carthage) -* [Dynamic Frameworks](https://aws.amazon.com/mobile/sdk/) - -You should use one of these three ways to import the AWS Mobile SDK but not multiple. Importing the SDK in multiple ways loads duplicate copies of the SDK into the project and causes compiler errors. - -### CocoaPods - -1. The AWS Mobile SDK for iOS is available through [CocoaPods](http://cocoapods.org). If you have not installed CocoaPods, install CocoaPods by running the command: - - $ gem install cocoapods - $ pod setup - - Depending on your system settings, you may have to use `sudo` for installing `cocoapods` as follows: - - $ sudo gem install cocoapods - $ pod setup - -1. In your project directory (the directory where your `*.xcodeproj` file is), create a plain text file named `Podfile` (without any file extension) and add the lines below. Replace `YourTarget` with your actual target name. - - source 'https://github.com/CocoaPods/Specs.git' - - platform :ios, '8.0' - use_frameworks! - - target :'YourTarget' do - pod 'AWSAutoScaling' - pod 'AWSCloudWatch' - pod 'AWSCognito' - pod 'AWSCognitoIdentityProvider' - pod 'AWSDynamoDB' - pod 'AWSEC2' - pod 'AWSElasticLoadBalancing' - pod 'AWSIoT' - pod 'AWSKinesis' - pod 'AWSLambda' - pod 'AWSMachineLearning' - pod 'AWSMobileAnalytics' - pod 'AWSS3' - pod 'AWSSES' - pod 'AWSSimpleDB' - pod 'AWSSNS' - pod 'AWSSQS' - end - - ![image](readme-images/cocoapods-setup-01.png?raw=true) - -1. Then run the following command: - - $ pod install - -1. Open up `*.xcworkspace` with Xcode and start using the SDK. - - ![image](readme-images/cocoapods-setup-02.png?raw=true) - - **Note**: Do **NOT** use `*.xcodeproj`. If you open up a project file instead of a workspace, you receive an error: - - ld: library not found for -lPods-AWSCore - clang: error: linker command failed with exit code 1 (use -v to see invocation) - -### Carthage - -1. Install the latest version of [Carthage](https://github.com/Carthage/Carthage#installing-carthage). - -1. Add the following to your `Cartfile`: - - github "aws/aws-sdk-ios" - -1. Then run the following command: - - $ carthage update - -1. With your project open in Xcode, select your **Target**. Under **General** tab, find **Embedded Binaries** and then click the **+** button. - -1. Click the **Add Other...** button, navigate to the `AWS<#ServiceName#>.framework` files under `Carthage` > `Build` > `iOS` and select them. Do not check the **Destination: Copy items if needed** checkbox when prompted. - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -1. Under the **Build Phases** tab in your **Target**, click the **+** button on the top left and then select **New Run Script Phase**. Then setup the build phase as follows. Make sure this phase is below the `Embed Frameworks` phase. - - Shell /bin/sh - - bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh" - - Show environment variables in build log: Checked - Run script only when installing: Not checked - - Input Files: Empty - Output Files: Empty - -### Frameworks - -1. Download the SDK from our [AWS Mobile SDK](http://aws.amazon.com/mobile/sdk) page. The SDK is stored in a compressed file archive named `aws-ios-sdk-#.#.#` (where `#.#.#` represents the version number, so for version 2.5.0, the filename is `aws-ios-sdk-2.5.0`). - -1. With your project open in Xcode, select your **Target**. Under **General** tab, find **Embedded Binaries** and then click the **+** button. - -1. Click the **Add Other...** button, navigate to the `AWS<#ServiceName#>.framework` files and select them. Check the **Destination: Copy items if needed** checkbox when prompted. - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -1. Under the **Buid Phases** tab in your **Target**, click the **+** button on the top left and then select **New Run Script Phase**. Then setup the build phase as follows. Make sure this phase is below the `Embed Frameworks` phase. - - Shell /bin/sh - - bash "${BUILT_PRODUCTS_DIR}/${FRAMEWORKS_FOLDER_PATH}/AWSCore.framework/strip-frameworks.sh" - - Show environment variables in build log: Checked - Run script only when installing: Not checked - - Input Files: Empty - Output Files: Empty - -## Update the SDK to a Newer Version - -When we release a new version of the SDK, you can pick up the changes as described below. - -### CocoaPods - -1. Run the following command in your project directory. CocoaPods automatically picks up the new changes. - - $ pod update - - **Note**: If your pod is having an issue, you can delete `Podfile.lock` and `Pods/` then run `pod install` to cleanly install the SDK. - - ![image](readme-images/cocoapods-setup-03.png?raw=true) - -### Carthage - -1. Run the following command in your project directory. Carthage automatically picks up the new changes. - - $ carthage update - -### Frameworks - -1. In Xcode select the following frameworks in **Project Navigator** and hit **delete** on your keyboard. Then select **Move to Trash**: - - * `AWSCore.framework` - * `AWSAutoScaling.framework` - * `AWSCloudWatch.framework` - * `AWSCognito.framework` - * `AWSCognitoIdentityProvider.framework` - * `AWSDynamoDB.framework` - * `AWSEC2.framework` - * `AWSElasticLoadBalancing.framework` - * `AWSIoT.framework` - * `AWSKinesis.framework` - * `AWSLambda.framework` - * `AWSMachineLearning.framework` - * `AWSMobileAnalytics.framework` - * `AWSS3.framework` - * `AWSSES.framework` - * `AWSSimpleDB.framework` - * `AWSSNS.framework` - * `AWSSQS.framework` - -1. Follow the installation process above to include the new version of the SDK. - -## Preparing your apps for iOS 9 -The release of iOS 9 includes changes that might impact how your apps interact with some AWS services. If you compile your apps with Apple’s iOS 9 SDK (or Xcode 7), Apple’s [App Transport Security (ATS)](https://developer.apple.com/library/prerelease/ios/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html) feature may affect the ability of apps to connect to certain AWS service endpoints. In order to ensure affected apps continue to successfully connect to AWS endpoints, you’ll need to configure them to interact properly with Apple’s ATS by adding these properties to your `Info.plist` file: - - NSAppTransportSecurity - - NSExceptionDomains - - amazonaws.com - - NSThirdPartyExceptionMinimumTLSVersion - TLSv1.0 - NSThirdPartyExceptionRequiresForwardSecrecy - - NSIncludesSubdomains - - - amazonaws.com.cn - - NSThirdPartyExceptionMinimumTLSVersion - TLSv1.0 - NSThirdPartyExceptionRequiresForwardSecrecy - - NSIncludesSubdomains - - - - - -For more information, see [Preparing Your Apps for iOS 9](http://docs.aws.amazon.com/mobile/sdkforios/developerguide/ats.html). - -## Getting Started with Swift - -1. Import the AWSCore header in the application delegate. - - import AWSCore - -1. Create a default service configuration by adding the following code snippet in the `application:didFinishLaunchingWithOptions:` application delegate method. - - let credentialsProvider = AWSCognitoCredentialsProvider( - regionType: CognitoRegionType, - identityPoolId: CognitoIdentityPoolId) - let configuration = AWSServiceConfiguration( - region: DefaultServiceRegionType, - credentialsProvider: credentialsProvider) - AWSServiceManager.default().defaultServiceConfiguration = configuration - -1. In Swift file you want to use the SDK, import the appropriate headers for the services you are using. The header file import convention is `import AWSServiceName`, as in the following examples: - - import AWSS3 - import AWSDynamoDB - import AWSSQS - import AWSSNS - import AWSCognito - -1. Make a call to the AWS services. - - let dynamoDB = AWSDynamoDB.default() - let listTableInput = AWSDynamoDBListTablesInput() - dynamoDB.listTables(listTableInput!).continueWith { (task:AWSTask) -> Any? in - if let error = task.error as? NSError { - print("Error occurred: \(error)") - return nil - } - - let listTablesOutput = task.result - - for tableName in listTablesOutput!.tableNames! { - print("\(tableName)") - } - - return nil - } - - **Note**: Most of the service client classes have a singleton method to get a default client. The naming convention is `+ defaultSERVICENAME` (e.g. `+ defaultDynamoDB` in the above code snippet). This singleton method creates a service client with `defaultServiceConfiguration`, which you set up in step 5, and maintains a strong reference to the client. - -## Getting Started with Objective-C - -1. Import the AWSCore header in the application delegate. - - @import AWSCore; - -1. Create a default service configuration by adding the following code snippet in the `application:didFinishLaunchingWithOptions:` application delegate method. - - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:CognitoRegionType - identityPoolId:CognitoIdentityPoolId]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:DefaultServiceRegionType - credentialsProvider:credentialsProvider]; - AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration; - -1. Import the appropriate headers for the services you are using. The header file import convention is `@import AWSServiceName;`, as in the following examples: - - @import AWSS3; - @import AWSDynamoDB; - @import AWSSQS; - @import AWSSNS; - @import AWSCognito; - -1. Make a call to the AWS services. - - AWSS3TransferManager *transferManager = [AWSS3TransferManager defaultS3TransferManager]; - AWSS3TransferManagerUploadRequest *uploadRequest = [AWSS3TransferManagerUploadRequest new]; - uploadRequest.bucket = yourBucket; - uploadRequest.key = yourKey; - uploadRequest.body = yourDataURL; - uploadRequest.contentLength = [NSNumber numberWithUnsignedLongLong:fileSize]; - - [[transferManager upload:uploadRequest] continueWithBlock:^id(AWSTask *task) { - // Do something with the response - return nil; - }]; - - **Note**: Most of the service client classes have a singleton method to get a default client. The naming convention is `+ defaultSERVICENAME` (e.g. `+ defaultS3TransferManager` in the above code snippet). This singleton method creates a service client with `defaultServiceConfiguration`, which you set up in step 5, and maintains a strong reference to the client. - -## AWSTask - -With native AWSTask support in the SDK for iOS, you can chain async requests instead of nesting them. It makes the logic cleaner, while keeping the code more readable. Read [Working with AWSTask](http://docs.aws.amazon.com/mobile/sdkforios/developerguide/awstask.html) to learn how to use AWSTask. - -## Logging - -As of version 2.5.4 of this SDK, logging utilizes [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack), a flexible, fast, open source logging framework. It supports many capabilities including the ability to set logging level per output target, for instance, concise messages logged to the console and verbose messages to a log file. - -CocoaLumberjack logging levels are additive such that when the level is set to verbose, all messages from the levels below verbose are logged. It is also possible to set custom logging to meet your needs. For more information, see [CocoaLumberjack](https://github.com/CocoaLumberjack/CocoaLumberjack/blob/master/Documentation/CustomLogLevels.md) - -### Changing Log Levels - -**Swift** - - AWSDDLog.sharedInstance().logLevel = .verbose - -The following logging level options are available: - -* `.off` -* `.error` -* `.warning` -* `.info` -* `.debug` -* `.verbose` - -**Objective-C** - - [AWSDDLog sharedInstance].logLevel = AWSDDLogLevelVerbose; - -The following logging level options are available: - -* `AWSDDLogLevelOff` -* `AWSDDLogLevelError` -* `AWSDDLogLevelWarning` -* `AWSDDLogLevelInfo` -* `AWSDDLogLevelDebug` -* `AWSDDLogLevelVerbose` - -We recommend setting the log level to `Off` before publishing to the Apple App Store. - -### Targeting Log Output - -CocoaLumberjack can direct logs to file or used as a framework that integrates with the Xcode console. - -To initialize logging to files, use the following code: - -**Swift** - - let fileLogger: AWSDDFileLogger = AWSDDFileLogger() // File Logger - fileLogger.rollingFrequency = TimeInterval(60*60*24) // 24 hours - fileLogger.logFileManager.maximumNumberOfLogFiles = 7 - AWSDDLog.add(fileLogger) - -**Objective-C** - - AWSDDFileLogger *fileLogger = [[AWSDDFileLogger alloc] init]; // File Logger - fileLogger.rollingFrequency = 60 * 60 * 24; // 24 hour rolling - fileLogger.logFileManager.maximumNumberOfLogFiles = 7; - [AWSDDLog addLogger:fileLogger]; - -To initialize logging to your Xcode console, use the following code: - -**Swift** - - AWSDDLog.add(AWSDDTTYLogger.sharedInstance()) // TTY = Xcode console - -**Objective-C** - - [AWSDDLog addLogger:[AWSDDTTYLogger sharedInstance]]; // TTY = Xcode console - -## Sample Apps - -The AWS SDK for iOS includes sample apps that demonstrate common use cases. - -### Cognito Your User Pools Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/CognitoYourUserPools-Sample/Swift/), [Objective-C](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/CognitoYourUserPools-Sample/Objective-C/)) - -This sample demonstrates how sign up and sign in a user to display an authenticated portion of your app. - -### Cognito Sync Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/CognitoSync-Sample/Swift/), [Objective-C](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/CognitoSync-Sample/Objective-C/)) - -This sample demonstrates how to securely manage and sync your mobile app data and create unique identities via login providers including Facebook, Google, and Login with Amazon. - -#### AWS Services Demonstrated: - -* [Amazon Cognito Sync](http://aws.amazon.com/cognito/) -* [Amazon Cognito Identity](http://aws.amazon.com/cognito/) - -### DynamoDB Object Mapper Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/DynamoDBObjectMapper-Sample/Swift/), [Objective-C](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/DynamoDBObjectMapper-Sample/Objective-C/)) - -This sample demonstrates how to insert / update / delete / query items using DynamoDB Object Mapper. - -#### AWS Services Demonstrated: - -* [Amazon DynamoDB](http://aws.amazon.com/dynamodb/) -* [Amazon Cognito Identity](http://aws.amazon.com/cognito/) - -### S3 Transfer Manager Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/S3TransferManager-Sample/Swift/), [Objective-C](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/S3TransferManager-Sample/Objective-C/)) - -This sample demonstrates how to upload / download multiple files simultaneously using S3 Transfer Manager. It also shows how to pause, resume, and cancel file upload / download. - -#### AWS Services Demonstrated: - -* [Amazon S3](http://aws.amazon.com/s3/) -* [Amazon Cognito Identity](http://aws.amazon.com/cognito/) - -### S3 Transfer Utility Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/S3BackgroundTransfer-Sample/Swift/), [Objective-C](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/S3BackgroundTransfer-Sample/Objective-C/)) - -This sample demonstrates how to use the Amazon S3 PreSigned URL Builder to download / upload files in background. - -#### AWS Services Demonstrated: - -* [Amazon S3](http://aws.amazon.com/s3/) -* [Amazon Cognito Identity](http://aws.amazon.com/cognito/) - - -### SNS Mobile Push and Mobile Analytics Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/SNS-MobileAnalytics-Sample/Swift/), [Objective-C](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/SNS-MobileAnalytics-Sample/Objective-C/)) - -This sample demonstrates how to set up Amazon SNS Mobile Push and record events using Amazon Mobile Analytics. - -#### AWS Services Demonstrated: - -* [Amazon SNS Mobile Push](http://aws.amazon.com/sns/) -* [Amazon Mobile Analytics](http://aws.amazon.com/mobileanalytics/) -* [Amazon Cognito Identity](http://aws.amazon.com/cognito/) - -### IoT Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/IoT-Sample/Swift/)) - -This sample demonstrates how to publish and subscribe to data using AWS IoT. - -#### AWS Services Demonstrated: - -* [Amazon AWS IoT](http://aws.amazon.com/iot/) -* [Amazon Cognito Identity](http://aws.amazon.com/cognito/) - -### IoT Temperature Control Sample ([Swift](https://github.com/awslabs/aws-sdk-ios-samples/tree/master/IoTTemperatureControl-Sample/Swift/)) - -This sample demonstrates accessing device shadows using Cognito authentication; it works in conjunction with the Temperature Control Example Program in the [AWS IoT JavaScript SDK for Embedded Devices](https://github.com/aws/aws-iot-device-sdk-js). - -#### AWS Services Demonstrated: - -* [Amazon AWS IoT](http://aws.amazon.com/iot/) -* [Amazon Cognito Identity](http://aws.amazon.com/cognito/) - -## Install the Reference Documentation in Xcode - -The AWS Mobile SDK for iOS zip file includes documentation in the DocSets format that you can view within Xcode. The easiest way to install the documentation is to use the Mac OS X terminal. - -1. Open the Mac OS X terminal and go to the directory containing the expanded archive. For example: - - $ cd ~/Downloads/aws-ios-sdk-2.5.0 - - **Note**: Remember to replace 2.5.0 in the example above with the actual version number of the AWS SDK for iOS that you downloaded. - -1. Create a directory called `~/Library/Developer/Shared/Documentation/DocSets`: - - $ mkdir -p ~/Library/Developer/Shared/Documentation/DocSets - -1. Copy (or move) `Documentation/com.amazon.aws.ios.docset` from the SDK installation files to the directory you created in the previous step: - - $ mv Documentation/com.amazon.aws.ios.docset ~/Library/Developer/Shared/Documentation/DocSets/ - -1. If Xcode was running during this procedure, restart Xcode. To browse the documentation, go to **Help**, click **Documentation and API Reference**, and select **AWS Mobile SDK for iOS v2.5.0 Documentation** (where '2.5.0' is the appropriate version number). - -## Talk to Us - -Visit our GitHub [Issues](https://github.com/aws/aws-sdk-ios/issues) to leave feedback and to connect with other users of the SDK. - -## Author - -Amazon Web Services - -## License - -See the **LICENSE** file for more info. diff --git a/demo/Pods/AWSCore/AWSCore/AWSCore.h b/demo/Pods/AWSCore/AWSCore/AWSCore.h deleted file mode 100644 index fdae7e0..0000000 --- a/demo/Pods/AWSCore/AWSCore/AWSCore.h +++ /dev/null @@ -1,71 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -/*! - Project version number for the AWSCore framework. - - @warning This value is deprecated and will be removed in an upcoming minor - version of the SDK. It conflicts with the umbrella header generated by - CocoaPods, and is not implemented at all in cases where this SDK is imported - as a CocoaPod static library. As this numeric value does not support - patch-level versioning, you should use AWSiOSSDKVersion instead. - @deprecated Use AWSiOSSDKVersion instead. - */ -FOUNDATION_EXPORT double AWSCoreVersionNumber DEPRECATED_MSG_ATTRIBUTE("Use AWSiOSSDKVersion instead."); - -/*! - Project version string for the AWSCore framework. - - @warning This value is deprecated and will be removed in an upcoming minor - version of the SDK. It conflicts with the umbrella header generated by - CocoaPods, and is not implemented at all in cases where this SDK is imported - as a CocoaPod static library. - @deprecated Use AWSiOSSDKVersion instead. - */ -FOUNDATION_EXPORT const unsigned char AWSCoreVersionString[] DEPRECATED_MSG_ATTRIBUTE("Use AWSiOSSDKVersion instead."); - -#import "AWSCocoaLumberjack.h" - -#import "AWSServiceEnum.h" -#import "AWSService.h" -#import "AWSCredentialsProvider.h" -#import "AWSIdentityProvider.h" -#import "AWSModel.h" -#import "AWSNetworking.h" -#import "AWSCategory.h" -#import "AWSLogging.h" -#import "AWSClientContext.h" -#import "AWSSynchronizedMutableDictionary.h" -#import "AWSSerialization.h" -#import "AWSURLRequestSerialization.h" -#import "AWSURLResponseSerialization.h" -#import "AWSURLSessionManager.h" -#import "AWSSignature.h" -#import "AWSURLRequestRetryHandler.h" -#import "AWSValidation.h" -#import "AWSInfo.h" - -#import "AWSBolts.h" -#import "AWSGZIP.h" -#import "AWSFMDB.h" -#import "AWSKSReachability.h" -#import "AWSTMCache.h" -#import "AWSUICKeyChainStore.h" - - -#import "AWSSTS.h" -#import "AWSCognitoIdentity.h" diff --git a/demo/Pods/AWSCore/AWSCore/Authentication/AWSCredentialsProvider.h b/demo/Pods/AWSCore/AWSCore/Authentication/AWSCredentialsProvider.h deleted file mode 100644 index c42a21d..0000000 --- a/demo/Pods/AWSCore/AWSCore/Authentication/AWSCredentialsProvider.h +++ /dev/null @@ -1,263 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSServiceEnum.h" -#import "AWSIdentityProvider.h" - -NS_ASSUME_NONNULL_BEGIN - -FOUNDATION_EXPORT NSString *const AWSCognitoCredentialsProviderErrorDomain; -typedef NS_ENUM(NSInteger, AWSCognitoCredentialsProviderErrorType) { - AWSCognitoCredentialsProviderErrorUnknown, - AWSCognitoCredentialsProviderIdentityIdIsNil, - AWSCognitoCredentialsProviderInvalidConfiguration, - AWSCognitoCredentialsProviderInvalidCognitoIdentityToken, - AWSCognitoCredentialsProviderCredentialsRefreshTimeout, -}; - -@class AWSTask<__covariant ResultType>; - -/** - An AWS credentials container class. - */ -@interface AWSCredentials : NSObject - -/** - Access Key component of credentials. - */ -@property (nonatomic, strong, readonly) NSString *accessKey; - -/** - Secret Access Key component of credentials. - */ -@property (nonatomic, strong, readonly) NSString *secretKey; - -/** - Session Token component of credentials. - */ -@property (nonatomic, strong, readonly, nullable) NSString *sessionKey; - -/** - Date at which these credentials will expire. - */ -@property (nonatomic, strong, readonly, nullable) NSDate *expiration; - -/** - Initiates an AWS credentials object. - - @param accessKey An AWS Access key. - @param secretKey An AWS Secret key. - @param sessionKey An AWS Session key. - @param expiration The expiration date of the temporary AWS credentials. - - @return An AWS credentials object. - */ -- (instancetype)initWithAccessKey:(NSString *)accessKey - secretKey:(NSString *)secretKey - sessionKey:(nullable NSString *)sessionKey - expiration:(nullable NSDate *)expiration; - -@end - -/** - The AWS credentials provider protocol used to provide credentials to the SDK in order to make calls to the AWS services. - */ -@protocol AWSCredentialsProvider - -/** - Asynchronously returns a valid AWS credentials or an error object if it cannot retrieve valid credentials. It should cache valid credentials as much as possible and refresh them when they are invalid. - - @return A valid AWS credentials or an error object describing the error. - */ -- (AWSTask *)credentials; - -/** - Invalidates the cached temporary AWS credentials. If the credentials provider does not cache temporary credentials, this operation is a no-op. - */ -- (void)invalidateCachedTemporaryCredentials; - -@end - -/** - @warning This credentials provider is intended only for testing purposes. - We strongly discourage embedding AWS credentials in your production apps because they can be easily extracted and abused. Consider using `AWSCognitoCredentialsProvider`. - */ -@interface AWSStaticCredentialsProvider : NSObject - -/** - Instantiates a static credentials provider. - - @param accessKey An AWS Access key. - @param secretKey An AWS Secret key. - - @return An AWS credentials object. - */ -- (instancetype)initWithAccessKey:(NSString *)accessKey - secretKey:(NSString *)secretKey; - -@end - -/** - @warning This credentials provider is intended only for testing purposes. - We strongly discourage embedding AWS credentials in your production apps because they can be easily extracted and abused. Consider using `AWSCognitoCredentialsProvider`. - Simple session credentials with keys and session token. - */ -@interface AWSBasicSessionCredentialsProvider: NSObject - -/** - Instantiates a static credentials provider. - - @param accessKey An AWS Access key. - @param secretKey An AWS Secret key. - @param sessionToken The session token for this session. - @return An AWS credentials object. - */ -- (instancetype)initWithAccessKey:(NSString *)accessKey - secretKey:(NSString *)secretKey - sessionToken:(NSString *)sessionToken; - -@end - -@interface AWSAnonymousCredentialsProvider : NSObject - -@end - -/** - A credentials provider that uses AWS STS web identity federation. - */ -@interface AWSWebIdentityCredentialsProvider : NSObject - -@property (nonatomic, strong) NSString *webIdentityToken; -@property (nonatomic, strong) NSString *roleArn; -@property (nonatomic, strong) NSString *roleSessionName; -@property (nonatomic, strong) NSString *providerId; - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - providerId:(nullable NSString *)providerId - roleArn:(NSString *)roleArn - roleSessionName:(NSString *)roleSessionName - webIdentityToken:(NSString *)webIdentityToken; - -@end - -/** - An AWSCredentialsProvider that uses Amazon Cognito to fetch temporary credentials tied to an identity. - - To learn more about Amazon Cognito, please visit https://aws.amazon.com/cognito. - - There are 3 different flows supported by this credentials provider, see factory and init methods for choosing the right one for your use case: - - 1. Enhanced flow: Uses Cognito for all operations and only requires an identity pool id to initialize. - 2. Basic flow: Uses Cognito + STS and requires identity pool plus IAM roles - 3. Developer authenticated identities: Uses your own AWSCognitoCredentialsProviderHelper to establish identity + - Cognito (and optionally STS) to establish credentials. - */ -@interface AWSCognitoCredentialsProvider : NSObject - -/** - The identityProvider which is responsible for establishing the identity id and (optionally) the open id token for use in the Amazon Cognito authflow. - */ -@property (nonatomic, strong, readonly) id identityProvider; - -/** - The identity id associated with this provider. This value will be fetched from the keychain at startup. If you do not want to reuse the existing identity id, you must call the clearKeychain method. - */ -@property (nonatomic, strong, readonly, nullable) NSString *identityId; - -/** - The identity pool id associated with this provider. Also used to create a namedspaced keychain area to store identity id and credentials. - */ -@property (nonatomic, strong, readonly) NSString *identityPoolId; - -/** - Initializer for credentials provider with enhanced authentication flow. This is the recommended constructor for first time Amazon Cognito developers. Will create an instance of `AWSEnhancedCognitoIdentityProvider`. - - @param regionType The region in which your identity pool exists. - @param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain. - */ -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId; - -/** - Initializer for credentials provider with enhanced authentication flow. This is the recommended method for first time Amazon Cognito developers. Will create an instance of `AWSEnhancedCognitoIdentityProvider`. - - @param regionType The region in which your identity pool exists. - @param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain. - @param identityProviderManager An object that conforms to the `AWSIdentityProviderManager` protocol. It should return a valid `login` dictionary when requested. Can be nil if identity is unauthenticated. - */ -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId - identityProviderManager:(nullable id)identityProviderManager; - -/** - Initializer for credentials provider with pre-created `AWSCognitoCredentialsProviderHelper`. Use this method when using developer authenticated identities. - - @param regionType The region in which your identity pool exists. - @param identityProvider Implementation of AWSCognitoCredentialsProviderHelper which is responsible for acquiring identity id and (optionally) OpenId Connect token. - */ -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityProvider:(id)identityProvider; - -/** - Initializer for credentials provider with pre-created `AWSCognitoCredentialsProviderHelper`. Only use this method if you need to set your IAM roles client side and use developer authenticated identities - - @param regionType The region in which your identity pool exists. - @param unauthRoleArn The role ARN to use when getting credentials for unauthenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if unauthenticated identities are not supported or if using enhanced authentication flow. - @param authRoleArn The role ARN to use when getting credentials for authenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if authenticated identities are not supported or if using enhanced authentication flow. - @param identityProvider Implementation of AWSCognitoCredentialsProviderHelper which is responsible for acquiring identity id and (optionally) OpenId Connect token. - */ -- (instancetype)initWithRegionType:(AWSRegionType)regionType - unauthRoleArn:(nullable NSString *)unauthRoleArn - authRoleArn:(nullable NSString *)authRoleArn - identityProvider:(id)identityProvider; - -/** - Initializer for credentials provider with basic auth flow. Only use this method if you still need to set your IAM roles client side. This method will create an instance of `AWSBasicCognitoIdentityProvider`. - - @param regionType The region in which your identity pool exists. - @param identityPoolId The identity pool id for this provider. Value is used to communicate with Amazon Cognito as well as namespace values stored in the keychain. - @param unauthRoleArn The role ARN to use when getting credentials for unauthenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if unauthenticated identities are not supported. - @param authRoleArn The role ARN to use when getting credentials for authenticated identities. Provider will check the `isAuthenticated` property of the identity provider to determine which role to use. Can be nil if authenticated identities are not supported. - @param identityProviderManager An object that conforms to the `AWSIdentityProviderManager` protocol. It should return a valid `login` dictionary when requested. Can be nil if identity is unauthenticated. - */ -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId - unauthRoleArn:(nullable NSString *)unauthRoleArn - authRoleArn:(nullable NSString *)authRoleArn - identityProviderManager:(nullable id)identityProviderManager; - -/** - Get/retrieve the identity id for this provider. If an identity id is already set on this provider, no remote call is made and the identity will be returned as a result of the AWSTask (the identityId is also available as a property). If no identityId is set on this provider, one will be retrieved from the service. - - @return AWSTask - */ -- (AWSTask *)getIdentityId; - -/** - Clear ALL saved values for this provider (identityId, credentials, logins). - */ -- (void)clearKeychain; - -/** - Clear the cached AWS credentials for this provider. - */ -- (void)clearCredentials; - -- (void)setIdentityProviderManagerOnce:(id)identityProviderManager; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Authentication/AWSCredentialsProvider.m b/demo/Pods/AWSCore/AWSCore/Authentication/AWSCredentialsProvider.m deleted file mode 100644 index 032c66a..0000000 --- a/demo/Pods/AWSCore/AWSCore/Authentication/AWSCredentialsProvider.m +++ /dev/null @@ -1,734 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCredentialsProvider.h" -#import "AWSCognitoIdentity.h" -#import "AWSSTS.h" -#import "AWSUICKeyChainStore.h" -#import "AWSCocoaLumberjack.h" -#import "AWSBolts.h" - -NSString *const AWSCognitoCredentialsProviderErrorDomain = @"com.amazonaws.AWSCognitoCredentialsProviderErrorDomain"; - -static NSString *const AWSCredentialsProviderKeychainAccessKeyId = @"accessKey"; -static NSString *const AWSCredentialsProviderKeychainSecretAccessKey = @"secretKey"; -static NSString *const AWSCredentialsProviderKeychainSessionToken = @"sessionKey"; -static NSString *const AWSCredentialsProviderKeychainExpiration = @"expiration"; -static NSString *const AWSCredentialsProviderKeychainIdentityId = @"identityId"; - -@interface AWSCognitoIdentity() - -- (instancetype)initWithConfiguration:(AWSServiceConfiguration *)configuration; - -@end - -@interface AWSSTS() - -- (instancetype)initWithConfiguration:(AWSServiceConfiguration *)configuration; - -@end - -@interface AWSAbstractCognitoCredentialsProviderHelper() - -@property (nonatomic, strong) id identityProviderManager; - -@end - -@implementation AWSCredentials - -- (instancetype)initWithAccessKey:(NSString *)accessKey - secretKey:(NSString *)secretKey - sessionKey:(NSString *)sessionKey - expiration:(NSDate *)expiration { - if (self = [super init]) { - _accessKey = accessKey; - _secretKey = secretKey; - _sessionKey = sessionKey; - _expiration = expiration; - } - - return self; -} - -- (NSString *)description { - return [NSString stringWithFormat:@"{\nAWSCredentials\nAccessKey: %@\nSecretKey: %@\nSessionKey: %@\nExpiration: %@\n}", - self.accessKey, - self.secretKey, - self.sessionKey, - self.expiration]; -} - -@end - -@interface AWSStaticCredentialsProvider() - -@property (nonatomic, strong) AWSCredentials *internalCredentials; - -@end - -@implementation AWSStaticCredentialsProvider - -- (instancetype)initWithAccessKey:(NSString *)accessKey - secretKey:(NSString *)secretKey { - if (self = [super init]) { - _internalCredentials = [[AWSCredentials alloc] initWithAccessKey:accessKey - secretKey:secretKey - sessionKey:nil - expiration:nil]; - } - return self; -} - -- (AWSTask *)credentials { - return [AWSTask taskWithResult:self.internalCredentials]; -} - -- (void)invalidateCachedTemporaryCredentials { - // No-op -} - -@end - -@interface AWSBasicSessionCredentialsProvider() - -@property (nonatomic, strong) AWSCredentials *internalCredentials; - -@end - -@implementation AWSBasicSessionCredentialsProvider - -- (instancetype)initWithAccessKey:(NSString *)accessKey - secretKey:(NSString *)secretKey - sessionToken:(NSString *)sessionToken { - if (self = [super init]) { - _internalCredentials = [[AWSCredentials alloc] initWithAccessKey:accessKey - secretKey:secretKey - sessionKey:sessionToken - expiration:nil]; - } - return self; -} - -- (AWSTask *)credentials { - return [AWSTask taskWithResult:self.internalCredentials]; -} - -- (void)invalidateCachedTemporaryCredentials { - // No-op -} - -@end - -@implementation AWSAnonymousCredentialsProvider - -- (AWSTask *)credentials { - return [AWSTask taskWithResult:nil]; -} - -- (void)invalidateCachedTemporaryCredentials { - // No-op -} - -@end - -@interface AWSWebIdentityCredentialsProvider() - -@property (nonatomic, strong) AWSSTS *sts; -@property (nonatomic, strong) AWSUICKeyChainStore *keychain; -@property (nonatomic, strong) AWSCredentials *internalCredentials; - -@end - -@implementation AWSWebIdentityCredentialsProvider - -@synthesize internalCredentials = _internalCredentials; - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - providerId:(NSString *)providerId - roleArn:(NSString *)roleArn - roleSessionName:(NSString *)roleSessionName - webIdentityToken:(NSString *)webIdentityToken { - if (self = [super init]) { - _keychain = [AWSUICKeyChainStore keyChainStoreWithService:[NSString stringWithFormat:@"%@.%@.%@", providerId, webIdentityToken, roleArn]]; - _providerId = providerId; - _roleArn = roleArn; - _roleSessionName = roleSessionName; - _webIdentityToken = webIdentityToken; - - AWSAnonymousCredentialsProvider *credentialsProvider = [AWSAnonymousCredentialsProvider new]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:regionType - credentialsProvider:credentialsProvider]; - _sts = [[AWSSTS alloc] initWithConfiguration:configuration]; - } - - return self; -} - -#pragma mark - AWSCredentialsProvider methods - -- (AWSTask *)credentials { - // Preemptively refresh credentials if any of the following is true: - // 1. accessKey or secretKey is nil. - // 2. the credentials expires within 10 minutes. - if (self.internalCredentials.accessKey - && self.internalCredentials.secretKey - && [self.internalCredentials.expiration compare:[NSDate dateWithTimeIntervalSinceNow:10 * 60]] == NSOrderedDescending) { - - return [AWSTask taskWithResult:self.internalCredentials]; - } - - // request new credentials - AWSSTSAssumeRoleWithWebIdentityRequest *webIdentityRequest = [AWSSTSAssumeRoleWithWebIdentityRequest new]; - webIdentityRequest.providerId = self.providerId; - webIdentityRequest.roleArn = self.roleArn; - webIdentityRequest.roleSessionName = self.roleSessionName; - webIdentityRequest.webIdentityToken = self.webIdentityToken; - - return [[self.sts assumeRoleWithWebIdentity:webIdentityRequest] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - if (task.result) { - AWSSTSAssumeRoleWithWebIdentityResponse *wifResponse = task.result; - self.internalCredentials = [[AWSCredentials alloc] initWithAccessKey:wifResponse.credentials.accessKeyId - secretKey:wifResponse.credentials.secretAccessKey - sessionKey:wifResponse.credentials.sessionToken - expiration:wifResponse.credentials.expiration]; - - return [AWSTask taskWithResult:self.internalCredentials]; - } else { - // reset the values for the credentials - [self invalidateCachedTemporaryCredentials]; - } - - return task; - }]; -} - -- (void)invalidateCachedTemporaryCredentials { - self.internalCredentials = nil; -} - -#pragma mark - - -- (AWSCredentials *)internalCredentials { - if (_internalCredentials) { - return _internalCredentials; - } - - if (self.keychain[AWSCredentialsProviderKeychainAccessKeyId] - && self.keychain[AWSCredentialsProviderKeychainSecretAccessKey]) { - NSString *expirationString = self.keychain[AWSCredentialsProviderKeychainExpiration]; - NSDate *expiration = nil; - if (expirationString) { - expiration = [NSDate dateWithTimeIntervalSince1970:[expirationString doubleValue]]; - } - AWSCredentials *credentials = [[AWSCredentials alloc] initWithAccessKey:self.keychain[AWSCredentialsProviderKeychainAccessKeyId] - secretKey:self.keychain[AWSCredentialsProviderKeychainSecretAccessKey] - sessionKey:self.keychain[AWSCredentialsProviderKeychainSessionToken] - expiration:expiration]; - - return credentials; - } - - return nil; -} - -- (void)setInternalCredentials:(AWSCredentials *)internalCredentials { - _internalCredentials = internalCredentials; - - self.keychain[AWSCredentialsProviderKeychainAccessKeyId] = internalCredentials.accessKey; - self.keychain[AWSCredentialsProviderKeychainSecretAccessKey] = internalCredentials.secretKey; - self.keychain[AWSCredentialsProviderKeychainSessionToken] = internalCredentials.sessionKey; - if (internalCredentials.expiration) { - self.keychain[AWSCredentialsProviderKeychainExpiration] = [NSString stringWithFormat:@"%f", [internalCredentials.expiration timeIntervalSince1970]]; - } else { - self.keychain[AWSCredentialsProviderKeychainExpiration] = nil; - } -} - -@end - -@interface AWSCognitoCredentialsProvider() - -@property (nonatomic, strong) NSString *authRoleArn; -@property (nonatomic, strong) NSString *unAuthRoleArn; -@property (nonatomic, strong) AWSSTS *sts; -@property (nonatomic, strong) AWSCognitoIdentity *cognitoIdentity; -@property (nonatomic, strong) AWSUICKeyChainStore *keychain; -@property (nonatomic, strong) AWSExecutor *refreshExecutor; -@property (nonatomic, strong) dispatch_semaphore_t semaphore; -@property (atomic, assign) BOOL useEnhancedFlow; -@property (nonatomic, strong) AWSCredentials *internalCredentials; -@property (atomic, assign, getter=isRefreshingCredentials) BOOL refreshingCredentials; -@property (nonatomic, strong) NSDictionary *cachedLogins; -// This is a temporary solution to bypass the requirement of protocol check for `AWSIdentityProviderManager`. -@property (nonatomic, strong) NSString *customRoleArnOverride; - -@end - -@implementation AWSCognitoCredentialsProvider - -@synthesize internalCredentials = _internalCredentials; - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId { - if (self = [super init]) { - AWSCognitoCredentialsProviderHelper *identityProvider = [[AWSCognitoCredentialsProviderHelper alloc] initWithRegionType:regionType - identityPoolId:identityPoolId - useEnhancedFlow:YES - identityProviderManager:nil]; - [self setUpWithRegionType:regionType - identityProvider:identityProvider - unauthRoleArn:nil - authRoleArn:nil]; - } - - return self; -} - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId - identityProviderManager:(nullable id)identityProviderManager { - if (self = [super init]) { - AWSCognitoCredentialsProviderHelper *identityProvider = [[AWSCognitoCredentialsProviderHelper alloc] initWithRegionType:regionType - identityPoolId:identityPoolId - useEnhancedFlow:YES - identityProviderManager:identityProviderManager]; - [self setUpWithRegionType:regionType - identityProvider:identityProvider - unauthRoleArn:nil - authRoleArn:nil]; - } - - return self; -} - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityProvider:(id)identityProvider { - if (self = [super init]) { - [self setUpWithRegionType:regionType - identityProvider:identityProvider - unauthRoleArn:nil - authRoleArn:nil]; - } - - return self; -} - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - unauthRoleArn:(NSString *)unauthRoleArn - authRoleArn:(NSString *)authRoleArn - identityProvider:(id)identityProvider { - if (self = [super init]) { - [self setUpWithRegionType:regionType - identityProvider:identityProvider - unauthRoleArn:unauthRoleArn - authRoleArn:authRoleArn]; - } - - return self; -} - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId - unauthRoleArn:(nullable NSString *)unauthRoleArn - authRoleArn:(nullable NSString *)authRoleArn - identityProviderManager:(nullable id)identityProviderManager { - if (self = [super init]) { - AWSCognitoCredentialsProviderHelper *identityProvider = [[AWSCognitoCredentialsProviderHelper alloc] initWithRegionType:regionType - identityPoolId:identityPoolId - useEnhancedFlow:NO - identityProviderManager:identityProviderManager]; - [self setUpWithRegionType:regionType - identityProvider:identityProvider - unauthRoleArn:unauthRoleArn - authRoleArn:authRoleArn]; - } - - return self; -} - -- (void)setUpWithRegionType:(AWSRegionType)regionType - identityProvider:(id)identityProvider - unauthRoleArn:(NSString *)unauthRoleArn - authRoleArn:(NSString *)authRoleArn { - _refreshExecutor = [AWSExecutor executorWithOperationQueue:[NSOperationQueue new]]; - _refreshingCredentials = NO; - _semaphore = dispatch_semaphore_create(0); - - _identityProvider = identityProvider; - _unAuthRoleArn = unauthRoleArn; - _authRoleArn = authRoleArn; - _useEnhancedFlow = !unauthRoleArn && !authRoleArn; - - // initialize keychain - name spaced by app bundle and identity pool id - _keychain = [AWSUICKeyChainStore keyChainStoreWithService:[NSString stringWithFormat:@"%@.%@.%@", [NSBundle mainBundle].bundleIdentifier, [AWSCognitoCredentialsProvider class], identityProvider.identityPoolId]]; - - // If the identity provider has an identity id, use it - if (identityProvider.identityId) { - _keychain[AWSCredentialsProviderKeychainIdentityId] = identityProvider.identityId; - } - // Otherwise push whatever is in the keychain down to the identity provider - else { - identityProvider.identityId = _keychain[AWSCredentialsProviderKeychainIdentityId]; - } - - AWSAnonymousCredentialsProvider *credentialsProvider = [AWSAnonymousCredentialsProvider new]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:regionType - credentialsProvider:credentialsProvider]; - - _cognitoIdentity = [[AWSCognitoIdentity alloc] initWithConfiguration:configuration]; - - _customRoleArnOverride = nil; - - if (!_useEnhancedFlow) { - _sts = [[AWSSTS alloc] initWithConfiguration:configuration]; - } -} - -- (AWSTask *)getCredentialsWithSTS:(NSDictionary *)logins - authenticated:(BOOL)auth { - NSString *roleArn = self.unAuthRoleArn; - if (auth) { - roleArn = self.authRoleArn; - } - - if (!roleArn) { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderErrorDomain - code:AWSCognitoCredentialsProviderInvalidConfiguration - userInfo:@{NSLocalizedDescriptionKey: @"Required role ARN is nil"}]]; - } - - if (![logins objectForKey:AWSIdentityProviderAmazonCognitoIdentity]) { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderErrorDomain - code:AWSCognitoCredentialsProviderInvalidCognitoIdentityToken - userInfo:@{NSLocalizedDescriptionKey: @"Invalid logins dictionary."}]]; - } - - AWSSTSAssumeRoleWithWebIdentityRequest *webIdentityRequest = [AWSSTSAssumeRoleWithWebIdentityRequest new]; - webIdentityRequest.roleArn = roleArn; - webIdentityRequest.webIdentityToken = [logins objectForKey:AWSIdentityProviderAmazonCognitoIdentity]; - webIdentityRequest.roleSessionName = @"iOS-Provider"; - return [[self.sts assumeRoleWithWebIdentity:webIdentityRequest] continueWithBlock:^id(AWSTask *task) { - if (task.result) { - AWSSTSAssumeRoleWithWebIdentityResponse *webIdentityResponse = task.result; - self.internalCredentials = [[AWSCredentials alloc] initWithAccessKey:webIdentityResponse.credentials.accessKeyId - secretKey:webIdentityResponse.credentials.secretAccessKey - sessionKey:webIdentityResponse.credentials.sessionToken - expiration:webIdentityResponse.credentials.expiration]; - - return [AWSTask taskWithResult:self.internalCredentials]; - } else { - // reset the values for the credentials - [self clearCredentials]; - } - - return task; - }]; -} - -- (AWSTask *)getCredentialsWithCognito:(NSDictionary *)logins - authenticated:(BOOL)isAuthenticated - customRoleArn:(NSString *)customRoleArn { - // Grab a reference to our provider in case it changes out from under us - id providerRef = self.identityProvider; - - AWSCognitoIdentityGetCredentialsForIdentityInput *getCredentialsInput = [AWSCognitoIdentityGetCredentialsForIdentityInput new]; - getCredentialsInput.identityId = self.identityId; - getCredentialsInput.logins = logins; - getCredentialsInput.customRoleArn = customRoleArn; - - return [[[self.cognitoIdentity getCredentialsForIdentity:getCredentialsInput] continueWithBlock:^id(AWSTask *task) { - // When an invalid identityId is cached in the keychain for auth, - // we will refresh the identityId and try to get credentials token again. - if (task.error) { - AWSDDLogError(@"GetCredentialsForIdentity failed. Error is [%@]", task.error); - - // If we should reset IdentityId, clears it and retries. - // Otherwise, simply returns the error to the caller. - if (![AWSCognitoCredentialsProvider shouldResetIdentityId:task.error - authenticated:isAuthenticated]) { - return task; - } - - AWSDDLogDebug(@"Resetting identity Id and calling getIdentityId"); - // if it's auth, reset id and refetch - self.identityId = nil; - providerRef.identityId = nil; - - return [[providerRef logins] continueWithSuccessBlock:^id _Nullable(AWSTask *> * _Nonnull task) { - NSDictionary *logins = task.result; - - // This should never happen, but just in case - if (!providerRef.identityId) { - AWSDDLogError(@"In refresh, but identitId is nil."); - AWSDDLogError(@"Result from getIdentityId is %@", task.result); - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderHelperErrorDomain - code:AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil - userInfo:@{NSLocalizedDescriptionKey: @"identityId shouldn't be nil"}]]; - } - self.identityId = providerRef.identityId; - - AWSDDLogDebug(@"Retrying GetCredentialsForIdentity"); - - // retry get credentials - AWSCognitoIdentityGetCredentialsForIdentityInput *getCredentialsRetry = [AWSCognitoIdentityGetCredentialsForIdentityInput new]; - getCredentialsRetry.identityId = self.identityId; - getCredentialsRetry.logins = logins; - getCredentialsRetry.customRoleArn = customRoleArn; - - return [[self.cognitoIdentity getCredentialsForIdentity:getCredentialsRetry] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - if (task.error) { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderErrorDomain - code:AWSCognitoCredentialsProviderInvalidConfiguration - userInfo:@{NSLocalizedDescriptionKey : @"GetCredentialsForIdentity keeps failing. Clearing identityId did not help. Please check your Amazon Cognito Identity configuration."}]]; - } - return task; - }]; - }]; - } - return task; - }] continueWithSuccessBlock:^id(AWSTask *task) { - AWSCognitoIdentityGetCredentialsForIdentityResponse *getCredentialsResponse = task.result; - self.internalCredentials = [[AWSCredentials alloc] initWithAccessKey:getCredentialsResponse.credentials.accessKeyId - secretKey:getCredentialsResponse.credentials.secretKey - sessionKey:getCredentialsResponse.credentials.sessionToken - expiration:getCredentialsResponse.credentials.expiration]; - - NSString *identityIdFromResponse = getCredentialsResponse.identityId; - - // This should never happen, but just in case - if (!identityIdFromResponse) { - AWSDDLogError(@"identityId from getCredentialsForIdentity is nil"); - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderHelperErrorDomain - code:AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil - userInfo:@{NSLocalizedDescriptionKey: @"identityId shouldn't be nil"}] - ]; - } - - if (![self.identityId isEqualToString:identityIdFromResponse]) { - self.identityId = identityIdFromResponse; - providerRef.identityId = identityIdFromResponse; - } - - return [AWSTask taskWithResult:self.internalCredentials]; - }]; -} - -#pragma mark - AWSCredentialsProvider methods - -- (AWSTask *)credentials { - // Returns cached credentials when all of the following conditions are true: - // 1. The cached credentials are not nil. - // 2. The credentials do not expire within 10 minutes. - if (self.internalCredentials - && [self.internalCredentials.expiration compare:[NSDate dateWithTimeIntervalSinceNow:10 * 60]] == NSOrderedDescending) { - return [AWSTask taskWithResult:self.internalCredentials]; - } - - id providerRef = self.identityProvider; - return [[[providerRef logins] continueWithExecutor:self.refreshExecutor withSuccessBlock:^id _Nullable(AWSTask *> * _Nonnull task) { - NSDictionary *logins = task.result; - - AWSTask * getIdentityIdTask = nil; - - if(!providerRef.identityId){ - getIdentityIdTask = [self getIdentityId]; - }else { - self.identityId = providerRef.identityId; - getIdentityIdTask = [AWSTask taskWithResult:nil]; - } - - return [getIdentityIdTask continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - // Refreshes the credentials if any of the following is true: - // 1. The cached logins are different from the one the identity provider provided. - // 2. The cached credentials is nil. - // 3. The credentials expire within 10 minutes. - if ((!self.cachedLogins || [self.cachedLogins isEqualToDictionary:logins]) - && self.internalCredentials - && [self.internalCredentials.expiration compare:[NSDate dateWithTimeIntervalSinceNow:10 * 60]] == NSOrderedDescending) { - return [AWSTask taskWithResult:self.internalCredentials]; - } - - if (self.isRefreshingCredentials) { - // Waits up to 60 seconds for the Google SDK to refresh a token. - if (dispatch_semaphore_wait(self.semaphore, dispatch_time(DISPATCH_TIME_NOW, 60 * NSEC_PER_SEC)) != 0) { - NSError *error = [NSError errorWithDomain:AWSCognitoCredentialsProviderErrorDomain - code:AWSCognitoCredentialsProviderCredentialsRefreshTimeout - userInfo:nil]; - return [AWSTask taskWithError:error]; - } - } - - if ((!self.cachedLogins || [self.cachedLogins isEqualToDictionary:logins]) - && self.internalCredentials - && [self.internalCredentials.expiration compare:[NSDate dateWithTimeIntervalSinceNow:10 * 60]] == NSOrderedDescending) { - return [AWSTask taskWithResult:self.internalCredentials]; - } - - self.refreshingCredentials = YES; - self.cachedLogins = logins; - - if (self.useEnhancedFlow) { - NSString * customRoleArn = nil; - if([providerRef.identityProviderManager respondsToSelector:@selector(customRoleArn)]){ - customRoleArn = providerRef.identityProviderManager.customRoleArn; - } - if(self.customRoleArnOverride){ - customRoleArn = self.customRoleArnOverride; - } - return [self getCredentialsWithCognito:logins - authenticated:[providerRef isAuthenticated] - customRoleArn:customRoleArn]; - } else { - return [self getCredentialsWithSTS:logins - authenticated:[providerRef isAuthenticated]]; - } - - }]; - }] continueWithBlock:^id(AWSTask *task) { - if (task.error) { - AWSDDLogError(@"Unable to refresh. Error is [%@]", task.error); - } - - self.refreshingCredentials = NO; - dispatch_semaphore_signal(self.semaphore); - - return task; - }]; -} - -- (void)invalidateCachedTemporaryCredentials { - self.internalCredentials = nil; -} - -#pragma mark - - -- (AWSTask *)getIdentityId { - // Grab a reference to our provider in case it changes out from under us - id providerRef = self.identityProvider; - - return [[providerRef getIdentityId] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSString *identityId = task.result; - - // This should never happen, but just in case - if (!identityId) { - AWSDDLogError(@"In refresh, but identityId is nil."); - AWSDDLogError(@"Result from getIdentityId is %@", task.result); - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderErrorDomain - code:AWSCognitoCredentialsProviderIdentityIdIsNil - userInfo:@{NSLocalizedDescriptionKey: @"identityId shouldn't be nil"}] - ]; - } - - self.identityId = identityId; - - return task; - }]; -} - -- (void)clearKeychain { - [self.identityProvider clear]; - self.identityId = nil; - [self clearCredentials]; -} - -- (void)clearCredentials { - [self invalidateCachedTemporaryCredentials]; -} - -- (void)setIdentityProviderManagerOnce:(id)identityProviderManager { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - AWSCognitoCredentialsProviderHelper *cognitoIdentityProvider = self.identityProvider; - cognitoIdentityProvider.identityProviderManager = identityProviderManager; - }); -} - -- (void)setIdentityProvider:(id)identityProvider { - _identityProvider = identityProvider; - [self clearCredentials]; -} - -- (NSString *)identityPoolId { - return self.identityProvider.identityPoolId; -} - -+ (BOOL)shouldResetIdentityId:(NSError *)error - authenticated:(BOOL)isAuthenticated { - BOOL shouldResetIdentityId = NO; - if ([error.domain isEqualToString:AWSCognitoIdentityErrorDomain]) { - if (error.code == AWSCognitoIdentityErrorResourceNotFound) { - shouldResetIdentityId = isAuthenticated; - } - if (error.code == AWSCognitoIdentityErrorUnknown) { - NSString *errorMessage = [error.userInfo objectForKey:@"__type"]; - shouldResetIdentityId = isAuthenticated || [errorMessage isEqualToString:@"ValidationException"]; - } - if (error.code == AWSCognitoIdentityErrorNotAuthorized) { - shouldResetIdentityId = YES; - } - } - return shouldResetIdentityId; -} - -#pragma mark - Getters/setters - -- (NSString *)identityId { - NSString *identityId = self.identityProvider.identityId; - if (identityId) { - return identityId; - } - return [self.keychain stringForKey:AWSCredentialsProviderKeychainIdentityId]; -} - -- (void)setIdentityId:(NSString *)identityId { - self.keychain[AWSCredentialsProviderKeychainIdentityId] = identityId; -} - -- (AWSCredentials *)internalCredentials { - if (_internalCredentials) { - return _internalCredentials; - } - - if (self.keychain[AWSCredentialsProviderKeychainAccessKeyId] - && self.keychain[AWSCredentialsProviderKeychainSecretAccessKey]) { - NSString *expirationString = self.keychain[AWSCredentialsProviderKeychainExpiration]; - NSDate *expiration = nil; - if (expirationString) { - expiration = [NSDate dateWithTimeIntervalSince1970:[expirationString doubleValue]]; - } - AWSCredentials *credentials = [[AWSCredentials alloc] initWithAccessKey:self.keychain[AWSCredentialsProviderKeychainAccessKeyId] - secretKey:self.keychain[AWSCredentialsProviderKeychainSecretAccessKey] - sessionKey:self.keychain[AWSCredentialsProviderKeychainSessionToken] - expiration:expiration]; - return credentials; - } - - return nil; -} - -- (void)setInternalCredentials:(AWSCredentials *)internalCredentials { - _internalCredentials = internalCredentials; - - self.keychain[AWSCredentialsProviderKeychainAccessKeyId] = internalCredentials.accessKey; - self.keychain[AWSCredentialsProviderKeychainSecretAccessKey] = internalCredentials.secretKey; - self.keychain[AWSCredentialsProviderKeychainSessionToken] = internalCredentials.sessionKey; - if (internalCredentials.expiration) { - self.keychain[AWSCredentialsProviderKeychainExpiration] = [NSString stringWithFormat:@"%f", [internalCredentials.expiration timeIntervalSince1970]]; - } else { - self.keychain[AWSCredentialsProviderKeychainExpiration] = nil; - } -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Authentication/AWSIdentityProvider.h b/demo/Pods/AWSCore/AWSCore/Authentication/AWSIdentityProvider.h deleted file mode 100644 index 8a42eb9..0000000 --- a/demo/Pods/AWSCore/AWSCore/Authentication/AWSIdentityProvider.h +++ /dev/null @@ -1,147 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSServiceEnum.h" - -NS_ASSUME_NONNULL_BEGIN - -FOUNDATION_EXPORT NSString *const AWSCognitoIdentityIdChangedNotification; -FOUNDATION_EXPORT NSString *const AWSCognitoNotificationPreviousId; -FOUNDATION_EXPORT NSString *const AWSCognitoNotificationNewId; - -FOUNDATION_EXPORT NSString *const AWSIdentityProviderDigits; -FOUNDATION_EXPORT NSString *const AWSIdentityProviderFacebook; -FOUNDATION_EXPORT NSString *const AWSIdentityProviderGoogle; -FOUNDATION_EXPORT NSString *const AWSIdentityProviderLoginWithAmazon; -FOUNDATION_EXPORT NSString *const AWSIdentityProviderTwitter; - -FOUNDATION_EXPORT NSString *const AWSIdentityProviderAmazonCognitoIdentity; - -FOUNDATION_EXPORT NSString *const AWSCognitoCredentialsProviderHelperErrorDomain; -typedef NS_ENUM(NSInteger, AWSCognitoCredentialsProviderHelperErrorType) { - AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil, - AWSCognitoCredentialsProviderHelperErrorTypeTokenRefreshTimeout, -}; - -@class AWSTask<__covariant ResultType>; - -/** - AWSIdentityProvider provides an interface for acquiring an identity token from a provider. - */ -@protocol AWSIdentityProvider - -/** - The name of the identity provider. e.g. graph.facebook.com. - */ -@property (nonatomic, readonly) NSString *identityProviderName; - -/** - Returns the token associated with this provider. If the token is cached and invalid, should refresh and return the valid token. - */ -- (AWSTask *)token; - -@end - -/** - `AWSIdentityProviderManager` provides an interface for creating the `logins` dictionary for Amazon Cognito Identity. - */ -@protocol AWSIdentityProviderManager - -/** - Each entry in logins represents a single login with an identity provider. The key is the domain of the login provider (e.g. 'graph.facebook.com') and the value is the OAuth/OpenId Connect token that results from an authentication with that login provider. - */ -- (AWSTask *> *)logins; - -@optional -/** - * If the token contains the role arn and there are multiple roles, return the custom role to assume. This is currently only supported for SAML identity providers. - */ -@property (nonatomic, readonly) NSString *customRoleArn; - -@end - -/** - AWSCognitoCredentialsProviderHelper provides a Cognito specific identity provider. Cognito Identity providers are associated with an identity pool. If the identity pool supports authenticated access, multiple logins may be added to link to the Cognito identity. - */ -@protocol AWSCognitoCredentialsProviderHelper - -/** - The identity pool for this provider. Used to when making calls to the Amazon Cognito service - */ -@property (nonatomic, strong, readonly) NSString *identityPoolId; - -/** - The identity id as determined by the Amazon Cognito service - */ -@property (nonatomic, strong, nullable) NSString *identityId; - -/** - */ -@property (nonatomic, strong, readonly, nullable) id identityProviderManager; - -/** - Get/retrieve the identity id for this provider. If an identity id is already set on this provider, no remote call is made and the identity will be returned as a result of the AWSTask (the identityId is also available as a property). If no identityId is set on this provider, one will be retrieved from the service. - */ -- (AWSTask *)getIdentityId; - -/** - Is this provider considered 'authenticated'. By default, only returns YES if logins is set. - */ -- (BOOL)isAuthenticated; - -/** - Clear saved values for identityId, token, and logins. - */ -- (void)clear; - -@end - -/** - An abstract implementation of the AWSCognitoCredentialsProviderHelper. - */ -@interface AWSAbstractCognitoCredentialsProviderHelper : NSObject - -/** - The identity pool for this provider. Used to when making calls to the Amazon Cognito service - */ -@property (nonatomic, strong, readonly) NSString *identityPoolId; - -/** - The identity id as determined by the Amazon Cognito service - */ -@property (nonatomic, strong, nullable) NSString *identityId; - -/** - The identity provider manager that asynchronously returns `logins`. - */ -@property (nonatomic, strong, readonly, nullable) id identityProviderManager; - -@end - -/** - An abstract implementation of the AWSCognitoCredentialsProviderHelper. Developers should extend this class when they want to implement developer authenticated identities and want to support the basic Amazon Cognito authflow in the same application. - */ -@interface AWSCognitoCredentialsProviderHelper : AWSAbstractCognitoCredentialsProviderHelper - -@property (nonatomic, assign) BOOL useEnhancedFlow; - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId - useEnhancedFlow:(BOOL)useEnhancedFlow - identityProviderManager:(nullable id)identityProviderManager; -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Authentication/AWSIdentityProvider.m b/demo/Pods/AWSCore/AWSCore/Authentication/AWSIdentityProvider.m deleted file mode 100644 index 58e6232..0000000 --- a/demo/Pods/AWSCore/AWSCore/Authentication/AWSIdentityProvider.m +++ /dev/null @@ -1,334 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// -#import "AWSCore.h" -#import "AWSIdentityProvider.h" -#import "AWSBolts.h" - -NSString *const AWSCognitoIdentityIdChangedNotification = @"com.amazonaws.services.cognitoidentity.AWSCognitoIdentityIdChangedNotification"; -NSString *const AWSCognitoCredentialsProviderHelperErrorDomain = @"com.amazonaws.service.cognitoidentity.AWSCognitoCredentialsProviderHelper"; -NSString *const AWSCognitoNotificationPreviousId = @"PREVID"; -NSString *const AWSCognitoNotificationNewId = @"NEWID"; - -NSString *const AWSIdentityProviderDigits = @"www.digits.com"; -NSString *const AWSIdentityProviderFacebook = @"graph.facebook.com"; -NSString *const AWSIdentityProviderGoogle = @"accounts.google.com"; -NSString *const AWSIdentityProviderLoginWithAmazon = @"www.amazon.com"; -NSString *const AWSIdentityProviderTwitter = @"api.twitter.com"; - -NSString *const AWSIdentityProviderAmazonCognitoIdentity = @"cognito-identity.amazonaws.com"; - -@interface AWSCognitoCredentialsProvider() - -+ (BOOL)shouldResetIdentityId:(NSError *)error - authenticated:(BOOL)isAuthenticated; - -@end - -@interface AWSAbstractCognitoCredentialsProviderHelper() - -@property (nonatomic, strong) id identityProviderManager; -@property (nonatomic, strong) NSString *identityPoolId; -@property (nonatomic, strong) NSDictionary *cachedLogins; - -@end - -@interface AWSCognitoIdentity() - -- (instancetype)initWithConfiguration:(AWSServiceConfiguration *)configuration; - -@end - -@implementation AWSAbstractCognitoCredentialsProviderHelper - -#pragma mark - AWSIdentityProvider - -// Sub classes should override this. -- (NSString *)identityProviderName { - return @"AWSAbstractCognitoCredentialsProviderHelper"; -} - -// Sub classes should override this. -- (AWSTask *)token { - return [AWSTask taskWithResult:nil]; -} - -#pragma mark - AWSIdentityProviderManager - -// Sub classes should override this. -- (AWSTask *> *)logins { - return [AWSTask taskWithResult:nil]; -} - -#pragma mark - - -// stub class that should be overriden -- (AWSTask *)getIdentityId { - return [AWSTask taskWithResult:self.identityId]; -} - -- (void)clear { - self.identityId = nil; - self.cachedLogins = nil; -} - -- (BOOL)isAuthenticated { - return [self.cachedLogins count] > 0; -} - -- (void)setIdentityId:(NSString *)identityId { - if (identityId && ![identityId isEqualToString:_identityId]) { - [self postIdentityIdChangedNotification:identityId]; - } - _identityId = identityId; -} - -- (void)postIdentityIdChangedNotification:(NSString *)newId { - NSMutableDictionary *userInfo = [NSMutableDictionary dictionary]; - if (self.identityId) { - [userInfo setObject:self.identityId forKey:AWSCognitoNotificationPreviousId]; - } - [userInfo setObject:newId forKey:AWSCognitoNotificationNewId]; - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ - [[NSNotificationCenter defaultCenter] postNotificationName:AWSCognitoIdentityIdChangedNotification - object:self - userInfo:userInfo]; - }); -} - -@end - -@interface AWSCognitoCredentialsProviderHelper() - -@property (nonatomic, strong) AWSCognitoIdentity *cognitoIdentity; -@property (nonatomic, strong) AWSExecutor *executor; -@property (atomic, assign) int32_t count; -@property (nonatomic, strong) dispatch_semaphore_t semaphore; -@property (atomic, assign) BOOL hasClearedIdentityId; - -@end - -@implementation AWSCognitoCredentialsProviderHelper - -- (instancetype)initWithRegionType:(AWSRegionType)regionType - identityPoolId:(NSString *)identityPoolId - useEnhancedFlow:(BOOL)useEnhancedFlow - identityProviderManager:(id)identityProviderManager { - if (self = [super init]) { - _executor = [AWSExecutor executorWithOperationQueue:[NSOperationQueue new]]; - _count = 0; - _semaphore = dispatch_semaphore_create(0); - _useEnhancedFlow = useEnhancedFlow; - self.identityPoolId = identityPoolId; - self.identityProviderManager = identityProviderManager; - - AWSAnonymousCredentialsProvider *credentialsProvider = [AWSAnonymousCredentialsProvider new]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:regionType - credentialsProvider:credentialsProvider]; - _cognitoIdentity = [[AWSCognitoIdentity alloc] initWithConfiguration:configuration]; - } - - return self; -} - -#pragma mark - AWSIdentityProvider - -- (NSString *)identityProviderName { - return AWSIdentityProviderAmazonCognitoIdentity; -} - -- (AWSTask *)token { - return [[[self getIdentityId] continueWithSuccessBlock:^id(AWSTask *task) { - // This should never happen, but just in case - if (!self.identityId) { - AWSDDLogError(@"In refresh, but identityId is nil."); - AWSDDLogError(@"Result from getIdentityId is %@", task.result); - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderHelperErrorDomain - code:AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil - userInfo:@{NSLocalizedDescriptionKey: @"identityId shouldn't be nil"}]]; - } - - if (self.identityProviderManager) { - return [self.identityProviderManager logins]; - } else { - return [AWSTask taskWithResult:nil]; - } - }] continueWithSuccessBlock:^id _Nullable(AWSTask* _Nonnull task) { - NSDictionary *logins = task.result; - self.cachedLogins = logins; - - if (self.useEnhancedFlow) { - if(!task.result){ - return task; - } - else { - return [AWSTask taskWithResult:[task.result objectForKey:[self identityProviderName]]]; - } - } - - AWSCognitoIdentityGetOpenIdTokenInput *getTokenInput = [AWSCognitoIdentityGetOpenIdTokenInput new]; - getTokenInput.identityId = self.identityId; - getTokenInput.logins = logins; - - return [[[self.cognitoIdentity getOpenIdToken:getTokenInput] continueWithBlock:^id(AWSTask *task) { - // When an invalid identityId is cached in the keychain for auth, - // we will refresh the identityId and try to get OpenID token again. - if (task.error) { - AWSDDLogError(@"GetOpenIdToken failed. Error is [%@]", task.error); - - // If it's auth or we caught a not found or validation error - // we want to reset the identity id, otherwise, just return - // the error to our caller - if (![AWSCognitoCredentialsProvider shouldResetIdentityId:task.error - authenticated:[self isAuthenticated]]) { - return task; - } - - if (self.hasClearedIdentityId) { - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderErrorDomain - code:AWSCognitoCredentialsProviderInvalidConfiguration - userInfo:@{NSLocalizedDescriptionKey : @"GetCredentialsForIdentity keeps failing. Clearing identityId did not help. Please check your Amazon Cognito Identity configuration."}]]; - } - - AWSDDLogDebug(@"Resetting identity Id and calling getIdentityId"); - // if it's auth, reset id and refetch - self.identityId = nil; - self.hasClearedIdentityId = YES; - - return [[self getIdentityId] continueWithSuccessBlock:^id(AWSTask *task) { - // This should never happen, but just in case - if (!self.identityId) { - AWSDDLogError(@"In refresh, but identitId is nil."); - AWSDDLogError(@"Result from getIdentityId is %@", task.result); - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderHelperErrorDomain - code:AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil - userInfo:@{NSLocalizedDescriptionKey: @"identityId shouldn't be nil"}] - ]; - } - - AWSDDLogDebug(@"Retrying GetOpenIdToken"); - - // retry get token - AWSCognitoIdentityGetOpenIdTokenInput *tokenRetry = [AWSCognitoIdentityGetOpenIdTokenInput new]; - tokenRetry.identityId = self.identityId; - tokenRetry.logins = self.cachedLogins; - - return [self.cognitoIdentity getOpenIdToken:tokenRetry]; - }]; - } - - return task; - }] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityGetOpenIdTokenResponse *getTokenResponse = task.result; - NSString *token = getTokenResponse.token; - NSString *identityIdFromToken = getTokenResponse.identityId; - - // This should never happen, but just in case - if (!identityIdFromToken) { - AWSDDLogError(@"identityId from getOpenIdToken is nil"); - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderHelperErrorDomain - code:AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil - userInfo:@{NSLocalizedDescriptionKey: @"identityId shouldn't be nil"}] - ]; - } - - if (![self.identityId isEqualToString:identityIdFromToken]) { - self.identityId = identityIdFromToken; - } - - return [AWSTask taskWithResult:token]; - }]; - }]; -} - -#pragma mark - AWSIdentityProviderManager - -- (AWSTask *> *)logins { - if (self.identityProviderManager && self.useEnhancedFlow) { - self.cachedLogins = nil; - return [[self getIdentityId] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - if(self.cachedLogins){ - return [AWSTask taskWithResult:self.cachedLogins]; - } - else { - return [self.identityProviderManager logins]; - } - }]; - } - - return [[self token] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - if (!task.result) { - return [AWSTask taskWithResult:nil]; - } - NSString *token = task.result; - return [AWSTask taskWithResult:@{self.identityProviderName : token}]; - }]; -} - -#pragma mark - - -- (AWSTask *)getIdentityId { - if (self.identityId) { - return [AWSTask taskWithResult:self.identityId]; - } else { - AWSTask *task = [AWSTask taskWithResult:nil]; - if (self.identityProviderManager) { - task = [self.identityProviderManager logins]; - } - return [[task continueWithExecutor:self.executor withSuccessBlock:^id _Nullable(AWSTask *> * _Nonnull task) { - NSDictionary *logins = task.result; - self.cachedLogins = logins; - self.count++; - - // Create an identity id via GetID if the call to logins didn't set it which DevAuth does - // And there are no other calls in flight to create one - if (!self.identityId && self.count <= 1) { - AWSCognitoIdentityGetIdInput *getIdInput = [AWSCognitoIdentityGetIdInput new]; - getIdInput.identityPoolId = self.identityPoolId; - getIdInput.logins = logins; - return [self.cognitoIdentity getId:getIdInput]; - } else { - dispatch_semaphore_wait(self.semaphore, dispatch_time(DISPATCH_TIME_NOW, 5 * NSEC_PER_SEC)); - return [AWSTask taskWithResult:nil]; - } - }] continueWithBlock:^id(AWSTask *task) { - if (task.error) { - AWSDDLogError(@"GetId failed. Error is [%@]", task.error); - } else if (task.result) { - AWSCognitoIdentityGetIdResponse *getIdResponse = task.result; - self.identityId = getIdResponse.identityId; - } - - //ensure that the identityID is set before the semaphore is signaled, otherwise it's possible - //that continuation blocks execute before the identityID is set - self.count--; - dispatch_semaphore_signal(self.semaphore); - if (task.faulted) { - return task; - } - if(!self.identityId){ - NSString * error = @"Obtaining an identity id in another thread failed or didn't complete within 5 seconds."; - AWSDDLogError(@"%@",error); - return [AWSTask taskWithError:[NSError errorWithDomain:AWSCognitoCredentialsProviderHelperErrorDomain - code:AWSCognitoCredentialsProviderHelperErrorTypeIdentityIsNil - userInfo:@{NSLocalizedDescriptionKey: error}]]; - } else { - return [AWSTask taskWithResult:self.identityId]; - } - }]; - } -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Authentication/AWSSignature.h b/demo/Pods/AWSCore/AWSCore/Authentication/AWSSignature.h deleted file mode 100644 index 96b1703..0000000 --- a/demo/Pods/AWSCore/AWSCore/Authentication/AWSSignature.h +++ /dev/null @@ -1,101 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSNetworking.h" - -FOUNDATION_EXPORT NSString *const AWSSignatureV4Algorithm; -FOUNDATION_EXPORT NSString *const AWSSignatureV4Terminator; - -@class AWSEndpoint; - -@protocol AWSCredentialsProvider; - -@interface AWSSignatureSignerUtility : NSObject - -+ (NSData *)sha256HMacWithData:(NSData *)data withKey:(NSData *)key; -+ (NSString *)hashString:(NSString *)stringToHash; -+ (NSData *)hash:(NSData *)dataToHash; -+ (NSString *)hexEncode:(NSString *)string; -+ (NSString *)HMACSign:(NSData *)data withKey:(NSString *)key usingAlgorithm:(uint32_t)algorithm; - -@end - -@interface AWSSignatureV4Signer : NSObject - -@property (nonatomic, strong, readonly) id credentialsProvider; - -- (instancetype)initWithCredentialsProvider:(id)credentialsProvider - endpoint:(AWSEndpoint *)endpoint; - -+ (AWSTask *)generateQueryStringForSignatureV4WithCredentialProvider:(id)credentialsProvider - httpMethod:(AWSHTTPMethod)httpMethod - expireDuration:(int32_t)expireDuration - endpoint:(AWSEndpoint *)endpoint - keyPath:(NSString *)keyPath - requestHeaders:(NSDictionary *)requestHeaders - requestParameters:(NSDictionary *)requestParameters - signBody:(BOOL)signBody; - -+ (NSString *)getCanonicalizedRequest:(NSString *)method - path:(NSString *)path - query:(NSString *)query - headers:(NSDictionary *)headers - contentSha256:(NSString *)contentSha256; - -+ (NSData *)getV4DerivedKey:(NSString *)secret - date:(NSString *)dateStamp - region:(NSString *)regionName - service:(NSString *)serviceName; - -+ (NSString *)getSignedHeadersString:(NSDictionary *)headers; - -@end - -@interface AWSSignatureV2Signer : NSObject - -@property (nonatomic, strong, readonly) id credentialsProvider; - -+ (instancetype)signerWithCredentialsProvider:(id)credentialsProvider - endpoint:(AWSEndpoint *)endpoint; - -- (instancetype)initWithCredentialsProvider:(id)credentialsProvider - endpoint:(AWSEndpoint *)endpoint; - -@end - -/** - * A subclass of NSInputStream that wraps an input stream and adds - * signature of chunk data. - **/ -@interface AWSS3ChunkedEncodingInputStream : NSInputStream - -@property (atomic, assign) int64_t totalLengthOfChunkSignatureSent; -/** - * Initialize the input stream with date, scope, signing key and signature - * of request headers. - **/ -- (instancetype)initWithInputStream:(NSInputStream *)stream - date:(NSDate *)date - scope:(NSString *)scope - kSigning:(NSData *)kSigning - headerSignature:(NSString *)headerSignature; - -/** - * Computes new content length after data being chunked encoded. - **/ -+ (NSUInteger)computeContentLengthForChunkedData:(NSUInteger)dataLength; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Authentication/AWSSignature.m b/demo/Pods/AWSCore/AWSCore/Authentication/AWSSignature.m deleted file mode 100644 index 8cbbdb3..0000000 --- a/demo/Pods/AWSCore/AWSCore/Authentication/AWSSignature.m +++ /dev/null @@ -1,990 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// -#import "AWSSignature.h" - -#import -#import "AWSCategory.h" -#import "AWSService.h" -#import "AWSCredentialsProvider.h" -#import "AWSCocoaLumberjack.h" -#import "AWSBolts.h" - -static NSString *const AWSSigV4Marker = @"AWS4"; -NSString *const AWSSignatureV4Algorithm = @"AWS4-HMAC-SHA256"; -NSString *const AWSSignatureV4Terminator = @"aws4_request"; - -@implementation AWSSignatureSignerUtility - -+ (NSData *)sha256HMacWithData:(NSData *)data withKey:(NSData *)key { - CCHmacContext context; - - CCHmacInit(&context, kCCHmacAlgSHA256, [key bytes], [key length]); - CCHmacUpdate(&context, [data bytes], [data length]); - - unsigned char digestRaw[CC_SHA256_DIGEST_LENGTH]; - NSInteger digestLength = CC_SHA256_DIGEST_LENGTH; - - CCHmacFinal(&context, digestRaw); - - return [NSData dataWithBytes:digestRaw length:digestLength]; -} - -+ (NSString *)hashString:(NSString *)stringToHash { - return [[NSString alloc] initWithData:[self hash:[stringToHash dataUsingEncoding:NSUTF8StringEncoding]] - encoding:NSASCIIStringEncoding]; -} - -+ (NSData *)hash:(NSData *)dataToHash { - if ([dataToHash length] > UINT32_MAX) { - return nil; - } - - const void *cStr = [dataToHash bytes]; - unsigned char result[CC_SHA256_DIGEST_LENGTH]; - - CC_SHA256(cStr, (uint32_t)[dataToHash length], result); - - return [[NSData alloc] initWithBytes:result length:CC_SHA256_DIGEST_LENGTH]; -} - -+ (NSString *)hexEncode:(NSString *)string { - NSUInteger len = [string length]; - if (len == 0) { - return @""; - } - unichar *chars = malloc(len * sizeof(unichar)); - if (chars == NULL) { - // this situation is irrecoverable and we don't want to return something corrupted, so we raise an exception (avoiding NSAssert that may be disabled) - [NSException raise:@"NSInternalInconsistencyException" format:@"failed malloc" arguments:nil]; - return nil; - } - - [string getCharacters:chars]; - - NSMutableString *hexString = [NSMutableString new]; - for (NSUInteger i = 0; i < len; i++) { - if ((int)chars[i] < 16) { - [hexString appendString:@"0"]; - } - [hexString appendString:[NSString stringWithFormat:@"%x", chars[i]]]; - } - free(chars); - - return hexString; -} - -+ (NSString *)HMACSign:(NSData *)data withKey:(NSString *)key usingAlgorithm:(CCHmacAlgorithm)algorithm { - CCHmacContext context; - const char *keyCString = [key cStringUsingEncoding:NSASCIIStringEncoding]; - - CCHmacInit(&context, algorithm, keyCString, strlen(keyCString)); - CCHmacUpdate(&context, [data bytes], [data length]); - - // Both SHA1 and SHA256 will fit in here - unsigned char digestRaw[CC_SHA256_DIGEST_LENGTH]; - - NSInteger digestLength = -1; - - switch (algorithm) { - case kCCHmacAlgSHA1: - digestLength = CC_SHA1_DIGEST_LENGTH; - break; - - case kCCHmacAlgSHA256: - digestLength = CC_SHA256_DIGEST_LENGTH; - break; - - default: - AWSDDLogError(@"Unable to sign: unsupported Algorithm."); - return nil; - break; - } - - CCHmacFinal(&context, digestRaw); - - NSData *digestData = [NSData dataWithBytes:digestRaw length:digestLength]; - - return [digestData base64EncodedStringWithOptions:kNilOptions]; -} - -@end - -#pragma mark - AWSSignatureV4Signer - -@interface AWSSignatureV4Signer() - -@property (nonatomic, strong) AWSEndpoint *endpoint; - -@end - -@implementation AWSSignatureV4Signer - -+ (instancetype)signerWithCredentialsProvider:(id)credentialsProvider - endpoint:(AWSEndpoint *)endpoint { - AWSSignatureV4Signer *signer = [[AWSSignatureV4Signer alloc] initWithCredentialsProvider:credentialsProvider - endpoint:endpoint]; - return signer; -} - -- (instancetype)initWithCredentialsProvider:(id)credentialsProvider - endpoint:(AWSEndpoint *)endpoint { - if (self = [super init]) { - _credentialsProvider = credentialsProvider; - _endpoint = endpoint; - } - - return self; -} - -- (AWSTask *)interceptRequest:(NSMutableURLRequest *)request { - [request addValue:request.URL.host forHTTPHeaderField:@"Host"]; - return [[self.credentialsProvider credentials] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCredentials *credentials = task.result; - // clear authorization header if set - [request setValue:nil forHTTPHeaderField:@"Authorization"]; - - if (credentials) { - NSString *authorization; - NSArray *hostArray = [[[request URL] host] componentsSeparatedByString:@"."]; - - [request setValue:credentials.sessionKey forHTTPHeaderField:@"X-Amz-Security-Token"]; - if (self.endpoint.serviceType == AWSServiceS3 || - ([hostArray firstObject] && [[hostArray firstObject] rangeOfString:@"s3"].location != NSNotFound) ) { - //If it is a S3 Request - authorization = [self signS3RequestV4:request - credentials:credentials]; - } else { - authorization = [self signRequestV4:request - credentials:credentials]; - } - - if (authorization) { - [request setValue:authorization forHTTPHeaderField:@"Authorization"]; - } - } - return nil; - }]; -} - -- (NSString *)signS3RequestV4:(NSMutableURLRequest *)urlRequest - credentials:(AWSCredentials *)credentials { - if ([urlRequest valueForHTTPHeaderField:@"Content-Type"] == nil) { - [urlRequest addValue:@"binary/octet-stream" forHTTPHeaderField:@"Content-Type"]; - } - - // fix query string - // @"?location" -> @"?location=" - - // NSString *subResource = request.subResource; - // if (nil != subResource - // && [subResource length] > 0 - // && [subResource rangeOfString:@"="].location == NSNotFound) { - // [request setSubResource:[subResource stringByAppendingString:@"="]]; - // [request.urlRequest setURL:request.url]; - // } - - NSDate *date = [NSDate aws_clockSkewFixedDate]; - NSString *dateStamp = [date aws_stringValue:AWSDateShortDateFormat1]; - //NSString *dateTime = [date aws_stringValue:AWSDateAmzDateFormat]; - - NSString *scope = [NSString stringWithFormat:@"%@/%@/%@/%@", dateStamp, self.endpoint.regionName, self.endpoint.serviceName, AWSSignatureV4Terminator]; - NSString *signingCredentials = [NSString stringWithFormat:@"%@/%@", credentials.accessKey, scope]; - - // compute canonical request - NSString *httpMethod = urlRequest.HTTPMethod; - // URL.path returns unescaped path - // For S3, url-encoded URI need to be decoded before generate CanonicalURI, otherwise, signature doesn't match occurs. (I.e. CanonicalURI for "/ios-v2-test-445901470/name%3A" will still be "/ios-v2-test-445901470/name%3A". "%3A" -> ":" -> "%3A") - NSString *cfPath = (NSString*)CFBridgingRelease(CFURLCopyPath((CFURLRef)urlRequest.URL)); - NSString *path = [cfPath aws_stringWithURLEncodingPath]; - - if (path.length == 0) { - path = [NSString stringWithFormat:@"/"]; - } - - NSString *query = urlRequest.URL.query; - if (query == nil) { - query = [NSString stringWithFormat:@""]; - } - - // Compute contentSha256 - NSString *contentSha256; - NSInputStream *stream = [urlRequest HTTPBodyStream]; - NSUInteger contentLength = [[urlRequest allHTTPHeaderFields][@"Content-Length"] integerValue]; - if (nil != stream) { - contentSha256 = @"STREAMING-AWS4-HMAC-SHA256-PAYLOAD"; - [urlRequest setValue:[NSString stringWithFormat:@"%lu", (unsigned long)[AWSS3ChunkedEncodingInputStream computeContentLengthForChunkedData:contentLength]] - forHTTPHeaderField:@"Content-Length"]; - [urlRequest setValue:nil forHTTPHeaderField:@"Content-Length"]; //remove Content-Length header if it is a HTTPBodyStream - [urlRequest addValue:@"aws-chunked" forHTTPHeaderField:@"Content-Encoding"]; //add aws-chunked keyword for s3 chunk upload - [urlRequest setValue:[NSString stringWithFormat:@"%lu", (unsigned long)contentLength] forHTTPHeaderField:@"x-amz-decoded-content-length"]; - } else { - contentSha256 = [AWSSignatureSignerUtility hexEncode:[[NSString alloc] initWithData:[AWSSignatureSignerUtility hash:[urlRequest HTTPBody]] encoding:NSASCIIStringEncoding]]; - //using Content-Length with value of '0' cause auth issue, remove it. - if (contentLength == 0) { - [urlRequest setValue:nil forHTTPHeaderField:@"Content-Length"]; - } else { - [urlRequest setValue:[NSString stringWithFormat:@"%lu", (unsigned long)[[urlRequest HTTPBody] length]] forHTTPHeaderField:@"Content-Length"]; - } - } - - //[request.urlRequest setValue:dateTime forHTTPHeaderField:@"X-Amz-Date"]; - [urlRequest setValue:contentSha256 forHTTPHeaderField:@"x-amz-content-sha256"]; - - //Set Content-MD5 header field if required by server. - if (([ urlRequest.HTTPMethod isEqualToString:@"PUT"] && ([[[urlRequest URL] query] hasPrefix:@"tagging"] || - [[[urlRequest URL] query] hasPrefix:@"lifecycle"] || - [[[urlRequest URL] query] hasPrefix:@"cors"])) - || ([urlRequest.HTTPMethod isEqualToString:@"POST"] && [[[urlRequest URL] query] hasPrefix:@"delete"]) - ) { - if (![urlRequest valueForHTTPHeaderField:@"Content-MD5"]) { - [urlRequest setValue:[NSString aws_base64md5FromData:urlRequest.HTTPBody] forHTTPHeaderField:@"Content-MD5"]; - } - - } - - NSMutableDictionary *headers = [[urlRequest allHTTPHeaderFields] mutableCopy]; - - NSString *canonicalRequest = [AWSSignatureV4Signer getCanonicalizedRequest:httpMethod - path:path - query:query - headers:headers - contentSha256:contentSha256]; - AWSDDLogVerbose(@"Canonical request: [%@]", canonicalRequest); - - NSString *stringToSign = [NSString stringWithFormat:@"%@\n%@\n%@\n%@", - AWSSignatureV4Algorithm, - [urlRequest valueForHTTPHeaderField:@"X-Amz-Date"], - scope, - [AWSSignatureSignerUtility hexEncode:[AWSSignatureSignerUtility hashString:canonicalRequest]]]; - AWSDDLogVerbose(@"AWS4 String to Sign: [%@]", stringToSign); - - NSData *kSigning = [AWSSignatureV4Signer getV4DerivedKey:credentials.secretKey - date:dateStamp - region:self.endpoint.regionName - service:self.endpoint.serviceName]; - - NSData *signature = [AWSSignatureSignerUtility sha256HMacWithData:[stringToSign dataUsingEncoding:NSUTF8StringEncoding] - withKey:kSigning]; - NSString *signatureString = [AWSSignatureSignerUtility hexEncode:[[NSString alloc] initWithData:signature - encoding:NSASCIIStringEncoding]]; - - NSString *authorization = [NSString stringWithFormat:@"%@ Credential=%@, SignedHeaders=%@, Signature=%@", - AWSSignatureV4Algorithm, - signingCredentials, - [AWSSignatureV4Signer getSignedHeadersString:headers], - signatureString]; - - if (nil != stream) { - AWSS3ChunkedEncodingInputStream *chunkedStream = [[AWSS3ChunkedEncodingInputStream alloc] initWithInputStream:stream - date:date - scope:scope - kSigning:kSigning - headerSignature:signatureString]; - [urlRequest setHTTPBodyStream:chunkedStream]; - } - - return authorization; -} - - -- (NSString *)signRequestV4:(NSMutableURLRequest *)request - credentials:(AWSCredentials *)credentials { - - NSString *absoluteString = [request.URL absoluteString]; - if ([absoluteString hasSuffix:@"/"]) { - request.URL = [NSURL URLWithString:[absoluteString substringToIndex:[absoluteString length] - 1]]; - } - - NSDate *xAmzDate = [NSDate aws_dateFromString:[request valueForHTTPHeaderField:@"X-Amz-Date"] - format:AWSDateISO8601DateFormat2]; - - NSString *dateStamp = [xAmzDate aws_stringValue:AWSDateShortDateFormat1]; - - NSString *cfPath = (NSString *)CFBridgingRelease(CFURLCopyPath((CFURLRef)request.URL)); - //For AWS Services (except S3) , url-encoded URL will be used to generate CanonicalURL directly. (i.e. the encoded URL will be encoded again, e.g. "%3A" -> "%253A" - NSString *path = [cfPath aws_stringWithURLEncodingPathWithoutPriorDecoding]; - if (path.length == 0) { - path = [NSString stringWithFormat:@"/"]; - } - NSString *query = request.URL.query; - if (query == nil) { - query = [NSString stringWithFormat:@""]; - } - - NSString *contentSha256 = [AWSSignatureSignerUtility hexEncode:[[NSString alloc] initWithData:[AWSSignatureSignerUtility hash:request.HTTPBody] encoding:NSASCIIStringEncoding]]; - - NSString *canonicalRequest = [AWSSignatureV4Signer getCanonicalizedRequest:request.HTTPMethod - path:path - query:query - headers:request.allHTTPHeaderFields - contentSha256:contentSha256]; - - AWSDDLogVerbose(@"AWS4 Canonical Request: [%@]", canonicalRequest); - AWSDDLogVerbose(@"payload %@",[[NSString alloc] initWithData:request.HTTPBody encoding:NSUTF8StringEncoding]); - - NSString *scope = [NSString stringWithFormat:@"%@/%@/%@/%@", - dateStamp, - self.endpoint.regionName, - self.endpoint.serviceName, - AWSSignatureV4Terminator]; - NSString *signingCredentials = [NSString stringWithFormat:@"%@/%@", - credentials.accessKey, - scope]; - NSString *stringToSign = [NSString stringWithFormat:@"%@\n%@\n%@\n%@", - AWSSignatureV4Algorithm, - [request valueForHTTPHeaderField:@"X-Amz-Date"], - scope, - [AWSSignatureSignerUtility hexEncode:[AWSSignatureSignerUtility hashString:canonicalRequest]]]; - - AWSDDLogVerbose(@"AWS4 String to Sign: [%@]", stringToSign); - - NSData *kSigning = [AWSSignatureV4Signer getV4DerivedKey:credentials.secretKey - date:dateStamp - region:self.endpoint.regionName - service:self.endpoint.serviceName]; - NSData *signature = [AWSSignatureSignerUtility sha256HMacWithData:[stringToSign dataUsingEncoding:NSUTF8StringEncoding] - withKey:kSigning]; - - NSString *credentialsAuthorizationHeader = [NSString stringWithFormat:@"Credential=%@", signingCredentials]; - NSString *signedHeadersAuthorizationHeader = [NSString stringWithFormat:@"SignedHeaders=%@", [AWSSignatureV4Signer getSignedHeadersString:request.allHTTPHeaderFields]]; - NSString *signatureAuthorizationHeader = [NSString stringWithFormat:@"Signature=%@", [AWSSignatureSignerUtility hexEncode:[[NSString alloc] initWithData:signature encoding:NSASCIIStringEncoding]]]; - - NSString *authorization = [NSString stringWithFormat:@"%@ %@, %@, %@", - AWSSignatureV4Algorithm, - credentialsAuthorizationHeader, - signedHeadersAuthorizationHeader, - signatureAuthorizationHeader]; - - return authorization; -} - - -+ (AWSTask *)generateQueryStringForSignatureV4WithCredentialProvider:(id)credentialsProvider - httpMethod:(AWSHTTPMethod)httpMethod - expireDuration:(int32_t)expireDuration - endpoint:(AWSEndpoint *)endpoint - keyPath:(NSString *)keyPath - requestHeaders:(NSDictionary *)requestHeaders - requestParameters:(NSDictionary *)requestParameters - signBody:(BOOL)signBody{ - - return [[credentialsProvider credentials] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCredentials *credentials = task.result; - - //Implementation of V4 signaure http://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-query-string-auth.html - NSMutableString *queryString = [NSMutableString new]; - - //Append Identifies the version of AWS Signature and the algorithm that you used to calculate the signature. - [queryString appendFormat:@"%@=%@&",@"X-Amz-Algorithm",AWSSignatureV4Algorithm]; - - //Get ClockSkew Fixed Date - NSDate *currentDate = [NSDate aws_clockSkewFixedDate]; - - //Format of X-Amz-Credential : ////aws4_request. - NSString *scope = [NSString stringWithFormat:@"%@/%@/%@/%@", - [currentDate aws_stringValue:AWSDateShortDateFormat1], - endpoint.regionName, - endpoint.serviceName, - AWSSignatureV4Terminator]; - - NSString *signingCredentials = [NSString stringWithFormat:@"%@/%@",credentials.accessKey, scope]; - //need to replace "/" with "%2F" - NSString *xAmzCredentialString = [signingCredentials stringByReplacingOccurrencesOfString:@"/" withString:@"\%2F"]; - - [queryString appendFormat:@"%@=%@&",@"X-Amz-Credential",xAmzCredentialString]; - - //X-Amz-Date in ISO 8601 format, for example, 20130721T201207Z. This value must match the date value used to calculate the signature. - [queryString appendFormat:@"%@=%@&",@"X-Amz-Date",[currentDate aws_stringValue:AWSDateISO8601DateFormat2]]; - - //X-Amz-Expires, Provides the time period, in seconds, for which the generated presigned URL is valid. - //For example, 86400 (24 hours). This value is an integer. The minimum value you can set is 1, and the maximum is 604800 (seven days). - [queryString appendFormat:@"%@=%d&", @"X-Amz-Expires", expireDuration]; - - /* - X-Amz-SignedHeaders Lists the headers that you used to calculate the signature. The HTTP host header is required. - Any x-amz-* headers that you plan to add to the request are also required for signature calculation. - In general, for added security, you should sign all the request headers that you plan to include in your request. - */ - - [queryString appendFormat:@"%@=%@&", @"X-Amz-SignedHeaders", [[AWSSignatureV4Signer getSignedHeadersString:requestHeaders] aws_stringWithURLEncoding]]; - - //add additionalParameters to queryString - for (NSString *key in requestParameters) { - if ([requestParameters[key] isKindOfClass:[NSArray class]]) { - NSArray *parameterValues = requestParameters[key]; - for (NSString *paramValue in parameterValues) { - [queryString appendFormat:@"%@=%@&", [key aws_stringWithURLEncoding], [paramValue aws_stringWithURLEncoding]]; - } - } else if ([requestParameters[key] isKindOfClass:[NSString class]]) { - NSString *value = requestParameters[key]; - [queryString appendFormat:@"%@=%@&",[key aws_stringWithURLEncoding], [value aws_stringWithURLEncoding]]; - } else { - // Only @[NSString: NSString] and @[NSString: NSArray] supported currently - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"Invalid requestParameters dictionary. Supported Dictionaries include [NSString: NSString] and [NSString: NSArray]" - userInfo:nil]; - } - } - - //add security-token if necessary - if ([credentials.sessionKey length] > 0) { - [queryString appendFormat:@"%@=%@&", @"X-Amz-Security-Token", [credentials.sessionKey aws_stringWithURLEncoding]]; - } - - // ============= generate v4 signature string =================== - - /* Canonical Request Format: - * - * HTTP-VERB + "\n" + (e.g. GET, PUT, POST) - * Canonical URI + "\n" + (e.g. /test.txt) - * Canonical Query String + "\n" (multiple queryString need to sorted by QueryParameter) - * Canonical Headrs + "\n" + (multiple headers need to be sorted by HeaderName) - * Signed Headers + "\n" + (multiple headers need to be sorted by HeaderName) - * "UNSIGNED-PAYLOAD" - */ - - - NSString *httpMethodString = [NSString aws_stringWithHTTPMethod:httpMethod]; - - //CanonicalURI is the URI-encoded version of the absolute path component of the URI—everything starting with the "/" that follows the domain name and up to the end of the string or to the question mark character ('?') if you have query string parameters. e.g. https://s3.amazonaws.com/examplebucket/myphoto.jpg /examplebucket/myphoto.jpg is the absolute path. In the absolute path, you don't encode the "/". - - NSString *canonicalURI = [NSString stringWithFormat:@"/%@", [keyPath aws_stringWithURLEncodingPath]]; //keyPath is not url-encoded. - - NSString *contentSha256; - if(signBody && httpMethod == AWSHTTPMethodGET){ - //in case of http get we sign the body as an empty string only if the sign body flag is set to true - contentSha256 = [AWSSignatureSignerUtility hexEncode:[[NSString alloc] initWithData:[AWSSignatureSignerUtility hash:[@"" dataUsingEncoding:NSUTF8StringEncoding]] encoding:NSASCIIStringEncoding]]; - }else{ - contentSha256 = @"UNSIGNED-PAYLOAD"; - } - //Generate Canonical Request - NSString *canonicalRequest = [AWSSignatureV4Signer getCanonicalizedRequest:httpMethodString - path:canonicalURI - query:queryString - headers:requestHeaders - contentSha256:contentSha256]; - AWSDDLogVerbose(@"AWSS4 PresignedURL Canonical request: [%@]", canonicalRequest); - - //Generate String to Sign - NSString *stringToSign = [NSString stringWithFormat:@"%@\n%@\n%@\n%@", - AWSSignatureV4Algorithm, - [currentDate aws_stringValue:AWSDateISO8601DateFormat2], - scope, - [AWSSignatureSignerUtility hexEncode:[AWSSignatureSignerUtility hashString:canonicalRequest]]]; - - AWSDDLogVerbose(@"AWS4 PresignedURL String to Sign: [%@]", stringToSign); - - //Generate Signature - NSData *kSigning = [AWSSignatureV4Signer getV4DerivedKey:credentials.secretKey - date:[currentDate aws_stringValue:AWSDateShortDateFormat1] - region:endpoint.regionName - service:endpoint.serviceName]; - NSData *signature = [AWSSignatureSignerUtility sha256HMacWithData:[stringToSign dataUsingEncoding:NSUTF8StringEncoding] - withKey:kSigning]; - NSString *signatureString = [AWSSignatureSignerUtility hexEncode:[[NSString alloc] initWithData:signature - encoding:NSASCIIStringEncoding]]; - - // ============ generate v4 signature string (END) =================== - - [queryString appendFormat:@"%@=%@", @"X-Amz-Signature", signatureString]; - - NSString *urlString = [NSString stringWithFormat:@"%@://%@/%@?%@", endpoint.URL.scheme, endpoint.hostName, keyPath, queryString]; - - return [NSURL URLWithString:urlString]; - }]; -} - - -+ (NSString *)getCanonicalizedRequest:(NSString *)method path:(NSString *)path query:(NSString *)query headers:(NSDictionary *)headers contentSha256:(NSString *)contentSha256 { - NSMutableString *canonicalRequest = [NSMutableString new]; - [canonicalRequest appendString:method]; - [canonicalRequest appendString:@"\n"]; - [canonicalRequest appendString:path]; // Canonicalized resource path - [canonicalRequest appendString:@"\n"]; - - [canonicalRequest appendString:[AWSSignatureV4Signer getCanonicalizedQueryString:query]]; // Canonicalized Query String - [canonicalRequest appendString:@"\n"]; - - [canonicalRequest appendString:[AWSSignatureV4Signer getCanonicalizedHeaderString:headers]]; - [canonicalRequest appendString:@"\n"]; - - [canonicalRequest appendString:[AWSSignatureV4Signer getSignedHeadersString:headers]]; - [canonicalRequest appendString:@"\n"]; - - [canonicalRequest appendString:[NSString stringWithFormat:@"%@", contentSha256]]; - - return canonicalRequest; -} - -+ (NSString *)getCanonicalizedQueryString:(NSString *)query { - NSMutableDictionary *> *queryDictionary = [NSMutableDictionary new]; - [[query componentsSeparatedByString:@"&"] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - NSArray *components = [obj componentsSeparatedByString:@"="]; - NSString *key; - NSString *value = @""; - NSUInteger count = [components count]; - if (count > 0 && count <= 2) { - //can be ?a=b or ?a - key = components[0]; - if (! [key isEqualToString:@""] ) { - if (count == 2) { - //is ?a=b - value = components[1]; - } - if (queryDictionary[key]) { - // If the query parameter has multiple values, add it in the mutable array - [[queryDictionary objectForKey:key] addObject:value]; - } else { - // Insert the value for query parameter as an element in mutable array - [queryDictionary setObject:[@[value] mutableCopy] forKey:key]; - } - } - } - }]; - - NSMutableArray *sortedQuery = [[NSMutableArray alloc] initWithArray:[queryDictionary allKeys]]; - - [sortedQuery sortUsingSelector:@selector(compare:)]; - - NSMutableString *sortedQueryString = [NSMutableString new]; - for (NSString *key in sortedQuery) { - [queryDictionary[key] sortUsingSelector:@selector(compare:)]; - for (NSString *parameterValue in queryDictionary[key]) { - [sortedQueryString appendString:key]; - [sortedQueryString appendString:@"="]; - [sortedQueryString appendString:parameterValue]; - [sortedQueryString appendString:@"&"]; - } - } - // Remove the trailing & for a valid canonical query string. - if ([sortedQueryString hasSuffix:@"&"]) { - return [sortedQueryString substringToIndex:[sortedQueryString length] - 1]; - } - - return sortedQueryString; -} - -+ (NSString *)getCanonicalizedHeaderString:(NSDictionary *)headers { - NSMutableArray *sortedHeaders = [[NSMutableArray alloc] initWithArray:[headers allKeys]]; - - [sortedHeaders sortUsingSelector:@selector(caseInsensitiveCompare:)]; - - NSMutableString *headerString = [NSMutableString new]; - for (NSString *header in sortedHeaders) { - [headerString appendString:[header lowercaseString]]; - [headerString appendString:@":"]; - [headerString appendString:[headers valueForKey:header]]; - [headerString appendString:@"\n"]; - } - - // SigV4 expects all whitespace in headers and values to be collapsed to a single space - NSCharacterSet *whitespaceChars = [NSCharacterSet whitespaceCharacterSet]; - NSPredicate *noEmptyStrings = [NSPredicate predicateWithFormat:@"SELF != ''"]; - - NSArray *parts = [headerString componentsSeparatedByCharactersInSet:whitespaceChars]; - NSArray *nonWhitespace = [parts filteredArrayUsingPredicate:noEmptyStrings]; - return [nonWhitespace componentsJoinedByString:@" "]; -} - -+ (NSString *)getSignedHeadersString:(NSDictionary *)headers { - NSMutableArray *sortedHeaders = [[NSMutableArray alloc] initWithArray:[headers allKeys]]; - - [sortedHeaders sortUsingSelector:@selector(caseInsensitiveCompare:)]; - - NSMutableString *headerString = [NSMutableString new]; - for (NSString *header in sortedHeaders) { - if ([headerString length] > 0) { - [headerString appendString:@";"]; - } - [headerString appendString:[header lowercaseString]]; - } - - return headerString; -} - -+ (NSData *)getV4DerivedKey:(NSString *)secret date:(NSString *)dateStamp region:(NSString *)regionName service:(NSString *)serviceName { - // AWS4 uses a series of derived keys, formed by hashing different pieces of data - NSString *kSecret = [NSString stringWithFormat:@"%@%@", AWSSigV4Marker, secret]; - NSData *kDate = [AWSSignatureSignerUtility sha256HMacWithData:[dateStamp dataUsingEncoding:NSUTF8StringEncoding] - withKey:[kSecret dataUsingEncoding:NSUTF8StringEncoding]]; - NSData *kRegion = [AWSSignatureSignerUtility sha256HMacWithData:[regionName dataUsingEncoding:NSASCIIStringEncoding] - withKey:kDate]; - NSData *kService = [AWSSignatureSignerUtility sha256HMacWithData:[serviceName dataUsingEncoding:NSUTF8StringEncoding] - withKey:kRegion]; - NSData *kSigning = [AWSSignatureSignerUtility sha256HMacWithData:[AWSSignatureV4Terminator dataUsingEncoding:NSUTF8StringEncoding] - withKey:kService]; - - //TODO: cache this derived key? - return kSigning; -} - -// For SigV2 -+ (NSString *)canonicalizedQueryString:(NSDictionary *)parameters { - NSMutableString *mutableHTTPBodyString = [NSMutableString new]; - - NSArray *keys = [parameters allKeys]; - NSArray *sortedKeys = [keys sortedArrayUsingSelector:@selector(compare:)]; - for (NSUInteger index = 0; index < [sortedKeys count]; index++) { - NSString *key = [sortedKeys objectAtIndex:index]; - NSString *value = (NSString *)[parameters valueForKey:key]; - - [mutableHTTPBodyString appendString:[key aws_stringWithURLEncoding]]; - [mutableHTTPBodyString appendString:@"="]; - [mutableHTTPBodyString appendString:[value aws_stringWithURLEncoding]]; - - if (index < [sortedKeys count] - 1) { - [mutableHTTPBodyString appendString:@"&"]; - } - } - - return mutableHTTPBodyString; -} - -// For SigV2 -+ (NSString *)getV2StringToSign:(NSMutableURLRequest *)request canonicalizedQueryString:(NSString *)canonicalizedQueryString { - NSString *host = [request.URL host]; - NSString *path = [request.URL path]; - - if (nil == path || [path length] < 1) { - path = @"/"; - } - - NSString *stringToSign = [NSString stringWithFormat:@"%@\n%@\n%@\n%@", - request.HTTPMethod, - host, - path, - canonicalizedQueryString]; - return stringToSign; -} - -@end - -#pragma mark - AWSSignatureV2Signer - -@interface AWSSignatureV2Signer() - -@property (nonatomic, strong) AWSEndpoint *endpoint; - -@end - -@implementation AWSSignatureV2Signer - -+ (instancetype)signerWithCredentialsProvider:(id)credentialsProvider - endpoint:(AWSEndpoint *)endpoint { - AWSSignatureV2Signer *signer = [[AWSSignatureV2Signer alloc] initWithCredentialsProvider:credentialsProvider - endpoint:endpoint]; - return signer; -} - -- (instancetype)initWithCredentialsProvider:(id)credentialsProvider - endpoint:(AWSEndpoint *)endpoint { - if (self = [super init]) { - _credentialsProvider = credentialsProvider; - _endpoint = endpoint; - } - - return self; -} - -- (AWSTask *)interceptRequest:(NSMutableURLRequest *)request { - return [[self.credentialsProvider credentials] continueWithSuccessBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCredentials *credentials = task.result; - - NSString *HTTPBodyString = [[NSString alloc] initWithData:request.HTTPBody - encoding:NSUTF8StringEncoding]; - NSMutableDictionary *parameters = [NSMutableDictionary new]; - [[HTTPBodyString componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"&"]] enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { - NSArray *parameter = [obj componentsSeparatedByCharactersInSet:[NSCharacterSet characterSetWithCharactersInString:@"="]]; - [parameters setValue:parameter[1] forKey:parameter[0]]; - }]; - - [parameters setObject:@"HmacSHA256" forKey:@"SignatureMethod"]; - [parameters setObject:@"2" forKey:@"SignatureVersion"]; - [parameters setObject:credentials.accessKey forKey:@"AWSAccessKeyId"]; - [parameters setObject:[[NSDate aws_clockSkewFixedDate] aws_stringValue:AWSDateISO8601DateFormat3] - forKey:@"Timestamp"]; - //Added SecurityToken field in QueryString for SigV2 if STS has been used. - if (credentials.sessionKey) { - [parameters setObject:credentials.sessionKey forKey:@"SecurityToken"]; - } - - NSMutableString *canonicalizedQueryString = [[AWSSignatureV4Signer canonicalizedQueryString:parameters] mutableCopy]; - NSData *dataToSign = [[AWSSignatureV4Signer getV2StringToSign:request - canonicalizedQueryString:canonicalizedQueryString] dataUsingEncoding:NSUTF8StringEncoding]; - NSString *signature = [AWSSignatureSignerUtility HMACSign:dataToSign - withKey:credentials.secretKey - usingAlgorithm:kCCHmacAlgSHA256]; - [canonicalizedQueryString appendFormat:@"&Signature=%@", [signature aws_stringWithURLEncoding]]; - request.HTTPBody = [canonicalizedQueryString dataUsingEncoding:NSUTF8StringEncoding]; - - return nil; - }]; -} - -@end - -#pragma mark - S3ChunkedEncodingInputStream - -static NSUInteger defaultChunkSize = 32 * 1024 - 91; -static NSString *const emptyStringSha256 = @"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - -@interface AWSS3ChunkedEncodingInputStream() - -// original input stream -@property (nonatomic, strong) NSInputStream *stream; - -// buffer for chunked data plus header -@property (nonatomic, strong) NSMutableData *chunkData; - -// Mark the location of chunkData to be read -@property (nonatomic, assign) NSUInteger location; - -// A flag indicates end of stream -@property (nonatomic, assign) BOOL endOfStream; - -// SigV4 related properties -// Date, used in signing -@property (nonatomic, strong) NSDate *date; - -// Keypath/Scope -@property (nonatomic, strong) NSString *scope; - -// Signature of previous chunk. It's initialized as that of headers. -@property (nonatomic, strong) NSString *priorSha256; - -// SigV4 signing key -@property (nonatomic, strong) NSData *kSigning; - -@end - -@implementation AWSS3ChunkedEncodingInputStream - -@synthesize delegate = _delegate; - -- (instancetype)initWithInputStream:(NSInputStream *)stream - date:(NSDate *)date - scope:(NSString *)scope - kSigning:(NSData *)kSigning - headerSignature:(NSString *)headerSignature { - if (self = [super init]) { - _stream = stream; - _stream.delegate = self; - _date = [date copy]; - _scope = [scope copy]; - _kSigning = [kSigning copy]; - _priorSha256 = [headerSignature copy]; - - // Chunk size plus signature header - NSUInteger chunkSize = defaultChunkSize + [AWSS3ChunkedEncodingInputStream oneChunkedDataSize:defaultChunkSize]; - _chunkData = [[NSMutableData alloc] initWithCapacity:chunkSize]; - } - - return self; -} - -- (void)stream:(NSStream *)aStream handleEvent:(NSStreamEvent)eventCode { - if ((eventCode & (1 << 4))) { - // toggle the NSStreamEventEndEncountered bit. - eventCode ^= 1 << 4; - } - if ([self.delegate respondsToSelector:@selector(stream:handleEvent:)]) { - [self.delegate stream:self handleEvent:eventCode]; - } -} - -// Read next chunk of data from stream, and sign the chunk. -// Returns YES on a successful read, NO otherwise. -- (BOOL)nextChunk { - if (self.endOfStream) { - return NO; - } - - // clear current chunkData for next chunk - [self.chunkData setLength:0]; - - uint8_t *chunkBuffer = calloc(defaultChunkSize, sizeof(uint8_t)); - NSInteger read = [self.stream read:chunkBuffer maxLength:defaultChunkSize]; - - // mark end of stream if no data is read - self.endOfStream = (read <= 0); - - // return NO if stream read failed - if (read < 0) { - free(chunkBuffer); - AWSDDLogError(@"stream read failed streamStatus: %lu streamError: %@", (unsigned long)[self.stream streamStatus], [self.stream streamError].description); - return NO; - } - - NSData *data = [NSData dataWithBytesNoCopy:chunkBuffer length:read]; - [self.chunkData appendData:[self getSignedChunk:data]]; - - AWSDDLogVerbose(@"stream read: %ld, chunk size: %lu", (long)read, (unsigned long)[self.chunkData length]); - - return YES; -} - -// Signs data -- (NSData *)getSignedChunk:(NSData *)data { - NSString *chunkSha256 = [self dataToHexString:[AWSSignatureSignerUtility hash:data]]; - NSString *stringToSign = [NSString stringWithFormat: - @"%@\n%@\n%@\n%@\n%@\n%@", - @"AWS4-HMAC-SHA256-PAYLOAD", - [self.date aws_stringValue:AWSDateISO8601DateFormat2], - self.scope, - self.priorSha256, - emptyStringSha256, - chunkSha256]; - AWSDDLogVerbose(@"AWS4 String to Sign: [%@]", stringToSign); - - NSData *signature = [AWSSignatureSignerUtility sha256HMacWithData:[stringToSign dataUsingEncoding:NSUTF8StringEncoding] - withKey:self.kSigning]; - self.priorSha256 = [self dataToHexString:signature]; - NSString *chunkedHeader = [NSString stringWithFormat:@"%06lx;chunk-signature=%@\r\n", (unsigned long)[data length], self.priorSha256]; - AWSDDLogVerbose(@"AWS4 Chunked Header: [%@]", chunkedHeader); - - NSMutableData *signedChunk = [NSMutableData data]; - [signedChunk appendData:[chunkedHeader dataUsingEncoding:NSUTF8StringEncoding]]; - [signedChunk appendData:data]; - [signedChunk appendData:[@"\r\n" dataUsingEncoding:NSUTF8StringEncoding]]; - - self.totalLengthOfChunkSignatureSent += [AWSS3ChunkedEncodingInputStream oneChunkedDataSize:0]; - return signedChunk; -} - -- (NSString *)dataToHexString:(NSData *) data { - return [AWSSignatureSignerUtility hexEncode:[[NSString alloc] initWithData:data - encoding:NSASCIIStringEncoding]]; -} - -#pragma mark NSInputStream methods - -- (NSInteger)read:(uint8_t *)buffer maxLength:(NSUInteger)len { - //change the defaultChunkSize according to caller reading capacity. - defaultChunkSize = len - [AWSS3ChunkedEncodingInputStream oneChunkedDataSize:0]; - // check whether there is data available - if ([self.chunkData length] <= self.location) { - // set up next chunk - if ([self nextChunk]) { - // rewind location - self.location = 0; - } else { - return 0; - } - } - - // compute how many bytes to read from chunk - NSUInteger length = MIN(len, [self.chunkData length] - self.location); - NSRange range = {self.location, length}; - [self.chunkData getBytes:(void *)buffer range:range]; - - // Update location - self.location += length; - - return length; -} - -- (BOOL)hasBytesAvailable { - return !self.endOfStream; -} - -- (BOOL)getBuffer:(uint8_t **)buffer length:(NSUInteger *)len { - return NO; -} - -- (void)open { - [self.stream open]; -} - -- (void)close { - [self.stream close]; -} - -- (void)setDelegate:(id)delegate { - if (delegate == nil) { - _delegate = self; - } else { - _delegate = delegate; - } -} - -- (void)scheduleInRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { - [self.stream scheduleInRunLoop:aRunLoop forMode:mode]; -} - -- (void)removeFromRunLoop:(NSRunLoop *)aRunLoop forMode:(NSString *)mode { - [self.stream removeFromRunLoop:aRunLoop forMode:mode]; -} - -- (id)propertyForKey:(NSString *)key { - return [self.stream propertyForKey:key]; -} - -- (BOOL)setProperty:(id)property forKey:(NSString *)key { - return [self.stream setProperty:property forKey:key]; -} - -- (NSStreamStatus)streamStatus { - if ([self.stream streamStatus] == NSStreamStatusAtEnd) { - if (self.endOfStream) { - return [self.stream streamStatus]; - } else { - return NSStreamStatusOpen; - } - } else { - return [self.stream streamStatus]; - } -} - -- (NSError *)streamError { - return [self.stream streamError]; -} - -- (NSMethodSignature *)methodSignatureForSelector:(SEL)aSelector { - return [self.stream methodSignatureForSelector:aSelector]; -} - -- (void)forwardInvocation:(NSInvocation *)anInvocation { - [anInvocation invokeWithTarget:self.stream]; -} - -/** - * Computes the size of one data chunk - * - * ;chunk-signature=\r\n - * \r\n - **/ -+ (NSUInteger)oneChunkedDataSize:(NSUInteger)dataLength { - return [[NSString stringWithFormat:@"%06lx;chunk-signature=%@\r\n", (unsigned long)dataLength, emptyStringSha256] length] + dataLength + [@"\r\n" length]; -} - -+ (NSUInteger)computeContentLengthForChunkedData:(NSUInteger)dataLength { - NSUInteger result = 0; - - // length of full chunks - result += (dataLength / defaultChunkSize) * [AWSS3ChunkedEncodingInputStream oneChunkedDataSize:defaultChunkSize]; - - // length of remaining data - NSUInteger remainingDataLength = dataLength % defaultChunkSize; - if (remainingDataLength > 0) { - result += [AWSS3ChunkedEncodingInputStream oneChunkedDataSize:remainingDataLength]; - } - - // length of final chunk - result += [AWSS3ChunkedEncodingInputStream oneChunkedDataSize:0]; - - return result; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSBolts.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSBolts.h deleted file mode 100644 index ce6e420..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSBolts.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSCancellationToken.h" -#import "AWSCancellationTokenRegistration.h" -#import "AWSCancellationTokenSource.h" -#import "AWSExecutor.h" -#import "AWSGeneric.h" -#import "AWSTask.h" -#import "AWSTaskCompletionSource.h" - - -NS_ASSUME_NONNULL_BEGIN - -/** - A string containing the version of the Bolts Framework used by the current application. - */ -extern NSString *const AWSBoltsFrameworkVersionString; - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSBolts.m b/demo/Pods/AWSCore/AWSCore/Bolts/AWSBolts.m deleted file mode 100644 index 2db5d7b..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSBolts.m +++ /dev/null @@ -1,17 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSBolts.h" - -NS_ASSUME_NONNULL_BEGIN - -NSString *const AWSBoltsFrameworkVersionString = @"1.8.4"; - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationToken.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationToken.h deleted file mode 100644 index 9b49629..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationToken.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -#import "AWSCancellationTokenRegistration.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! - A block that will be called when a token is cancelled. - */ -typedef void(^AWSCancellationBlock)(void); - -/*! - The consumer view of a CancellationToken. - Propagates notification that operations should be canceled. - A AWSCancellationToken has methods to inspect whether the token has been cancelled. - */ -@interface AWSCancellationToken : NSObject - -/*! - Whether cancellation has been requested for this token source. - */ -@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested; - -/*! - Register a block to be notified when the token is cancelled. - If the token is already cancelled the delegate will be notified immediately. - */ -- (AWSCancellationTokenRegistration *)registerCancellationObserverWithBlock:(AWSCancellationBlock)block; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationToken.m b/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationToken.m deleted file mode 100644 index e32b669..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationToken.m +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSCancellationToken.h" -#import "AWSCancellationTokenRegistration.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSCancellationToken () - -@property (nullable, nonatomic, strong) NSMutableArray *registrations; -@property (nonatomic, strong) NSObject *lock; -@property (nonatomic) BOOL disposed; - -@end - -@interface AWSCancellationTokenRegistration (AWSCancellationToken) - -+ (instancetype)registrationWithToken:(AWSCancellationToken *)token delegate:(AWSCancellationBlock)delegate; - -- (void)notifyDelegate; - -@end - -@implementation AWSCancellationToken - -@synthesize cancellationRequested = _cancellationRequested; - -#pragma mark - Initializer - -- (instancetype)init { - self = [super init]; - if (!self) return self; - - _registrations = [NSMutableArray array]; - _lock = [NSObject new]; - - return self; -} - -#pragma mark - Custom Setters/Getters - -- (BOOL)isCancellationRequested { - @synchronized(self.lock) { - [self throwIfDisposed]; - return _cancellationRequested; - } -} - -- (void)cancel { - NSArray *registrations; - @synchronized(self.lock) { - [self throwIfDisposed]; - if (_cancellationRequested) { - return; - } - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancelPrivate) object:nil]; - _cancellationRequested = YES; - registrations = [self.registrations copy]; - } - - [self notifyCancellation:registrations]; -} - -- (void)notifyCancellation:(NSArray *)registrations { - for (AWSCancellationTokenRegistration *registration in registrations) { - [registration notifyDelegate]; - } -} - -- (AWSCancellationTokenRegistration *)registerCancellationObserverWithBlock:(AWSCancellationBlock)block { - @synchronized(self.lock) { - AWSCancellationTokenRegistration *registration = [AWSCancellationTokenRegistration registrationWithToken:self delegate:[block copy]]; - [self.registrations addObject:registration]; - - return registration; - } -} - -- (void)unregisterRegistration:(AWSCancellationTokenRegistration *)registration { - @synchronized(self.lock) { - [self throwIfDisposed]; - [self.registrations removeObject:registration]; - } -} - -// Delay on a non-public method to prevent interference with a user calling performSelector or -// cancelPreviousPerformRequestsWithTarget on the public method -- (void)cancelPrivate { - [self cancel]; -} - -- (void)cancelAfterDelay:(int)millis { - [self throwIfDisposed]; - if (millis < -1) { - [NSException raise:NSInvalidArgumentException format:@"Delay must be >= -1"]; - } - - if (millis == 0) { - [self cancel]; - return; - } - - @synchronized(self.lock) { - [self throwIfDisposed]; - [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(cancelPrivate) object:nil]; - if (self.cancellationRequested) { - return; - } - - if (millis != -1) { - double delay = (double)millis / 1000; - [self performSelector:@selector(cancelPrivate) withObject:nil afterDelay:delay]; - } - } -} - -- (void)dispose { - @synchronized(self.lock) { - if (self.disposed) { - return; - } - [self.registrations makeObjectsPerformSelector:@selector(dispose)]; - self.registrations = nil; - self.disposed = YES; - } -} - -- (void)throwIfDisposed { - if (self.disposed) { - [NSException raise:NSInternalInconsistencyException format:@"Object already disposed"]; - } -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenRegistration.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenRegistration.h deleted file mode 100644 index 2b158ba..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenRegistration.h +++ /dev/null @@ -1,29 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! - Represents the registration of a cancellation observer with a cancellation token. - Can be used to unregister the observer at a later time. - */ -@interface AWSCancellationTokenRegistration : NSObject - -/*! - Removes the cancellation observer registered with the token - and releases all resources associated with this registration. - */ -- (void)dispose; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenRegistration.m b/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenRegistration.m deleted file mode 100644 index 8f544c0..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenRegistration.m +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSCancellationTokenRegistration.h" - -#import "AWSCancellationToken.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSCancellationTokenRegistration () - -@property (nonatomic, weak) AWSCancellationToken *token; -@property (nullable, nonatomic, strong) AWSCancellationBlock cancellationObserverBlock; -@property (nonatomic, strong) NSObject *lock; -@property (nonatomic) BOOL disposed; - -@end - -@interface AWSCancellationToken (AWSCancellationTokenRegistration) - -- (void)unregisterRegistration:(AWSCancellationTokenRegistration *)registration; - -@end - -@implementation AWSCancellationTokenRegistration - -+ (instancetype)registrationWithToken:(AWSCancellationToken *)token delegate:(AWSCancellationBlock)delegate { - AWSCancellationTokenRegistration *registration = [AWSCancellationTokenRegistration new]; - registration.token = token; - registration.cancellationObserverBlock = delegate; - return registration; -} - -- (instancetype)init { - self = [super init]; - if (!self) return self; - - _lock = [NSObject new]; - - return self; -} - -- (void)dispose { - @synchronized(self.lock) { - if (self.disposed) { - return; - } - self.disposed = YES; - } - - AWSCancellationToken *token = self.token; - if (token != nil) { - [token unregisterRegistration:self]; - self.token = nil; - } - self.cancellationObserverBlock = nil; -} - -- (void)notifyDelegate { - @synchronized(self.lock) { - [self throwIfDisposed]; - self.cancellationObserverBlock(); - } -} - -- (void)throwIfDisposed { - NSAssert(!self.disposed, @"Object already disposed"); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenSource.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenSource.h deleted file mode 100644 index 8356299..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenSource.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -@class AWSCancellationToken; - -/*! - AWSCancellationTokenSource represents the producer side of a CancellationToken. - Signals to a CancellationToken that it should be canceled. - It is a cancellation token that also has methods - for changing the state of a token by cancelling it. - */ -@interface AWSCancellationTokenSource : NSObject - -/*! - Creates a new cancellation token source. - */ -+ (instancetype)cancellationTokenSource; - -/*! - The cancellation token associated with this CancellationTokenSource. - */ -@property (nonatomic, strong, readonly) AWSCancellationToken *token; - -/*! - Whether cancellation has been requested for this token source. - */ -@property (nonatomic, assign, readonly, getter=isCancellationRequested) BOOL cancellationRequested; - -/*! - Cancels the token if it has not already been cancelled. - */ -- (void)cancel; - -/*! - Schedules a cancel operation on this CancellationTokenSource after the specified number of milliseconds. - @param millis The number of milliseconds to wait before completing the returned task. - If delay is `0` the cancel is executed immediately. If delay is `-1` any scheduled cancellation is stopped. - */ -- (void)cancelAfterDelay:(int)millis; - -/*! - Releases all resources associated with this token source, - including disposing of all registrations. - */ -- (void)dispose; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenSource.m b/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenSource.m deleted file mode 100644 index cb2360f..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSCancellationTokenSource.m +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSCancellationTokenSource.h" - -#import "AWSCancellationToken.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSCancellationToken (AWSCancellationTokenSource) - -- (void)cancel; -- (void)cancelAfterDelay:(int)millis; - -- (void)dispose; -- (void)throwIfDisposed; - -@end - -@implementation AWSCancellationTokenSource - -#pragma mark - Initializer - -- (instancetype)init { - self = [super init]; - if (!self) return self; - - _token = [AWSCancellationToken new]; - - return self; -} - -+ (instancetype)cancellationTokenSource { - return [AWSCancellationTokenSource new]; -} - -#pragma mark - Custom Setters/Getters - -- (BOOL)isCancellationRequested { - return _token.isCancellationRequested; -} - -- (void)cancel { - [_token cancel]; -} - -- (void)cancelAfterDelay:(int)millis { - [_token cancelAfterDelay:millis]; -} - -- (void)dispose { - [_token dispose]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSExecutor.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSExecutor.h deleted file mode 100644 index e433400..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSExecutor.h +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! - An object that can run a given block. - */ -@interface AWSExecutor : NSObject - -/*! - Returns a default executor, which runs continuations immediately until the call stack gets too - deep, then dispatches to a new GCD queue. - */ -+ (instancetype)defaultExecutor; - -/*! - Returns an executor that runs continuations on the thread where the previous task was completed. - */ -+ (instancetype)immediateExecutor; - -/*! - Returns an executor that runs continuations on the main thread. - */ -+ (instancetype)mainThreadExecutor; - -/*! - Returns a new executor that uses the given block to execute continuations. - @param block The block to use. - */ -+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block; - -/*! - Returns a new executor that runs continuations on the given queue. - @param queue The instance of `dispatch_queue_t` to dispatch all continuations onto. - */ -+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue; - -/*! - Returns a new executor that runs continuations on the given queue. - @param queue The instance of `NSOperationQueue` to run all continuations on. - */ -+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue; - -/*! - Runs the given block using this executor's particular strategy. - @param block The block to execute. - */ -- (void)execute:(void(^)(void))block; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSExecutor.m b/demo/Pods/AWSCore/AWSCore/Bolts/AWSExecutor.m deleted file mode 100644 index c9aaca7..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSExecutor.m +++ /dev/null @@ -1,136 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSExecutor.h" - -#import - -NS_ASSUME_NONNULL_BEGIN - -/*! - Get the remaining stack-size of the current thread. - - @param totalSize The total stack size of the current thread. - - @return The remaining size, in bytes, available to the current thread. - - @note This function cannot be inlined, as otherwise the internal implementation could fail to report the proper - remaining stack space. - */ -__attribute__((noinline)) static size_t remaining_stack_size(size_t *restrict totalSize) { - pthread_t currentThread = pthread_self(); - - // NOTE: We must store stack pointers as uint8_t so that the pointer math is well-defined - uint8_t *endStack = pthread_get_stackaddr_np(currentThread); - *totalSize = pthread_get_stacksize_np(currentThread); - - // NOTE: If the function is inlined, this value could be incorrect - uint8_t *frameAddr = __builtin_frame_address(0); - - return (*totalSize) - (size_t)(endStack - frameAddr); -} - -@interface AWSExecutor () - -@property (nonatomic, copy) void(^block)(void(^block)(void)); - -@end - -@implementation AWSExecutor - -#pragma mark - Executor methods - -+ (instancetype)defaultExecutor { - static AWSExecutor *defaultExecutor = NULL; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - defaultExecutor = [self executorWithBlock:^void(void(^block)(void)) { - // We prefer to run everything possible immediately, so that there is callstack information - // when debugging. However, we don't want the stack to get too deep, so if the remaining stack space - // is less than 10% of the total space, we dispatch to another GCD queue. - size_t totalStackSize = 0; - size_t remainingStackSize = remaining_stack_size(&totalStackSize); - - if (remainingStackSize < (totalStackSize / 10)) { - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), block); - } else { - @autoreleasepool { - block(); - } - } - }]; - }); - return defaultExecutor; -} - -+ (instancetype)immediateExecutor { - static AWSExecutor *immediateExecutor = NULL; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - immediateExecutor = [self executorWithBlock:^void(void(^block)(void)) { - block(); - }]; - }); - return immediateExecutor; -} - -+ (instancetype)mainThreadExecutor { - static AWSExecutor *mainThreadExecutor = NULL; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - mainThreadExecutor = [self executorWithBlock:^void(void(^block)(void)) { - if (![NSThread isMainThread]) { - dispatch_async(dispatch_get_main_queue(), block); - } else { - @autoreleasepool { - block(); - } - } - }]; - }); - return mainThreadExecutor; -} - -+ (instancetype)executorWithBlock:(void(^)(void(^block)(void)))block { - return [[self alloc] initWithBlock:block]; -} - -+ (instancetype)executorWithDispatchQueue:(dispatch_queue_t)queue { - return [self executorWithBlock:^void(void(^block)(void)) { - dispatch_async(queue, block); - }]; -} - -+ (instancetype)executorWithOperationQueue:(NSOperationQueue *)queue { - return [self executorWithBlock:^void(void(^block)(void)) { - [queue addOperation:[NSBlockOperation blockOperationWithBlock:block]]; - }]; -} - -#pragma mark - Initializer - -- (instancetype)initWithBlock:(void(^)(void(^block)(void)))block { - self = [super init]; - if (!self) return self; - - _block = block; - - return self; -} - -#pragma mark - Execution - -- (void)execute:(void(^)(void))block { - self.block(block); -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSGeneric.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSGeneric.h deleted file mode 100644 index c007032..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSGeneric.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -#pragma once - -/** - This exists to use along with `AWSTask` and `AWSTaskCompletionSource`. - - Instead of returning a `AWSTask` with no generic type, or a generic type of 'NSNull' - when there is no usable result from a task, we use the type 'AWSVoid', which will always have a value of `nil`. - - This allows you to provide a more enforced API contract to the caller, - as sending any message to `AWSVoid` will result in a compile time error. - */ -@class _AWSVoid_Nonexistant; -typedef _AWSVoid_Nonexistant *AWSVoid; diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTask.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSTask.h deleted file mode 100644 index 3e7cf4a..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTask.h +++ /dev/null @@ -1,266 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -#import "AWSCancellationToken.h" -#import "AWSGeneric.h" - -NS_ASSUME_NONNULL_BEGIN - -/*! - Error domain used if there was multiple errors on . - */ -extern NSString *const AWSTaskErrorDomain; - -/*! - An error code used for , if there were multiple errors. - */ -extern NSInteger const kAWSMultipleErrorsError; - -/*! - An error userInfo key used if there were multiple errors on . - Value type is `NSArray *`. - */ -extern NSString *const AWSTaskMultipleErrorsUserInfoKey; - -@class AWSExecutor; -@class AWSTask; - -/*! - The consumer view of a Task. A AWSTask has methods to - inspect the state of the task, and to add continuations to - be run once the task is complete. - */ -@interface AWSTask<__covariant ResultType> : NSObject - -/*! - A block that can act as a continuation for a task. - */ -typedef __nullable id(^AWSContinuationBlock)(AWSTask *t); - -/*! - Creates a task that is already completed with the given result. - @param result The result for the task. - */ -+ (instancetype)taskWithResult:(nullable ResultType)result; - -/*! - Creates a task that is already completed with the given error. - @param error The error for the task. - */ -+ (instancetype)taskWithError:(NSError *)error; - -/*! - Creates a task that is already cancelled. - */ -+ (instancetype)cancelledTask; - -/*! - Returns a task that will be completed (with result == nil) once - all of the input tasks have completed. - @param tasks An `NSArray` of the tasks to use as an input. - */ -+ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray *)tasks; - -/*! - Returns a task that will be completed once all of the input tasks have completed. - If all tasks complete successfully without being faulted or cancelled the result will be - an `NSArray` of all task results in the order they were provided. - @param tasks An `NSArray` of the tasks to use as an input. - */ -+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray *)tasks; - -/*! - Returns a task that will be completed once there is at least one successful task. - The first task to successuly complete will set the result, all other tasks results are - ignored. - @param tasks An `NSArray` of the tasks to use as an input. - */ -+ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray *)tasks; - -/*! - Returns a task that will be completed a certain amount of time in the future. - @param millis The approximate number of milliseconds to wait before the - task will be finished (with result == nil). - */ -+ (AWSTask *)taskWithDelay:(int)millis; - -/*! - Returns a task that will be completed a certain amount of time in the future. - @param millis The approximate number of milliseconds to wait before the - task will be finished (with result == nil). - @param token The cancellation token (optional). - */ -+ (AWSTask *)taskWithDelay:(int)millis cancellationToken:(nullable AWSCancellationToken *)token; - -/*! - Returns a task that will be completed after the given block completes with - the specified executor. - @param executor A AWSExecutor responsible for determining how the - continuation block will be run. - @param block The block to immediately schedule to run with the given executor. - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -+ (instancetype)taskFromExecutor:(AWSExecutor *)executor withBlock:(nullable id (^)(void))block; - -// Properties that will be set on the task once it is completed. - -/*! - The result of a successful task. - */ -@property (nullable, nonatomic, strong, readonly) ResultType result; - -/*! - The error of a failed task. - */ -@property (nullable, nonatomic, strong, readonly) NSError *error; - -/*! - Whether this task has been cancelled. - */ -@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled; - -/*! - Whether this task has completed due to an error. - */ -@property (nonatomic, assign, readonly, getter=isFaulted) BOOL faulted; - -/*! - Whether this task has completed. - */ -@property (nonatomic, assign, readonly, getter=isCompleted) BOOL completed; - -/*! - Enqueues the given block to be run once this task is complete. - This method uses a default execution strategy. The block will be - run on the thread where the previous task completes, unless the - stack depth is too deep, in which case it will be run on a - dispatch queue with default priority. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueWith(block:)); - -/*! - Enqueues the given block to be run once this task is complete. - This method uses a default execution strategy. The block will be - run on the thread where the previous task completes, unless the - stack depth is too deep, in which case it will be run on a - dispatch queue with default priority. - @param block The block to be run once this task is complete. - @param cancellationToken The cancellation token (optional). - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithBlock:(AWSContinuationBlock)block - cancellationToken:(nullable AWSCancellationToken *)cancellationToken NS_SWIFT_NAME(continueWith(block:cancellationToken:)); - -/*! - Enqueues the given block to be run once this task is complete. - @param executor A AWSExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor - withBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueWith(executor:block:)); - -/*! - Enqueues the given block to be run once this task is complete. - @param executor A AWSExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @param cancellationToken The cancellation token (optional). - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - his method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor - block:(AWSContinuationBlock)block - cancellationToken:(nullable AWSCancellationToken *)cancellationToken -NS_SWIFT_NAME(continueWith(executor:block:cancellationToken:)); - -/*! - Identical to continueWithBlock:, except that the block is only run - if this task did not produce a cancellation or an error. - If it did, then the failure will be propagated to the returned - task. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithSuccessBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(block:)); - -/*! - Identical to continueWithBlock:, except that the block is only run - if this task did not produce a cancellation or an error. - If it did, then the failure will be propagated to the returned - task. - @param block The block to be run once this task is complete. - @param cancellationToken The cancellation token (optional). - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithSuccessBlock:(AWSContinuationBlock)block - cancellationToken:(nullable AWSCancellationToken *)cancellationToken -NS_SWIFT_NAME(continueOnSuccessWith(block:cancellationToken:)); - -/*! - Identical to continueWithExecutor:withBlock:, except that the block - is only run if this task did not produce a cancellation, error, or an error. - If it did, then the failure will be propagated to the returned task. - @param executor A AWSExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor - withSuccessBlock:(AWSContinuationBlock)block NS_SWIFT_NAME(continueOnSuccessWith(executor:block:)); - -/*! - Identical to continueWithExecutor:withBlock:, except that the block - is only run if this task did not produce a cancellation or an error. - If it did, then the failure will be propagated to the returned task. - @param executor A AWSExecutor responsible for determining how the - continuation block will be run. - @param block The block to be run once this task is complete. - @param cancellationToken The cancellation token (optional). - @returns A task that will be completed after block has run. - If block returns a AWSTask, then the task returned from - this method will not be completed until that task is completed. - */ -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor - successBlock:(AWSContinuationBlock)block - cancellationToken:(nullable AWSCancellationToken *)cancellationToken -NS_SWIFT_NAME(continueOnSuccessWith(executor:block:cancellationToken:)); - -/*! - Waits until this operation is completed. - This method is inefficient and consumes a thread resource while - it's running. It should be avoided. This method logs a warning - message if it is used on the main thread. - */ -- (void)waitUntilFinished; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTask.m b/demo/Pods/AWSCore/AWSCore/Bolts/AWSTask.m deleted file mode 100644 index b668d1f..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTask.m +++ /dev/null @@ -1,465 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSTask.h" - -#import - -#import "AWSBolts.h" - -NS_ASSUME_NONNULL_BEGIN - -__attribute__ ((noinline)) void awsbf_warnBlockingOperationOnMainThread() { - NSLog(@"Warning: A long-running operation is being executed on the main thread. \n" - " Break on awsbf_warnBlockingOperationOnMainThread() to debug."); -} - -NSString *const AWSTaskErrorDomain = @"bolts"; -NSInteger const kAWSMultipleErrorsError = 80175001; - -NSString *const AWSTaskMultipleErrorsUserInfoKey = @"errors"; - -@interface AWSTask () { - id _result; - NSError *_error; -} - -@property (nonatomic, assign, readwrite, getter=isCancelled) BOOL cancelled; -@property (nonatomic, assign, readwrite, getter=isFaulted) BOOL faulted; -@property (nonatomic, assign, readwrite, getter=isCompleted) BOOL completed; - -@property (nonatomic, strong) NSObject *lock; -@property (nonatomic, strong) NSCondition *condition; -@property (nonatomic, strong) NSMutableArray *callbacks; - -@end - -@implementation AWSTask - -#pragma mark - Initializer - -- (instancetype)init { - self = [super init]; - if (!self) return self; - - _lock = [[NSObject alloc] init]; - _condition = [[NSCondition alloc] init]; - _callbacks = [NSMutableArray array]; - - return self; -} - -- (instancetype)initWithResult:(nullable id)result { - self = [super init]; - if (!self) return self; - - [self trySetResult:result]; - - return self; -} - -- (instancetype)initWithError:(NSError *)error { - self = [super init]; - if (!self) return self; - - [self trySetError:error]; - - return self; -} - -- (instancetype)initCancelled { - self = [super init]; - if (!self) return self; - - [self trySetCancelled]; - - return self; -} - -#pragma mark - Task Class methods - -+ (instancetype)taskWithResult:(nullable id)result { - return [[self alloc] initWithResult:result]; -} - -+ (instancetype)taskWithError:(NSError *)error { - return [[self alloc] initWithError:error]; -} - -+ (instancetype)cancelledTask { - return [[self alloc] initCancelled]; -} - -+ (instancetype)taskForCompletionOfAllTasks:(nullable NSArray *)tasks { - __block int32_t total = (int32_t)tasks.count; - if (total == 0) { - return [self taskWithResult:nil]; - } - - __block int32_t cancelled = 0; - NSObject *lock = [[NSObject alloc] init]; - NSMutableArray *errors = [NSMutableArray array]; - - AWSTaskCompletionSource *tcs = [AWSTaskCompletionSource taskCompletionSource]; - for (AWSTask *task in tasks) { - [task continueWithBlock:^id(AWSTask *t) { - if (t.error) { - @synchronized (lock) { - [errors addObject:t.error]; - } - } else if (t.cancelled) { - OSAtomicIncrement32Barrier(&cancelled); - } - - if (OSAtomicDecrement32Barrier(&total) == 0) { - if (errors.count > 0) { - if (errors.count == 1) { - tcs.error = [errors firstObject]; - } else { - NSError *error = [NSError errorWithDomain:AWSTaskErrorDomain - code:kAWSMultipleErrorsError - userInfo:@{ AWSTaskMultipleErrorsUserInfoKey: errors }]; - tcs.error = error; - } - } else if (cancelled > 0) { - [tcs cancel]; - } else { - tcs.result = nil; - } - } - return nil; - }]; - } - return tcs.task; -} - -+ (instancetype)taskForCompletionOfAllTasksWithResults:(nullable NSArray *)tasks { - return [[self taskForCompletionOfAllTasks:tasks] continueWithSuccessBlock:^id(AWSTask * __unused task) { - return [tasks valueForKey:@"result"]; - }]; -} - -+ (instancetype)taskForCompletionOfAnyTask:(nullable NSArray *)tasks -{ - __block int32_t total = (int32_t)tasks.count; - if (total == 0) { - return [self taskWithResult:nil]; - } - - __block int completed = 0; - __block int32_t cancelled = 0; - - NSObject *lock = [NSObject new]; - NSMutableArray *errors = [NSMutableArray new]; - - AWSTaskCompletionSource *source = [AWSTaskCompletionSource taskCompletionSource]; - for (AWSTask *task in tasks) { - [task continueWithBlock:^id(AWSTask *t) { - if (t.error != nil) { - @synchronized(lock) { - [errors addObject:t.error]; - } - } else if (t.cancelled) { - OSAtomicIncrement32Barrier(&cancelled); - } else { - if(OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) { - [source setResult:t.result]; - } - } - - if (OSAtomicDecrement32Barrier(&total) == 0 && - OSAtomicCompareAndSwap32Barrier(0, 1, &completed)) { - if (cancelled > 0) { - [source cancel]; - } else if (errors.count > 0) { - if (errors.count == 1) { - source.error = errors.firstObject; - } else { - NSError *error = [NSError errorWithDomain:AWSTaskErrorDomain - code:kAWSMultipleErrorsError - userInfo:@{ @"errors": errors }]; - source.error = error; - } - } - } - // Abort execution of per tasks continuations - return nil; - }]; - } - return source.task; -} - - -+ (AWSTask *)taskWithDelay:(int)millis { - AWSTaskCompletionSource *tcs = [AWSTaskCompletionSource taskCompletionSource]; - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, millis * NSEC_PER_MSEC); - dispatch_after(popTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){ - tcs.result = nil; - }); - return tcs.task; -} - -+ (AWSTask *)taskWithDelay:(int)millis cancellationToken:(nullable AWSCancellationToken *)token { - if (token.cancellationRequested) { - return [AWSTask cancelledTask]; - } - - AWSTaskCompletionSource *tcs = [AWSTaskCompletionSource taskCompletionSource]; - dispatch_time_t popTime = dispatch_time(DISPATCH_TIME_NOW, millis * NSEC_PER_MSEC); - dispatch_after(popTime, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void){ - if (token.cancellationRequested) { - [tcs cancel]; - return; - } - tcs.result = nil; - }); - return tcs.task; -} - -+ (instancetype)taskFromExecutor:(AWSExecutor *)executor withBlock:(nullable id (^)(void))block { - return [[self taskWithResult:nil] continueWithExecutor:executor withBlock:^id(AWSTask *task) { - return block(); - }]; -} - -#pragma mark - Custom Setters/Getters - -- (nullable id)result { - @synchronized(self.lock) { - return _result; - } -} - -- (BOOL)trySetResult:(nullable id)result { - @synchronized(self.lock) { - if (self.completed) { - return NO; - } - self.completed = YES; - _result = result; - [self runContinuations]; - return YES; - } -} - -- (nullable NSError *)error { - @synchronized(self.lock) { - return _error; - } -} - -- (BOOL)trySetError:(NSError *)error { - @synchronized(self.lock) { - if (self.completed) { - return NO; - } - self.completed = YES; - self.faulted = YES; - _error = error; - [self runContinuations]; - return YES; - } -} - -- (BOOL)isCancelled { - @synchronized(self.lock) { - return _cancelled; - } -} - -- (BOOL)isFaulted { - @synchronized(self.lock) { - return _faulted; - } -} - -- (BOOL)trySetCancelled { - @synchronized(self.lock) { - if (self.completed) { - return NO; - } - self.completed = YES; - self.cancelled = YES; - [self runContinuations]; - return YES; - } -} - -- (BOOL)isCompleted { - @synchronized(self.lock) { - return _completed; - } -} - -- (void)runContinuations { - @synchronized(self.lock) { - [self.condition lock]; - [self.condition broadcast]; - [self.condition unlock]; - for (void (^callback)(void) in self.callbacks) { - callback(); - } - [self.callbacks removeAllObjects]; - } -} - -#pragma mark - Chaining methods - -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor withBlock:(AWSContinuationBlock)block { - return [self continueWithExecutor:executor block:block cancellationToken:nil]; -} - -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor - block:(AWSContinuationBlock)block - cancellationToken:(nullable AWSCancellationToken *)cancellationToken { - AWSTaskCompletionSource *tcs = [AWSTaskCompletionSource taskCompletionSource]; - - // Capture all of the state that needs to used when the continuation is complete. - dispatch_block_t executionBlock = ^{ - if (cancellationToken.cancellationRequested) { - [tcs cancel]; - return; - } - - id result = block(self); - if ([result isKindOfClass:[AWSTask class]]) { - - id (^setupWithTask) (AWSTask *) = ^id(AWSTask *task) { - if (cancellationToken.cancellationRequested || task.cancelled) { - [tcs cancel]; - } else if (task.error) { - tcs.error = task.error; - } else { - tcs.result = task.result; - } - return nil; - }; - - AWSTask *resultTask = (AWSTask *)result; - - if (resultTask.completed) { - setupWithTask(resultTask); - } else { - [resultTask continueWithBlock:setupWithTask]; - } - - } else { - tcs.result = result; - } - }; - - BOOL completed; - @synchronized(self.lock) { - completed = self.completed; - if (!completed) { - [self.callbacks addObject:[^{ - [executor execute:executionBlock]; - } copy]]; - } - } - if (completed) { - [executor execute:executionBlock]; - } - - return tcs.task; -} - -- (AWSTask *)continueWithBlock:(AWSContinuationBlock)block { - return [self continueWithExecutor:[AWSExecutor defaultExecutor] block:block cancellationToken:nil]; -} - -- (AWSTask *)continueWithBlock:(AWSContinuationBlock)block cancellationToken:(nullable AWSCancellationToken *)cancellationToken { - return [self continueWithExecutor:[AWSExecutor defaultExecutor] block:block cancellationToken:cancellationToken]; -} - -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor - withSuccessBlock:(AWSContinuationBlock)block { - return [self continueWithExecutor:executor successBlock:block cancellationToken:nil]; -} - -- (AWSTask *)continueWithExecutor:(AWSExecutor *)executor - successBlock:(AWSContinuationBlock)block - cancellationToken:(nullable AWSCancellationToken *)cancellationToken { - if (cancellationToken.cancellationRequested) { - return [AWSTask cancelledTask]; - } - - return [self continueWithExecutor:executor block:^id(AWSTask *task) { - if (task.faulted || task.cancelled) { - return task; - } else { - return block(task); - } - } cancellationToken:cancellationToken]; -} - -- (AWSTask *)continueWithSuccessBlock:(AWSContinuationBlock)block { - return [self continueWithExecutor:[AWSExecutor defaultExecutor] successBlock:block cancellationToken:nil]; -} - -- (AWSTask *)continueWithSuccessBlock:(AWSContinuationBlock)block cancellationToken:(nullable AWSCancellationToken *)cancellationToken { - return [self continueWithExecutor:[AWSExecutor defaultExecutor] successBlock:block cancellationToken:cancellationToken]; -} - -#pragma mark - Syncing Task (Avoid it) - -- (void)warnOperationOnMainThread { - awsbf_warnBlockingOperationOnMainThread(); -} - -- (void)waitUntilFinished { - if ([NSThread isMainThread]) { - [self warnOperationOnMainThread]; - } - - @synchronized(self.lock) { - if (self.completed) { - return; - } - [self.condition lock]; - } - // TODO: (nlutsenko) Restructure this to use Bolts-Swift thread access synchronization architecture - // In the meantime, it's absolutely safe to get `_completed` aka an ivar, as long as it's a `BOOL` aka less than word size. - while (!_completed) { - [self.condition wait]; - } - [self.condition unlock]; -} - -#pragma mark - NSObject - -- (NSString *)description { - // Acquire the data from the locked properties - BOOL completed; - BOOL cancelled; - BOOL faulted; - NSString *resultDescription = nil; - - @synchronized(self.lock) { - completed = self.completed; - cancelled = self.cancelled; - faulted = self.faulted; - resultDescription = completed ? [NSString stringWithFormat:@" result = %@", self.result] : @""; - } - - // Description string includes status information and, if available, the - // result since in some ways this is what a promise actually "is". - return [NSString stringWithFormat:@"<%@: %p; completed = %@; cancelled = %@; faulted = %@;%@>", - NSStringFromClass([self class]), - self, - completed ? @"YES" : @"NO", - cancelled ? @"YES" : @"NO", - faulted ? @"YES" : @"NO", - resultDescription]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTaskCompletionSource.h b/demo/Pods/AWSCore/AWSCore/Bolts/AWSTaskCompletionSource.h deleted file mode 100644 index 5092e56..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTaskCompletionSource.h +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import - -NS_ASSUME_NONNULL_BEGIN - -@class AWSTask<__covariant ResultType>; - -/*! - A AWSTaskCompletionSource represents the producer side of tasks. - It is a task that also has methods for changing the state of the - task by settings its completion values. - */ -@interface AWSTaskCompletionSource<__covariant ResultType> : NSObject - -/*! - Creates a new unfinished task. - */ -+ (instancetype)taskCompletionSource; - -/*! - The task associated with this TaskCompletionSource. - */ -@property (nonatomic, strong, readonly) AWSTask *task; - -/*! - Completes the task by setting the result. - Attempting to set this for a completed task will raise an exception. - @param result The result of the task. - */ -- (void)setResult:(nullable ResultType)result NS_SWIFT_NAME(set(result:)); - -/*! - Completes the task by setting the error. - Attempting to set this for a completed task will raise an exception. - @param error The error for the task. - */ -- (void)setError:(NSError *)error NS_SWIFT_NAME(set(error:)); - -/*! - Completes the task by marking it as cancelled. - Attempting to set this for a completed task will raise an exception. - */ -- (void)cancel; - -/*! - Sets the result of the task if it wasn't already completed. - @returns whether the new value was set. - */ -- (BOOL)trySetResult:(nullable ResultType)result NS_SWIFT_NAME(trySet(result:)); - -/*! - Sets the error of the task if it wasn't already completed. - @param error The error for the task. - @returns whether the new value was set. - */ -- (BOOL)trySetError:(NSError *)error NS_SWIFT_NAME(trySet(error:)); - -/*! - Sets the cancellation state of the task if it wasn't already completed. - @returns whether the new value was set. - */ -- (BOOL)trySetCancelled; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTaskCompletionSource.m b/demo/Pods/AWSCore/AWSCore/Bolts/AWSTaskCompletionSource.m deleted file mode 100644 index 5feb22e..0000000 --- a/demo/Pods/AWSCore/AWSCore/Bolts/AWSTaskCompletionSource.m +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright (c) 2014, Facebook, Inc. - * All rights reserved. - * - * This source code is licensed under the BSD-style license found in the - * LICENSE file in the root directory of this source tree. An additional grant - * of patent rights can be found in the PATENTS file in the same directory. - * - */ - -#import "AWSTaskCompletionSource.h" - -#import "AWSTask.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSTask (AWSTaskCompletionSource) - -- (BOOL)trySetResult:(nullable id)result; -- (BOOL)trySetError:(NSError *)error; -- (BOOL)trySetCancelled; - -@end - -@implementation AWSTaskCompletionSource - -#pragma mark - Initializer - -+ (instancetype)taskCompletionSource { - return [[self alloc] init]; -} - -- (instancetype)init { - self = [super init]; - if (!self) return self; - - _task = [[AWSTask alloc] init]; - - return self; -} - -#pragma mark - Custom Setters/Getters - -- (void)setResult:(nullable id)result { - if (![self.task trySetResult:result]) { - [NSException raise:NSInternalInconsistencyException - format:@"Cannot set the result on a completed task."]; - } -} - -- (void)setError:(NSError *)error { - if (![self.task trySetError:error]) { - [NSException raise:NSInternalInconsistencyException - format:@"Cannot set the error on a completed task."]; - } -} - -- (void)cancel { - if (![self.task trySetCancelled]) { - [NSException raise:NSInternalInconsistencyException - format:@"Cannot cancel a completed task."]; - } -} - -- (BOOL)trySetResult:(nullable id)result { - return [self.task trySetResult:result]; -} - -- (BOOL)trySetError:(NSError *)error { - return [self.task trySetError:error]; -} - -- (BOOL)trySetCancelled { - return [self.task trySetCancelled]; -} - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity+Fabric.h b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity+Fabric.h deleted file mode 100644 index 0f492c4..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity+Fabric.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentity.h" -#import "FABKitProtocol.h" -#import "Fabric+FABKits.h" - -@interface AWSCognitoIdentity (Fabric) - -@end diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity+Fabric.m b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity+Fabric.m deleted file mode 100644 index b8604a2..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity+Fabric.m +++ /dev/null @@ -1,65 +0,0 @@ -// -// Copyright 2010-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// -#import "AWSCognitoIdentity+Fabric.h" - -@implementation AWSCognitoIdentity (Fabric) - -#pragma mark - Fabric - -+ (NSString *)bundleIdentifier { - return @"com.amazonaws.sdk.ios.AWSCognitoIdentity"; -} - -+ (NSString *)kitDisplayVersion { - return AWSiOSSDKVersion; -} - -+ (void)internalInitializeIfNeeded { - // Retrieves the configuration from info.plist. - Class fabricClass = NSClassFromString(@"Fabric"); - if (fabricClass - && [fabricClass respondsToSelector:@selector(configurationDictionaryForKitClass:)]) { - NSDictionary *configurationDictionary = [fabricClass configurationDictionaryForKitClass:[AWSCognitoIdentity class]]; - NSString *defaultRegionTypeString = configurationDictionary[@"AWSDefaultRegionType"]; - AWSRegionType defaultRegionType = [defaultRegionTypeString aws_regionTypeValue]; - NSString *cognitoIdentityRegionTypeString = configurationDictionary[@"AWSCognitoIdentityRegionType"]; - AWSRegionType cognitoIdentityRegionType = [cognitoIdentityRegionTypeString aws_regionTypeValue]; - NSString *cognitoIdentityPoolId = configurationDictionary[@"AWSCognitoIdentityPoolId"]; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - // Performs some basic configuration check. - if (cognitoIdentityPoolId - && defaultRegionType != AWSRegionUnknown - && cognitoIdentityRegionType != AWSRegionUnknown) { - // Sets up the AWS Mobile SDK. - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:cognitoIdentityRegionType - identityPoolId:cognitoIdentityPoolId]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:defaultRegionType - credentialsProvider:credentialsProvider]; - [configuration addUserAgentProductToken:@"fabric"]; - AWSServiceManager.defaultServiceManager.defaultServiceConfiguration = configuration; - AWSDDLogInfo(@"The default Cognito credentials provider and service configuration were successfully initialized."); - } else { - // The configuration values from info.plist seem invalid. - AWSDDLogWarn(@"Could not find valid 'AWSDefaultRegionType', 'AWSCognitoRegionType', and 'AWSCognitoIdentityPoolId' values in info.plist. Unable to set the default Cognito credentials provider and service configuration. Please follow the instructions on this website and manually set up the AWS Mobile SDK for iOS. http://docs.aws.amazon.com/mobile/sdkforios/developerguide/setup.html"); - } - }); - } else { - AWSDDLogError(@"Fabric is not available."); - } -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity.h b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity.h deleted file mode 100644 index fa877bc..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentity.h +++ /dev/null @@ -1,22 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - - - - -#import "AWSCore.h" -#import "AWSCognitoIdentityService.h" diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityModel.h b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityModel.h deleted file mode 100644 index 4f4a175..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityModel.h +++ /dev/null @@ -1,911 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSNetworking.h" -#import "AWSModel.h" - -NS_ASSUME_NONNULL_BEGIN - -FOUNDATION_EXPORT NSString *const AWSCognitoIdentityErrorDomain; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityErrorType) { - AWSCognitoIdentityErrorUnknown, - AWSCognitoIdentityErrorConcurrentModification, - AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered, - AWSCognitoIdentityErrorExternalService, - AWSCognitoIdentityErrorInternalError, - AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration, - AWSCognitoIdentityErrorInvalidParameter, - AWSCognitoIdentityErrorLimitExceeded, - AWSCognitoIdentityErrorNotAuthorized, - AWSCognitoIdentityErrorResourceConflict, - AWSCognitoIdentityErrorResourceNotFound, - AWSCognitoIdentityErrorTooManyRequests, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityAmbiguousRoleResolutionType) { - AWSCognitoIdentityAmbiguousRoleResolutionTypeUnknown, - AWSCognitoIdentityAmbiguousRoleResolutionTypeAuthenticatedRole, - AWSCognitoIdentityAmbiguousRoleResolutionTypeDeny, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityErrorCode) { - AWSCognitoIdentityErrorCodeUnknown, - AWSCognitoIdentityErrorCodeAccessDenied, - AWSCognitoIdentityErrorCodeInternalServerError, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityMappingRuleMatchType) { - AWSCognitoIdentityMappingRuleMatchTypeUnknown, - AWSCognitoIdentityMappingRuleMatchTypeEquals, - AWSCognitoIdentityMappingRuleMatchTypeContains, - AWSCognitoIdentityMappingRuleMatchTypeStartsWith, - AWSCognitoIdentityMappingRuleMatchTypeNotEqual, -}; - -typedef NS_ENUM(NSInteger, AWSCognitoIdentityRoleMappingType) { - AWSCognitoIdentityRoleMappingTypeUnknown, - AWSCognitoIdentityRoleMappingTypeToken, - AWSCognitoIdentityRoleMappingTypeRules, -}; - -@class AWSCognitoIdentityCognitoIdentityProvider; -@class AWSCognitoIdentityCreateIdentityPoolInput; -@class AWSCognitoIdentityCredentials; -@class AWSCognitoIdentityDeleteIdentitiesInput; -@class AWSCognitoIdentityDeleteIdentitiesResponse; -@class AWSCognitoIdentityDeleteIdentityPoolInput; -@class AWSCognitoIdentityDescribeIdentityInput; -@class AWSCognitoIdentityDescribeIdentityPoolInput; -@class AWSCognitoIdentityGetCredentialsForIdentityInput; -@class AWSCognitoIdentityGetCredentialsForIdentityResponse; -@class AWSCognitoIdentityGetIdInput; -@class AWSCognitoIdentityGetIdResponse; -@class AWSCognitoIdentityGetIdentityPoolRolesInput; -@class AWSCognitoIdentityGetIdentityPoolRolesResponse; -@class AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput; -@class AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse; -@class AWSCognitoIdentityGetOpenIdTokenInput; -@class AWSCognitoIdentityGetOpenIdTokenResponse; -@class AWSCognitoIdentityIdentityDescription; -@class AWSCognitoIdentityIdentityPool; -@class AWSCognitoIdentityIdentityPoolShortDescription; -@class AWSCognitoIdentityListIdentitiesInput; -@class AWSCognitoIdentityListIdentitiesResponse; -@class AWSCognitoIdentityListIdentityPoolsInput; -@class AWSCognitoIdentityListIdentityPoolsResponse; -@class AWSCognitoIdentityLookupDeveloperIdentityInput; -@class AWSCognitoIdentityLookupDeveloperIdentityResponse; -@class AWSCognitoIdentityMappingRule; -@class AWSCognitoIdentityMergeDeveloperIdentitiesInput; -@class AWSCognitoIdentityMergeDeveloperIdentitiesResponse; -@class AWSCognitoIdentityRoleMapping; -@class AWSCognitoIdentityRulesConfigurationType; -@class AWSCognitoIdentitySetIdentityPoolRolesInput; -@class AWSCognitoIdentityUnlinkDeveloperIdentityInput; -@class AWSCognitoIdentityUnlinkIdentityInput; -@class AWSCognitoIdentityUnprocessedIdentityId; - -/** -

A provider representing an Amazon Cognito Identity User Pool and its client ID.

- */ -@interface AWSCognitoIdentityCognitoIdentityProvider : AWSModel - - -/** -

The client ID for the Amazon Cognito Identity User Pool.

- */ -@property (nonatomic, strong) NSString * _Nullable clientId; - -/** -

The provider name for an Amazon Cognito Identity User Pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.

- */ -@property (nonatomic, strong) NSString * _Nullable providerName; - -/** -

TRUE if server-side token validation is enabled for the identity provider’s token.

- */ -@property (nonatomic, strong) NSNumber * _Nullable serverSideTokenCheck; - -@end - -/** -

Input to the CreateIdentityPool action.

- Required parameters: [IdentityPoolName, AllowUnauthenticatedIdentities] - */ -@interface AWSCognitoIdentityCreateIdentityPoolInput : AWSRequest - - -/** -

TRUE if the identity pool supports unauthenticated logins.

- */ -@property (nonatomic, strong) NSNumber * _Nullable allowUnauthenticatedIdentities; - -/** -

An array of Amazon Cognito Identity user pools and their client IDs.

- */ -@property (nonatomic, strong) NSArray * _Nullable cognitoIdentityProviders; - -/** -

The "domain" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

- */ -@property (nonatomic, strong) NSString * _Nullable developerProviderName; - -/** -

A string that you provide.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolName; - -/** -

A list of OpendID Connect provider ARNs.

- */ -@property (nonatomic, strong) NSArray * _Nullable openIdConnectProviderARNs; - -/** -

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable samlProviderARNs; - -/** -

Optional key:value pairs mapping provider names to provider app IDs.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable supportedLoginProviders; - -@end - -/** -

Credentials for the provided identity ID.

- */ -@interface AWSCognitoIdentityCredentials : AWSModel - - -/** -

The Access Key portion of the credentials.

- */ -@property (nonatomic, strong) NSString * _Nullable accessKeyId; - -/** -

The date at which these credentials will expire.

- */ -@property (nonatomic, strong) NSDate * _Nullable expiration; - -/** -

The Secret Access Key portion of the credentials

- */ -@property (nonatomic, strong) NSString * _Nullable secretKey; - -/** -

The Session Token portion of the credentials

- */ -@property (nonatomic, strong) NSString * _Nullable sessionToken; - -@end - -/** -

Input to the DeleteIdentities action.

- Required parameters: [IdentityIdsToDelete] - */ -@interface AWSCognitoIdentityDeleteIdentitiesInput : AWSRequest - - -/** -

A list of 1-60 identities that you want to delete.

- */ -@property (nonatomic, strong) NSArray * _Nullable identityIdsToDelete; - -@end - -/** -

Returned in response to a successful DeleteIdentities operation.

- */ -@interface AWSCognitoIdentityDeleteIdentitiesResponse : AWSModel - - -/** -

An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.

- */ -@property (nonatomic, strong) NSArray * _Nullable unprocessedIdentityIds; - -@end - -/** -

Input to the DeleteIdentityPool action.

- Required parameters: [IdentityPoolId] - */ -@interface AWSCognitoIdentityDeleteIdentityPoolInput : AWSRequest - - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -@end - -/** -

Input to the DescribeIdentity action.

- Required parameters: [IdentityId] - */ -@interface AWSCognitoIdentityDescribeIdentityInput : AWSRequest - - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -@end - -/** -

Input to the DescribeIdentityPool action.

- Required parameters: [IdentityPoolId] - */ -@interface AWSCognitoIdentityDescribeIdentityPoolInput : AWSRequest - - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -@end - -/** -

Input to the GetCredentialsForIdentity action.

- Required parameters: [IdentityId] - */ -@interface AWSCognitoIdentityGetCredentialsForIdentityInput : AWSRequest - - -/** -

The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.

- */ -@property (nonatomic, strong) NSString * _Nullable customRoleArn; - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

A set of optional name-value pairs that map provider names to provider tokens.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable logins; - -@end - -/** -

Returned in response to a successful GetCredentialsForIdentity operation.

- */ -@interface AWSCognitoIdentityGetCredentialsForIdentityResponse : AWSModel - - -/** -

Credentials for the provided identity ID.

- */ -@property (nonatomic, strong) AWSCognitoIdentityCredentials * _Nullable credentials; - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -@end - -/** -

Input to the GetId action.

- Required parameters: [IdentityPoolId] - */ -@interface AWSCognitoIdentityGetIdInput : AWSRequest - - -/** -

A standard AWS account ID (9+ digits).

- */ -@property (nonatomic, strong) NSString * _Nullable accountId; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

A set of optional name-value pairs that map provider names to provider tokens. The available provider names for Logins are as follows:

  • Facebook: graph.facebook.com

  • Amazon Cognito Identity Provider: cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789

  • Google: accounts.google.com

  • Amazon: www.amazon.com

  • Twitter: api.twitter.com

  • Digits: www.digits.com

- */ -@property (nonatomic, strong) NSDictionary * _Nullable logins; - -@end - -/** -

Returned in response to a GetId request.

- */ -@interface AWSCognitoIdentityGetIdResponse : AWSModel - - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -@end - -/** -

Input to the GetIdentityPoolRoles action.

- Required parameters: [IdentityPoolId] - */ -@interface AWSCognitoIdentityGetIdentityPoolRolesInput : AWSRequest - - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -@end - -/** -

Returned in response to a successful GetIdentityPoolRoles operation.

- */ -@interface AWSCognitoIdentityGetIdentityPoolRolesResponse : AWSModel - - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

How users for a specific identity provider are to mapped to roles. This is a String-to-RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".

- */ -@property (nonatomic, strong) NSDictionary * _Nullable roleMappings; - -/** -

The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable roles; - -@end - -/** -

Input to the GetOpenIdTokenForDeveloperIdentity action.

- Required parameters: [IdentityPoolId, Logins] - */ -@interface AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput : AWSRequest - - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax "developer_provider_name": "developer_user_identifier". The developer provider is the "domain" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable logins; - -/** -

The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.

- */ -@property (nonatomic, strong) NSNumber * _Nullable tokenDuration; - -@end - -/** -

Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request.

- */ -@interface AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse : AWSModel - - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

An OpenID token.

- */ -@property (nonatomic, strong) NSString * _Nullable token; - -@end - -/** -

Input to the GetOpenIdToken action.

- Required parameters: [IdentityId] - */ -@interface AWSCognitoIdentityGetOpenIdTokenInput : AWSRequest - - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito Identity Provider, or any other OpenId Connect provider, always include the id_token.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable logins; - -@end - -/** -

Returned in response to a successful GetOpenIdToken request.

- */ -@interface AWSCognitoIdentityGetOpenIdTokenResponse : AWSModel - - -/** -

A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

An OpenID token, valid for 15 minutes.

- */ -@property (nonatomic, strong) NSString * _Nullable token; - -@end - -/** -

A description of the identity.

- */ -@interface AWSCognitoIdentityIdentityDescription : AWSModel - - -/** -

Date on which the identity was created.

- */ -@property (nonatomic, strong) NSDate * _Nullable creationDate; - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

Date on which the identity was last modified.

- */ -@property (nonatomic, strong) NSDate * _Nullable lastModifiedDate; - -/** -

A set of optional name-value pairs that map provider names to provider tokens.

- */ -@property (nonatomic, strong) NSArray * _Nullable logins; - -@end - -/** -

An object representing an Amazon Cognito identity pool.

- Required parameters: [IdentityPoolId, IdentityPoolName, AllowUnauthenticatedIdentities] - */ -@interface AWSCognitoIdentityIdentityPool : AWSRequest - - -/** -

TRUE if the identity pool supports unauthenticated logins.

- */ -@property (nonatomic, strong) NSNumber * _Nullable allowUnauthenticatedIdentities; - -/** -

A list representing an Amazon Cognito Identity User Pool and its client ID.

- */ -@property (nonatomic, strong) NSArray * _Nullable cognitoIdentityProviders; - -/** -

The "domain" by which Cognito will refer to your users.

- */ -@property (nonatomic, strong) NSString * _Nullable developerProviderName; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

A string that you provide.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolName; - -/** -

A list of OpendID Connect provider ARNs.

- */ -@property (nonatomic, strong) NSArray * _Nullable openIdConnectProviderARNs; - -/** -

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

- */ -@property (nonatomic, strong) NSArray * _Nullable samlProviderARNs; - -/** -

Optional key:value pairs mapping provider names to provider app IDs.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable supportedLoginProviders; - -@end - -/** -

A description of the identity pool.

- */ -@interface AWSCognitoIdentityIdentityPoolShortDescription : AWSModel - - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

A string that you provide.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolName; - -@end - -/** -

Input to the ListIdentities action.

- Required parameters: [IdentityPoolId, MaxResults] - */ -@interface AWSCognitoIdentityListIdentitiesInput : AWSRequest - - -/** -

An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.

- */ -@property (nonatomic, strong) NSNumber * _Nullable hideDisabled; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

The maximum number of identities to return.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** -

The response to a ListIdentities request.

- */ -@interface AWSCognitoIdentityListIdentitiesResponse : AWSModel - - -/** -

An object containing a set of identities and associated mappings.

- */ -@property (nonatomic, strong) NSArray * _Nullable identities; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** -

Input to the ListIdentityPools action.

- Required parameters: [MaxResults] - */ -@interface AWSCognitoIdentityListIdentityPoolsInput : AWSRequest - - -/** -

The maximum number of identities to return.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** -

The result of a successful ListIdentityPools action.

- */ -@interface AWSCognitoIdentityListIdentityPoolsResponse : AWSModel - - -/** -

The identity pools returned by the ListIdentityPools action.

- */ -@property (nonatomic, strong) NSArray * _Nullable identityPools; - -/** -

A pagination token.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** -

Input to the LookupDeveloperIdentityInput action.

- Required parameters: [IdentityPoolId] - */ -@interface AWSCognitoIdentityLookupDeveloperIdentityInput : AWSRequest - - -/** -

A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.

- */ -@property (nonatomic, strong) NSString * _Nullable developerUserIdentifier; - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

The maximum number of identities to return.

- */ -@property (nonatomic, strong) NSNumber * _Nullable maxResults; - -/** -

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** -

Returned in response to a successful LookupDeveloperIdentity action.

- */ -@interface AWSCognitoIdentityLookupDeveloperIdentityResponse : AWSModel - - -/** -

This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.

- */ -@property (nonatomic, strong) NSArray * _Nullable developerUserIdentifierList; - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

- */ -@property (nonatomic, strong) NSString * _Nullable nextToken; - -@end - -/** -

A rule that maps a claim name, a claim value, and a match type to a role ARN.

- Required parameters: [Claim, MatchType, Value, RoleARN] - */ -@interface AWSCognitoIdentityMappingRule : AWSModel - - -/** -

The claim name that must be present in the token, for example, "isAdmin" or "paid".

- */ -@property (nonatomic, strong) NSString * _Nullable claim; - -/** -

The match condition that specifies how closely the claim value in the IdP token must match Value.

- */ -@property (nonatomic, assign) AWSCognitoIdentityMappingRuleMatchType matchType; - -/** -

The role ARN.

- */ -@property (nonatomic, strong) NSString * _Nullable roleARN; - -/** -

A brief string that the claim must match, for example, "paid" or "yes".

- */ -@property (nonatomic, strong) NSString * _Nullable value; - -@end - -/** -

Input to the MergeDeveloperIdentities action.

- Required parameters: [SourceUserIdentifier, DestinationUserIdentifier, DeveloperProviderName, IdentityPoolId] - */ -@interface AWSCognitoIdentityMergeDeveloperIdentitiesInput : AWSRequest - - -/** -

User identifier for the destination user. The value should be a DeveloperUserIdentifier.

- */ -@property (nonatomic, strong) NSString * _Nullable destinationUserIdentifier; - -/** -

The "domain" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

- */ -@property (nonatomic, strong) NSString * _Nullable developerProviderName; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

User identifier for the source user. The value should be a DeveloperUserIdentifier.

- */ -@property (nonatomic, strong) NSString * _Nullable sourceUserIdentifier; - -@end - -/** -

Returned in response to a successful MergeDeveloperIdentities action.

- */ -@interface AWSCognitoIdentityMergeDeveloperIdentitiesResponse : AWSModel - - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -@end - -/** -

A role mapping.

- Required parameters: [Type] - */ -@interface AWSCognitoIdentityRoleMapping : AWSModel - - -/** -

If you specify Token or Rules as the Type, AmbiguousRoleResolution is required.

Specifies the action to be taken if either no rules match the claim value for the Rules type, or there is no cognito:preferred_role claim and there are multiple cognito:roles matches for the Token type.

- */ -@property (nonatomic, assign) AWSCognitoIdentityAmbiguousRoleResolutionType ambiguousRoleResolution; - -/** -

The rules to be used for mapping users to roles.

If you specify Rules as the role mapping type, RulesConfiguration is required.

- */ -@property (nonatomic, strong) AWSCognitoIdentityRulesConfigurationType * _Nullable rulesConfiguration; - -/** -

The role mapping type. Token will use cognito:roles and cognito:preferred_role claims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.

- */ -@property (nonatomic, assign) AWSCognitoIdentityRoleMappingType types; - -@end - -/** -

A container for rules.

- Required parameters: [Rules] - */ -@interface AWSCognitoIdentityRulesConfigurationType : AWSModel - - -/** -

An array of rules. You can specify up to 25 rules per identity provider.

Rules are evaluated in order. The first one to match specifies the role.

- */ -@property (nonatomic, strong) NSArray * _Nullable rules; - -@end - -/** -

Input to the SetIdentityPoolRoles action.

- Required parameters: [IdentityPoolId, Roles] - */ -@interface AWSCognitoIdentitySetIdentityPoolRolesInput : AWSRequest - - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -/** -

How users for a specific identity provider are to mapped to roles. This is a string to RoleMapping object map. The string identifies the identity provider, for example, "graph.facebook.com" or "cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id".

Up to 25 rules can be specified per identity provider.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable roleMappings; - -/** -

The map of roles associated with this pool. For a given role, the key will be either "authenticated" or "unauthenticated" and the value will be the Role ARN.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable roles; - -@end - -/** -

Input to the UnlinkDeveloperIdentity action.

- Required parameters: [IdentityId, IdentityPoolId, DeveloperProviderName, DeveloperUserIdentifier] - */ -@interface AWSCognitoIdentityUnlinkDeveloperIdentityInput : AWSRequest - - -/** -

The "domain" by which Cognito will refer to your users.

- */ -@property (nonatomic, strong) NSString * _Nullable developerProviderName; - -/** -

A unique ID used by your backend authentication process to identify a user.

- */ -@property (nonatomic, strong) NSString * _Nullable developerUserIdentifier; - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

An identity pool ID in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityPoolId; - -@end - -/** -

Input to the UnlinkIdentity action.

- Required parameters: [IdentityId, Logins, LoginsToRemove] - */ -@interface AWSCognitoIdentityUnlinkIdentityInput : AWSRequest - - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -/** -

A set of optional name-value pairs that map provider names to provider tokens.

- */ -@property (nonatomic, strong) NSDictionary * _Nullable logins; - -/** -

Provider names to unlink from this identity.

- */ -@property (nonatomic, strong) NSArray * _Nullable loginsToRemove; - -@end - -/** -

An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.

- */ -@interface AWSCognitoIdentityUnprocessedIdentityId : AWSModel - - -/** -

The error code indicating the type of error that occurred.

- */ -@property (nonatomic, assign) AWSCognitoIdentityErrorCode errorCode; - -/** -

A unique identifier in the format REGION:GUID.

- */ -@property (nonatomic, strong) NSString * _Nullable identityId; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityModel.m b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityModel.m deleted file mode 100644 index 7902d42..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityModel.m +++ /dev/null @@ -1,609 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentityModel.h" -#import "AWSCategory.h" - -NSString *const AWSCognitoIdentityErrorDomain = @"com.amazonaws.AWSCognitoIdentityErrorDomain"; - -@implementation AWSCognitoIdentityCognitoIdentityProvider - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"clientId" : @"ClientId", - @"providerName" : @"ProviderName", - @"serverSideTokenCheck" : @"ServerSideTokenCheck", - }; -} - -@end - -@implementation AWSCognitoIdentityCreateIdentityPoolInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"allowUnauthenticatedIdentities" : @"AllowUnauthenticatedIdentities", - @"cognitoIdentityProviders" : @"CognitoIdentityProviders", - @"developerProviderName" : @"DeveloperProviderName", - @"identityPoolName" : @"IdentityPoolName", - @"openIdConnectProviderARNs" : @"OpenIdConnectProviderARNs", - @"samlProviderARNs" : @"SamlProviderARNs", - @"supportedLoginProviders" : @"SupportedLoginProviders", - }; -} - -+ (NSValueTransformer *)cognitoIdentityProvidersJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityCognitoIdentityProvider class]]; -} - -@end - -@implementation AWSCognitoIdentityCredentials - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accessKeyId" : @"AccessKeyId", - @"expiration" : @"Expiration", - @"secretKey" : @"SecretKey", - @"sessionToken" : @"SessionToken", - }; -} - -+ (NSValueTransformer *)expirationJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -@end - -@implementation AWSCognitoIdentityDeleteIdentitiesInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityIdsToDelete" : @"IdentityIdsToDelete", - }; -} - -@end - -@implementation AWSCognitoIdentityDeleteIdentitiesResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"unprocessedIdentityIds" : @"UnprocessedIdentityIds", - }; -} - -+ (NSValueTransformer *)unprocessedIdentityIdsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityUnprocessedIdentityId class]]; -} - -@end - -@implementation AWSCognitoIdentityDeleteIdentityPoolInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityPoolId" : @"IdentityPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityDescribeIdentityInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - }; -} - -@end - -@implementation AWSCognitoIdentityDescribeIdentityPoolInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityPoolId" : @"IdentityPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityGetCredentialsForIdentityInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"customRoleArn" : @"CustomRoleArn", - @"identityId" : @"IdentityId", - @"logins" : @"Logins", - }; -} - -@end - -@implementation AWSCognitoIdentityGetCredentialsForIdentityResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"credentials" : @"Credentials", - @"identityId" : @"IdentityId", - }; -} - -+ (NSValueTransformer *)credentialsJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityCredentials class]]; -} - -@end - -@implementation AWSCognitoIdentityGetIdInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"accountId" : @"AccountId", - @"identityPoolId" : @"IdentityPoolId", - @"logins" : @"Logins", - }; -} - -@end - -@implementation AWSCognitoIdentityGetIdResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - }; -} - -@end - -@implementation AWSCognitoIdentityGetIdentityPoolRolesInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityPoolId" : @"IdentityPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityGetIdentityPoolRolesResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityPoolId" : @"IdentityPoolId", - @"roleMappings" : @"RoleMappings", - @"roles" : @"Roles", - }; -} - -+ (NSValueTransformer *)roleMappingsJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(id JSONDictionary) { - return [AWSModelUtility mapMTLDictionaryFromJSONDictionary:JSONDictionary withModelClass:[AWSCognitoIdentityRoleMapping class]]; - } reverseBlock:^id(id mapMTLDictionary) { - return [AWSModelUtility JSONDictionaryFromMapMTLDictionary:mapMTLDictionary]; - }]; -} - -@end - -@implementation AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - @"identityPoolId" : @"IdentityPoolId", - @"logins" : @"Logins", - @"tokenDuration" : @"TokenDuration", - }; -} - -@end - -@implementation AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - @"token" : @"Token", - }; -} - -@end - -@implementation AWSCognitoIdentityGetOpenIdTokenInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - @"logins" : @"Logins", - }; -} - -@end - -@implementation AWSCognitoIdentityGetOpenIdTokenResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - @"token" : @"Token", - }; -} - -@end - -@implementation AWSCognitoIdentityIdentityDescription - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"creationDate" : @"CreationDate", - @"identityId" : @"IdentityId", - @"lastModifiedDate" : @"LastModifiedDate", - @"logins" : @"Logins", - }; -} - -+ (NSValueTransformer *)creationDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -+ (NSValueTransformer *)lastModifiedDateJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(NSNumber *number) { - return [NSDate dateWithTimeIntervalSince1970:[number doubleValue]]; - } reverseBlock:^id(NSDate *date) { - return [NSString stringWithFormat:@"%f", [date timeIntervalSince1970]]; - }]; -} - -@end - -@implementation AWSCognitoIdentityIdentityPool - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"allowUnauthenticatedIdentities" : @"AllowUnauthenticatedIdentities", - @"cognitoIdentityProviders" : @"CognitoIdentityProviders", - @"developerProviderName" : @"DeveloperProviderName", - @"identityPoolId" : @"IdentityPoolId", - @"identityPoolName" : @"IdentityPoolName", - @"openIdConnectProviderARNs" : @"OpenIdConnectProviderARNs", - @"samlProviderARNs" : @"SamlProviderARNs", - @"supportedLoginProviders" : @"SupportedLoginProviders", - }; -} - -+ (NSValueTransformer *)cognitoIdentityProvidersJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityCognitoIdentityProvider class]]; -} - -@end - -@implementation AWSCognitoIdentityIdentityPoolShortDescription - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityPoolId" : @"IdentityPoolId", - @"identityPoolName" : @"IdentityPoolName", - }; -} - -@end - -@implementation AWSCognitoIdentityListIdentitiesInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"hideDisabled" : @"HideDisabled", - @"identityPoolId" : @"IdentityPoolId", - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - }; -} - -@end - -@implementation AWSCognitoIdentityListIdentitiesResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identities" : @"Identities", - @"identityPoolId" : @"IdentityPoolId", - @"nextToken" : @"NextToken", - }; -} - -+ (NSValueTransformer *)identitiesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityIdentityDescription class]]; -} - -@end - -@implementation AWSCognitoIdentityListIdentityPoolsInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - }; -} - -@end - -@implementation AWSCognitoIdentityListIdentityPoolsResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityPools" : @"IdentityPools", - @"nextToken" : @"NextToken", - }; -} - -+ (NSValueTransformer *)identityPoolsJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityIdentityPoolShortDescription class]]; -} - -@end - -@implementation AWSCognitoIdentityLookupDeveloperIdentityInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"developerUserIdentifier" : @"DeveloperUserIdentifier", - @"identityId" : @"IdentityId", - @"identityPoolId" : @"IdentityPoolId", - @"maxResults" : @"MaxResults", - @"nextToken" : @"NextToken", - }; -} - -@end - -@implementation AWSCognitoIdentityLookupDeveloperIdentityResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"developerUserIdentifierList" : @"DeveloperUserIdentifierList", - @"identityId" : @"IdentityId", - @"nextToken" : @"NextToken", - }; -} - -@end - -@implementation AWSCognitoIdentityMappingRule - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"claim" : @"Claim", - @"matchType" : @"MatchType", - @"roleARN" : @"RoleARN", - @"value" : @"Value", - }; -} - -+ (NSValueTransformer *)matchTypeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Equals"] == NSOrderedSame) { - return @(AWSCognitoIdentityMappingRuleMatchTypeEquals); - } - if ([value caseInsensitiveCompare:@"Contains"] == NSOrderedSame) { - return @(AWSCognitoIdentityMappingRuleMatchTypeContains); - } - if ([value caseInsensitiveCompare:@"StartsWith"] == NSOrderedSame) { - return @(AWSCognitoIdentityMappingRuleMatchTypeStartsWith); - } - if ([value caseInsensitiveCompare:@"NotEqual"] == NSOrderedSame) { - return @(AWSCognitoIdentityMappingRuleMatchTypeNotEqual); - } - return @(AWSCognitoIdentityMappingRuleMatchTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityMappingRuleMatchTypeEquals: - return @"Equals"; - case AWSCognitoIdentityMappingRuleMatchTypeContains: - return @"Contains"; - case AWSCognitoIdentityMappingRuleMatchTypeStartsWith: - return @"StartsWith"; - case AWSCognitoIdentityMappingRuleMatchTypeNotEqual: - return @"NotEqual"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityMergeDeveloperIdentitiesInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"destinationUserIdentifier" : @"DestinationUserIdentifier", - @"developerProviderName" : @"DeveloperProviderName", - @"identityPoolId" : @"IdentityPoolId", - @"sourceUserIdentifier" : @"SourceUserIdentifier", - }; -} - -@end - -@implementation AWSCognitoIdentityMergeDeveloperIdentitiesResponse - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - }; -} - -@end - -@implementation AWSCognitoIdentityRoleMapping - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"ambiguousRoleResolution" : @"AmbiguousRoleResolution", - @"rulesConfiguration" : @"RulesConfiguration", - @"types" : @"Type", - }; -} - -+ (NSValueTransformer *)ambiguousRoleResolutionJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"AuthenticatedRole"] == NSOrderedSame) { - return @(AWSCognitoIdentityAmbiguousRoleResolutionTypeAuthenticatedRole); - } - if ([value caseInsensitiveCompare:@"Deny"] == NSOrderedSame) { - return @(AWSCognitoIdentityAmbiguousRoleResolutionTypeDeny); - } - return @(AWSCognitoIdentityAmbiguousRoleResolutionTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityAmbiguousRoleResolutionTypeAuthenticatedRole: - return @"AuthenticatedRole"; - case AWSCognitoIdentityAmbiguousRoleResolutionTypeDeny: - return @"Deny"; - default: - return nil; - } - }]; -} - -+ (NSValueTransformer *)rulesConfigurationJSONTransformer { - return [NSValueTransformer awsmtl_JSONDictionaryTransformerWithModelClass:[AWSCognitoIdentityRulesConfigurationType class]]; -} - -+ (NSValueTransformer *)typesJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"Token"] == NSOrderedSame) { - return @(AWSCognitoIdentityRoleMappingTypeToken); - } - if ([value caseInsensitiveCompare:@"Rules"] == NSOrderedSame) { - return @(AWSCognitoIdentityRoleMappingTypeRules); - } - return @(AWSCognitoIdentityRoleMappingTypeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityRoleMappingTypeToken: - return @"Token"; - case AWSCognitoIdentityRoleMappingTypeRules: - return @"Rules"; - default: - return nil; - } - }]; -} - -@end - -@implementation AWSCognitoIdentityRulesConfigurationType - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"rules" : @"Rules", - }; -} - -+ (NSValueTransformer *)rulesJSONTransformer { - return [NSValueTransformer awsmtl_JSONArrayTransformerWithModelClass:[AWSCognitoIdentityMappingRule class]]; -} - -@end - -@implementation AWSCognitoIdentitySetIdentityPoolRolesInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityPoolId" : @"IdentityPoolId", - @"roleMappings" : @"RoleMappings", - @"roles" : @"Roles", - }; -} - -+ (NSValueTransformer *)roleMappingsJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^id(id JSONDictionary) { - return [AWSModelUtility mapMTLDictionaryFromJSONDictionary:JSONDictionary withModelClass:[AWSCognitoIdentityRoleMapping class]]; - } reverseBlock:^id(id mapMTLDictionary) { - return [AWSModelUtility JSONDictionaryFromMapMTLDictionary:mapMTLDictionary]; - }]; -} - -@end - -@implementation AWSCognitoIdentityUnlinkDeveloperIdentityInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"developerProviderName" : @"DeveloperProviderName", - @"developerUserIdentifier" : @"DeveloperUserIdentifier", - @"identityId" : @"IdentityId", - @"identityPoolId" : @"IdentityPoolId", - }; -} - -@end - -@implementation AWSCognitoIdentityUnlinkIdentityInput - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"identityId" : @"IdentityId", - @"logins" : @"Logins", - @"loginsToRemove" : @"LoginsToRemove", - }; -} - -@end - -@implementation AWSCognitoIdentityUnprocessedIdentityId - -+ (NSDictionary *)JSONKeyPathsByPropertyKey { - return @{ - @"errorCode" : @"ErrorCode", - @"identityId" : @"IdentityId", - }; -} - -+ (NSValueTransformer *)errorCodeJSONTransformer { - return [AWSMTLValueTransformer reversibleTransformerWithForwardBlock:^NSNumber *(NSString *value) { - if ([value caseInsensitiveCompare:@"AccessDenied"] == NSOrderedSame) { - return @(AWSCognitoIdentityErrorCodeAccessDenied); - } - if ([value caseInsensitiveCompare:@"InternalServerError"] == NSOrderedSame) { - return @(AWSCognitoIdentityErrorCodeInternalServerError); - } - return @(AWSCognitoIdentityErrorCodeUnknown); - } reverseBlock:^NSString *(NSNumber *value) { - switch ([value integerValue]) { - case AWSCognitoIdentityErrorCodeAccessDenied: - return @"AccessDenied"; - case AWSCognitoIdentityErrorCodeInternalServerError: - return @"InternalServerError"; - default: - return nil; - } - }]; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityResources.h b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityResources.h deleted file mode 100644 index 5b1a5f9..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityResources.h +++ /dev/null @@ -1,24 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import - -@interface AWSCognitoIdentityResources : NSObject - -+ (instancetype)sharedInstance; - -- (NSDictionary *)JSONObject; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityResources.m b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityResources.m deleted file mode 100644 index 7119f5e..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityResources.m +++ /dev/null @@ -1,1402 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentityResources.h" -#import "AWSCocoaLumberjack.h" - -@interface AWSCognitoIdentityResources () - -@property (nonatomic, strong) NSDictionary *definitionDictionary; - -@end - -@implementation AWSCognitoIdentityResources - -+ (instancetype)sharedInstance { - static AWSCognitoIdentityResources *_sharedResources = nil; - static dispatch_once_t once_token; - - dispatch_once(&once_token, ^{ - _sharedResources = [AWSCognitoIdentityResources new]; - }); - - return _sharedResources; -} - -- (NSDictionary *)JSONObject { - return self.definitionDictionary; -} - -- (instancetype)init { - if (self = [super init]) { - //init method - NSError *error = nil; - _definitionDictionary = [NSJSONSerialization JSONObjectWithData:[[self definitionString] dataUsingEncoding:NSUTF8StringEncoding] - options:kNilOptions - error:&error]; - if (_definitionDictionary == nil) { - if (error) { - AWSDDLogError(@"Failed to parse JSON service definition: %@",error); - } - } - } - return self; -} - -- (NSString *)definitionString { - return @"{\ - \"version\":\"2.0\",\ - \"metadata\":{\ - \"apiVersion\":\"2014-06-30\",\ - \"endpointPrefix\":\"cognito-identity\",\ - \"jsonVersion\":\"1.1\",\ - \"protocol\":\"json\",\ - \"serviceFullName\":\"Amazon Cognito Identity\",\ - \"signatureVersion\":\"v4\",\ - \"targetPrefix\":\"AWSCognitoIdentityService\",\ - \"uid\":\"cognito-identity-2014-06-30\"\ - },\ - \"operations\":{\ - \"CreateIdentityPool\":{\ - \"name\":\"CreateIdentityPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"CreateIdentityPoolInput\"},\ - \"output\":{\"shape\":\"IdentityPool\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"LimitExceededException\"}\ - ],\ - \"documentation\":\"

Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for SupportedLoginProviders are as follows:

  • Facebook: graph.facebook.com

  • Google: accounts.google.com

  • Amazon: www.amazon.com

  • Twitter: api.twitter.com

  • Digits: www.digits.com

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"DeleteIdentities\":{\ - \"name\":\"DeleteIdentities\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteIdentitiesInput\"},\ - \"output\":{\"shape\":\"DeleteIdentitiesResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"DeleteIdentityPool\":{\ - \"name\":\"DeleteIdentityPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DeleteIdentityPoolInput\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Deletes a user pool. Once a pool is deleted, users will not be able to authenticate with the pool.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"DescribeIdentity\":{\ - \"name\":\"DescribeIdentity\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeIdentityInput\"},\ - \"output\":{\"shape\":\"IdentityDescription\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Returns metadata related to the given identity, including when the identity was created and any associated linked logins.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"DescribeIdentityPool\":{\ - \"name\":\"DescribeIdentityPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"DescribeIdentityPoolInput\"},\ - \"output\":{\"shape\":\"IdentityPool\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"GetCredentialsForIdentity\":{\ - \"name\":\"GetCredentialsForIdentity\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetCredentialsForIdentityInput\"},\ - \"output\":{\"shape\":\"GetCredentialsForIdentityResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InvalidIdentityPoolConfigurationException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"ExternalServiceException\"}\ - ],\ - \"documentation\":\"

Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.

This is a public API. You do not need any credentials to call this API.

\"\ - },\ - \"GetId\":{\ - \"name\":\"GetId\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetIdInput\"},\ - \"output\":{\"shape\":\"GetIdResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"LimitExceededException\"},\ - {\"shape\":\"ExternalServiceException\"}\ - ],\ - \"documentation\":\"

Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.

This is a public API. You do not need any credentials to call this API.

\"\ - },\ - \"GetIdentityPoolRoles\":{\ - \"name\":\"GetIdentityPoolRoles\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetIdentityPoolRolesInput\"},\ - \"output\":{\"shape\":\"GetIdentityPoolRolesResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Gets the roles for an identity pool.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"GetOpenIdToken\":{\ - \"name\":\"GetOpenIdToken\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetOpenIdTokenInput\"},\ - \"output\":{\"shape\":\"GetOpenIdTokenResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"ExternalServiceException\"}\ - ],\ - \"documentation\":\"

Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.

The OpenId token is valid for 15 minutes.

This is a public API. You do not need any credentials to call this API.

\"\ - },\ - \"GetOpenIdTokenForDeveloperIdentity\":{\ - \"name\":\"GetOpenIdTokenForDeveloperIdentity\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"GetOpenIdTokenForDeveloperIdentityInput\"},\ - \"output\":{\"shape\":\"GetOpenIdTokenForDeveloperIdentityResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"DeveloperUserAlreadyRegisteredException\"}\ - ],\ - \"documentation\":\"

Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the \\\"domain\\\" by which Cognito will refer to your users.

You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId. This API will create the identity in the specified IdentityPoolId.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"ListIdentities\":{\ - \"name\":\"ListIdentities\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListIdentitiesInput\"},\ - \"output\":{\"shape\":\"ListIdentitiesResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists the identities in a pool.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"ListIdentityPools\":{\ - \"name\":\"ListIdentityPools\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"ListIdentityPoolsInput\"},\ - \"output\":{\"shape\":\"ListIdentityPoolsResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Lists all of the Cognito identity pools registered for your account.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"LookupDeveloperIdentity\":{\ - \"name\":\"LookupDeveloperIdentity\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"LookupDeveloperIdentityInput\"},\ - \"output\":{\"shape\":\"LookupDeveloperIdentityResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifiers associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"MergeDeveloperIdentities\":{\ - \"name\":\"MergeDeveloperIdentities\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"MergeDeveloperIdentitiesInput\"},\ - \"output\":{\"shape\":\"MergeDeveloperIdentitiesResponse\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"SetIdentityPoolRoles\":{\ - \"name\":\"SetIdentityPoolRoles\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"SetIdentityPoolRolesInput\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"ConcurrentModificationException\"}\ - ],\ - \"documentation\":\"

Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"UnlinkDeveloperIdentity\":{\ - \"name\":\"UnlinkDeveloperIdentity\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UnlinkDeveloperIdentityInput\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"}\ - ],\ - \"documentation\":\"

Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.

You must use AWS Developer credentials to call this API.

\"\ - },\ - \"UnlinkIdentity\":{\ - \"name\":\"UnlinkIdentity\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"UnlinkIdentityInput\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"ExternalServiceException\"}\ - ],\ - \"documentation\":\"

Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.

This is a public API. You do not need any credentials to call this API.

\"\ - },\ - \"UpdateIdentityPool\":{\ - \"name\":\"UpdateIdentityPool\",\ - \"http\":{\ - \"method\":\"POST\",\ - \"requestUri\":\"/\"\ - },\ - \"input\":{\"shape\":\"IdentityPool\"},\ - \"output\":{\"shape\":\"IdentityPool\"},\ - \"errors\":[\ - {\"shape\":\"InvalidParameterException\"},\ - {\"shape\":\"ResourceNotFoundException\"},\ - {\"shape\":\"NotAuthorizedException\"},\ - {\"shape\":\"ResourceConflictException\"},\ - {\"shape\":\"TooManyRequestsException\"},\ - {\"shape\":\"InternalErrorException\"},\ - {\"shape\":\"ConcurrentModificationException\"},\ - {\"shape\":\"LimitExceededException\"}\ - ],\ - \"documentation\":\"

Updates a user pool.

You must use AWS Developer credentials to call this API.

\"\ - }\ - },\ - \"shapes\":{\ - \"ARNString\":{\ - \"type\":\"string\",\ - \"max\":2048,\ - \"min\":20\ - },\ - \"AccessKeyString\":{\"type\":\"string\"},\ - \"AccountId\":{\ - \"type\":\"string\",\ - \"max\":15,\ - \"min\":1,\ - \"pattern\":\"\\\\d+\"\ - },\ - \"AmbiguousRoleResolutionType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"AuthenticatedRole\",\ - \"Deny\"\ - ]\ - },\ - \"ClaimName\":{\ - \"type\":\"string\",\ - \"max\":64,\ - \"min\":1,\ - \"pattern\":\"[\\\\p{L}\\\\p{M}\\\\p{S}\\\\p{N}\\\\p{P}]+\"\ - },\ - \"ClaimValue\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1\ - },\ - \"CognitoIdentityProvider\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"ProviderName\":{\ - \"shape\":\"CognitoIdentityProviderName\",\ - \"documentation\":\"

The provider name for an Amazon Cognito Identity User Pool. For example, cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789.

\"\ - },\ - \"ClientId\":{\ - \"shape\":\"CognitoIdentityProviderClientId\",\ - \"documentation\":\"

The client ID for the Amazon Cognito Identity User Pool.

\"\ - },\ - \"ServerSideTokenCheck\":{\ - \"shape\":\"CognitoIdentityProviderTokenCheck\",\ - \"documentation\":\"

TRUE if server-side token validation is enabled for the identity provider’s token.

\",\ - \"box\":true\ - }\ - },\ - \"documentation\":\"

A provider representing an Amazon Cognito Identity User Pool and its client ID.

\"\ - },\ - \"CognitoIdentityProviderClientId\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w_]+\"\ - },\ - \"CognitoIdentityProviderList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"CognitoIdentityProvider\"}\ - },\ - \"CognitoIdentityProviderName\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w._:/-]+\"\ - },\ - \"CognitoIdentityProviderTokenCheck\":{\"type\":\"boolean\"},\ - \"ConcurrentModificationException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by a ConcurrentModificationException.

\"\ - }\ - },\ - \"documentation\":\"

Thrown if there are parallel requests to modify a resource.

\",\ - \"exception\":true\ - },\ - \"CreateIdentityPoolInput\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IdentityPoolName\",\ - \"AllowUnauthenticatedIdentities\"\ - ],\ - \"members\":{\ - \"IdentityPoolName\":{\ - \"shape\":\"IdentityPoolName\",\ - \"documentation\":\"

A string that you provide.

\"\ - },\ - \"AllowUnauthenticatedIdentities\":{\ - \"shape\":\"IdentityPoolUnauthenticated\",\ - \"documentation\":\"

TRUE if the identity pool supports unauthenticated logins.

\"\ - },\ - \"SupportedLoginProviders\":{\ - \"shape\":\"IdentityProviders\",\ - \"documentation\":\"

Optional key:value pairs mapping provider names to provider app IDs.

\"\ - },\ - \"DeveloperProviderName\":{\ - \"shape\":\"DeveloperProviderName\",\ - \"documentation\":\"

The \\\"domain\\\" by which Cognito will refer to your users. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

Once you have set a developer provider name, you cannot change it. Please take care in setting this parameter.

\"\ - },\ - \"OpenIdConnectProviderARNs\":{\ - \"shape\":\"OIDCProviderList\",\ - \"documentation\":\"

A list of OpendID Connect provider ARNs.

\"\ - },\ - \"CognitoIdentityProviders\":{\ - \"shape\":\"CognitoIdentityProviderList\",\ - \"documentation\":\"

An array of Amazon Cognito Identity user pools and their client IDs.

\"\ - },\ - \"SamlProviderARNs\":{\ - \"shape\":\"SAMLProviderList\",\ - \"documentation\":\"

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

\"\ - }\ - },\ - \"documentation\":\"

Input to the CreateIdentityPool action.

\"\ - },\ - \"Credentials\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"AccessKeyId\":{\ - \"shape\":\"AccessKeyString\",\ - \"documentation\":\"

The Access Key portion of the credentials.

\"\ - },\ - \"SecretKey\":{\ - \"shape\":\"SecretKeyString\",\ - \"documentation\":\"

The Secret Access Key portion of the credentials

\"\ - },\ - \"SessionToken\":{\ - \"shape\":\"SessionTokenString\",\ - \"documentation\":\"

The Session Token portion of the credentials

\"\ - },\ - \"Expiration\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

The date at which these credentials will expire.

\"\ - }\ - },\ - \"documentation\":\"

Credentials for the provided identity ID.

\"\ - },\ - \"DateType\":{\"type\":\"timestamp\"},\ - \"DeleteIdentitiesInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityIdsToDelete\"],\ - \"members\":{\ - \"IdentityIdsToDelete\":{\ - \"shape\":\"IdentityIdList\",\ - \"documentation\":\"

A list of 1-60 identities that you want to delete.

\"\ - }\ - },\ - \"documentation\":\"

Input to the DeleteIdentities action.

\"\ - },\ - \"DeleteIdentitiesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"UnprocessedIdentityIds\":{\ - \"shape\":\"UnprocessedIdentityIdList\",\ - \"documentation\":\"

An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a successful DeleteIdentities operation.

\"\ - },\ - \"DeleteIdentityPoolInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityPoolId\"],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - }\ - },\ - \"documentation\":\"

Input to the DeleteIdentityPool action.

\"\ - },\ - \"DescribeIdentityInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityId\"],\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - }\ - },\ - \"documentation\":\"

Input to the DescribeIdentity action.

\"\ - },\ - \"DescribeIdentityPoolInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityPoolId\"],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - }\ - },\ - \"documentation\":\"

Input to the DescribeIdentityPool action.

\"\ - },\ - \"DeveloperProviderName\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w._-]+\"\ - },\ - \"DeveloperUserAlreadyRegisteredException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

This developer user identifier is already registered with Cognito.

\"\ - }\ - },\ - \"documentation\":\"

The provided developer user identifier is already registered with Cognito under a different identity ID.

\",\ - \"exception\":true\ - },\ - \"DeveloperUserIdentifier\":{\ - \"type\":\"string\",\ - \"max\":1024,\ - \"min\":1\ - },\ - \"DeveloperUserIdentifierList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"DeveloperUserIdentifier\"}\ - },\ - \"ErrorCode\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"AccessDenied\",\ - \"InternalServerError\"\ - ]\ - },\ - \"ExternalServiceException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by an ExternalServiceException

\"\ - }\ - },\ - \"documentation\":\"

An exception thrown when a dependent service such as Facebook or Twitter is not responding

\",\ - \"exception\":true\ - },\ - \"GetCredentialsForIdentityInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityId\"],\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"Logins\":{\ - \"shape\":\"LoginsMap\",\ - \"documentation\":\"

A set of optional name-value pairs that map provider names to provider tokens.

\"\ - },\ - \"CustomRoleArn\":{\ - \"shape\":\"ARNString\",\ - \"documentation\":\"

The Amazon Resource Name (ARN) of the role to be assumed when multiple roles were received in the token from the identity provider. For example, a SAML-based identity provider. This parameter is optional for identity providers that do not support role customization.

\"\ - }\ - },\ - \"documentation\":\"

Input to the GetCredentialsForIdentity action.

\"\ - },\ - \"GetCredentialsForIdentityResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"Credentials\":{\ - \"shape\":\"Credentials\",\ - \"documentation\":\"

Credentials for the provided identity ID.

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a successful GetCredentialsForIdentity operation.

\"\ - },\ - \"GetIdInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityPoolId\"],\ - \"members\":{\ - \"AccountId\":{\ - \"shape\":\"AccountId\",\ - \"documentation\":\"

A standard AWS account ID (9+ digits).

\"\ - },\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"Logins\":{\ - \"shape\":\"LoginsMap\",\ - \"documentation\":\"

A set of optional name-value pairs that map provider names to provider tokens. The available provider names for Logins are as follows:

  • Facebook: graph.facebook.com

  • Amazon Cognito Identity Provider: cognito-idp.us-east-1.amazonaws.com/us-east-1_123456789

  • Google: accounts.google.com

  • Amazon: www.amazon.com

  • Twitter: api.twitter.com

  • Digits: www.digits.com

\"\ - }\ - },\ - \"documentation\":\"

Input to the GetId action.

\"\ - },\ - \"GetIdResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a GetId request.

\"\ - },\ - \"GetIdentityPoolRolesInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityPoolId\"],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - }\ - },\ - \"documentation\":\"

Input to the GetIdentityPoolRoles action.

\"\ - },\ - \"GetIdentityPoolRolesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"Roles\":{\ - \"shape\":\"RolesMap\",\ - \"documentation\":\"

The map of roles associated with this pool. Currently only authenticated and unauthenticated roles are supported.

\"\ - },\ - \"RoleMappings\":{\ - \"shape\":\"RoleMappingMap\",\ - \"documentation\":\"

How users for a specific identity provider are to mapped to roles. This is a String-to-RoleMapping object map. The string identifies the identity provider, for example, \\\"graph.facebook.com\\\" or \\\"cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id\\\".

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a successful GetIdentityPoolRoles operation.

\"\ - },\ - \"GetOpenIdTokenForDeveloperIdentityInput\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IdentityPoolId\",\ - \"Logins\"\ - ],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"Logins\":{\ - \"shape\":\"LoginsMap\",\ - \"documentation\":\"

A set of optional name-value pairs that map provider names to provider tokens. Each name-value pair represents a user from a public provider or developer provider. If the user is from a developer provider, the name-value pair will follow the syntax \\\"developer_provider_name\\\": \\\"developer_user_identifier\\\". The developer provider is the \\\"domain\\\" by which Cognito will refer to your users; you provided this domain while creating/updating the identity pool. The developer user identifier is an identifier from your backend that uniquely identifies a user. When you create an identity pool, you can specify the supported logins.

\"\ - },\ - \"TokenDuration\":{\ - \"shape\":\"TokenDuration\",\ - \"documentation\":\"

The expiration time of the token, in seconds. You can specify a custom expiration time for the token so that you can cache it. If you don't provide an expiration time, the token is valid for 15 minutes. You can exchange the token with Amazon STS for temporary AWS credentials, which are valid for a maximum of one hour. The maximum token duration you can set is 24 hours. You should take care in setting the expiration time for a token, as there are significant security implications: an attacker could use a leaked token to access your AWS resources for the token's duration.

\"\ - }\ - },\ - \"documentation\":\"

Input to the GetOpenIdTokenForDeveloperIdentity action.

\"\ - },\ - \"GetOpenIdTokenForDeveloperIdentityResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"Token\":{\ - \"shape\":\"OIDCToken\",\ - \"documentation\":\"

An OpenID token.

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a successful GetOpenIdTokenForDeveloperIdentity request.

\"\ - },\ - \"GetOpenIdTokenInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityId\"],\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"Logins\":{\ - \"shape\":\"LoginsMap\",\ - \"documentation\":\"

A set of optional name-value pairs that map provider names to provider tokens. When using graph.facebook.com and www.amazon.com, supply the access_token returned from the provider's authflow. For accounts.google.com, an Amazon Cognito Identity Provider, or any other OpenId Connect provider, always include the id_token.

\"\ - }\ - },\ - \"documentation\":\"

Input to the GetOpenIdToken action.

\"\ - },\ - \"GetOpenIdTokenResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID. Note that the IdentityId returned may not match the one passed on input.

\"\ - },\ - \"Token\":{\ - \"shape\":\"OIDCToken\",\ - \"documentation\":\"

An OpenID token, valid for 15 minutes.

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a successful GetOpenIdToken request.

\"\ - },\ - \"HideDisabled\":{\"type\":\"boolean\"},\ - \"IdentitiesList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"IdentityDescription\"}\ - },\ - \"IdentityDescription\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"Logins\":{\ - \"shape\":\"LoginsList\",\ - \"documentation\":\"

A set of optional name-value pairs that map provider names to provider tokens.

\"\ - },\ - \"CreationDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

Date on which the identity was created.

\"\ - },\ - \"LastModifiedDate\":{\ - \"shape\":\"DateType\",\ - \"documentation\":\"

Date on which the identity was last modified.

\"\ - }\ - },\ - \"documentation\":\"

A description of the identity.

\"\ - },\ - \"IdentityId\":{\ - \"type\":\"string\",\ - \"max\":55,\ - \"min\":1,\ - \"pattern\":\"[\\\\w-]+:[0-9a-f-]+\"\ - },\ - \"IdentityIdList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"IdentityId\"},\ - \"max\":60,\ - \"min\":1\ - },\ - \"IdentityPool\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IdentityPoolId\",\ - \"IdentityPoolName\",\ - \"AllowUnauthenticatedIdentities\"\ - ],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"IdentityPoolName\":{\ - \"shape\":\"IdentityPoolName\",\ - \"documentation\":\"

A string that you provide.

\"\ - },\ - \"AllowUnauthenticatedIdentities\":{\ - \"shape\":\"IdentityPoolUnauthenticated\",\ - \"documentation\":\"

TRUE if the identity pool supports unauthenticated logins.

\"\ - },\ - \"SupportedLoginProviders\":{\ - \"shape\":\"IdentityProviders\",\ - \"documentation\":\"

Optional key:value pairs mapping provider names to provider app IDs.

\"\ - },\ - \"DeveloperProviderName\":{\ - \"shape\":\"DeveloperProviderName\",\ - \"documentation\":\"

The \\\"domain\\\" by which Cognito will refer to your users.

\"\ - },\ - \"OpenIdConnectProviderARNs\":{\ - \"shape\":\"OIDCProviderList\",\ - \"documentation\":\"

A list of OpendID Connect provider ARNs.

\"\ - },\ - \"CognitoIdentityProviders\":{\ - \"shape\":\"CognitoIdentityProviderList\",\ - \"documentation\":\"

A list representing an Amazon Cognito Identity User Pool and its client ID.

\"\ - },\ - \"SamlProviderARNs\":{\ - \"shape\":\"SAMLProviderList\",\ - \"documentation\":\"

An array of Amazon Resource Names (ARNs) of the SAML provider for your identity pool.

\"\ - }\ - },\ - \"documentation\":\"

An object representing an Amazon Cognito identity pool.

\"\ - },\ - \"IdentityPoolId\":{\ - \"type\":\"string\",\ - \"max\":55,\ - \"min\":1,\ - \"pattern\":\"[\\\\w-]+:[0-9a-f-]+\"\ - },\ - \"IdentityPoolName\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w ]+\"\ - },\ - \"IdentityPoolShortDescription\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"IdentityPoolName\":{\ - \"shape\":\"IdentityPoolName\",\ - \"documentation\":\"

A string that you provide.

\"\ - }\ - },\ - \"documentation\":\"

A description of the identity pool.

\"\ - },\ - \"IdentityPoolUnauthenticated\":{\"type\":\"boolean\"},\ - \"IdentityPoolsList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"IdentityPoolShortDescription\"}\ - },\ - \"IdentityProviderId\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1,\ - \"pattern\":\"[\\\\w.;_/-]+\"\ - },\ - \"IdentityProviderName\":{\ - \"type\":\"string\",\ - \"max\":128,\ - \"min\":1\ - },\ - \"IdentityProviderToken\":{\ - \"type\":\"string\",\ - \"max\":50000,\ - \"min\":1\ - },\ - \"IdentityProviders\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"IdentityProviderName\"},\ - \"value\":{\"shape\":\"IdentityProviderId\"},\ - \"max\":10\ - },\ - \"InternalErrorException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by an InternalErrorException.

\"\ - }\ - },\ - \"documentation\":\"

Thrown when the service encounters an error during processing the request.

\",\ - \"exception\":true,\ - \"fault\":true\ - },\ - \"InvalidIdentityPoolConfigurationException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned for an InvalidIdentityPoolConfigurationException

\"\ - }\ - },\ - \"documentation\":\"

Thrown if the identity pool has no role associated for the given auth type (auth/unauth) or if the AssumeRole fails.

\",\ - \"exception\":true\ - },\ - \"InvalidParameterException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by an InvalidParameterException.

\"\ - }\ - },\ - \"documentation\":\"

Thrown for missing or bad input parameter(s).

\",\ - \"exception\":true\ - },\ - \"LimitExceededException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by a LimitExceededException.

\"\ - }\ - },\ - \"documentation\":\"

Thrown when the total number of user pools has exceeded a preset limit.

\",\ - \"exception\":true\ - },\ - \"ListIdentitiesInput\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IdentityPoolId\",\ - \"MaxResults\"\ - ],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"QueryLimit\",\ - \"documentation\":\"

The maximum number of identities to return.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token.

\"\ - },\ - \"HideDisabled\":{\ - \"shape\":\"HideDisabled\",\ - \"documentation\":\"

An optional boolean parameter that allows you to hide disabled identities. If omitted, the ListIdentities API will include disabled identities in the response.

\"\ - }\ - },\ - \"documentation\":\"

Input to the ListIdentities action.

\"\ - },\ - \"ListIdentitiesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"Identities\":{\ - \"shape\":\"IdentitiesList\",\ - \"documentation\":\"

An object containing a set of identities and associated mappings.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - },\ - \"documentation\":\"

The response to a ListIdentities request.

\"\ - },\ - \"ListIdentityPoolsInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"MaxResults\"],\ - \"members\":{\ - \"MaxResults\":{\ - \"shape\":\"QueryLimit\",\ - \"documentation\":\"

The maximum number of identities to return.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - },\ - \"documentation\":\"

Input to the ListIdentityPools action.

\"\ - },\ - \"ListIdentityPoolsResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityPools\":{\ - \"shape\":\"IdentityPoolsList\",\ - \"documentation\":\"

The identity pools returned by the ListIdentityPools action.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token.

\"\ - }\ - },\ - \"documentation\":\"

The result of a successful ListIdentityPools action.

\"\ - },\ - \"LoginsList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"IdentityProviderName\"}\ - },\ - \"LoginsMap\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"IdentityProviderName\"},\ - \"value\":{\"shape\":\"IdentityProviderToken\"},\ - \"max\":10\ - },\ - \"LookupDeveloperIdentityInput\":{\ - \"type\":\"structure\",\ - \"required\":[\"IdentityPoolId\"],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"DeveloperUserIdentifier\":{\ - \"shape\":\"DeveloperUserIdentifier\",\ - \"documentation\":\"

A unique ID used by your backend authentication process to identify a user. Typically, a developer identity provider would issue many developer user identifiers, in keeping with the number of users.

\"\ - },\ - \"MaxResults\":{\ - \"shape\":\"QueryLimit\",\ - \"documentation\":\"

The maximum number of identities to return.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

\"\ - }\ - },\ - \"documentation\":\"

Input to the LookupDeveloperIdentityInput action.

\"\ - },\ - \"LookupDeveloperIdentityResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"DeveloperUserIdentifierList\":{\ - \"shape\":\"DeveloperUserIdentifierList\",\ - \"documentation\":\"

This is the list of developer user identifiers associated with an identity ID. Cognito supports the association of multiple developer user identifiers with an identity ID.

\"\ - },\ - \"NextToken\":{\ - \"shape\":\"PaginationKey\",\ - \"documentation\":\"

A pagination token. The first call you make will have NextToken set to null. After that the service will return NextToken values as needed. For example, let's say you make a request with MaxResults set to 10, and there are 20 matches in the database. The service will return a pagination token as a part of the response. This token can be used to call the API again and get results starting from the 11th match.

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a successful LookupDeveloperIdentity action.

\"\ - },\ - \"MappingRule\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"Claim\",\ - \"MatchType\",\ - \"Value\",\ - \"RoleARN\"\ - ],\ - \"members\":{\ - \"Claim\":{\ - \"shape\":\"ClaimName\",\ - \"documentation\":\"

The claim name that must be present in the token, for example, \\\"isAdmin\\\" or \\\"paid\\\".

\"\ - },\ - \"MatchType\":{\ - \"shape\":\"MappingRuleMatchType\",\ - \"documentation\":\"

The match condition that specifies how closely the claim value in the IdP token must match Value.

\"\ - },\ - \"Value\":{\ - \"shape\":\"ClaimValue\",\ - \"documentation\":\"

A brief string that the claim must match, for example, \\\"paid\\\" or \\\"yes\\\".

\"\ - },\ - \"RoleARN\":{\ - \"shape\":\"ARNString\",\ - \"documentation\":\"

The role ARN.

\"\ - }\ - },\ - \"documentation\":\"

A rule that maps a claim name, a claim value, and a match type to a role ARN.

\"\ - },\ - \"MappingRuleMatchType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Equals\",\ - \"Contains\",\ - \"StartsWith\",\ - \"NotEqual\"\ - ]\ - },\ - \"MappingRulesList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"MappingRule\"},\ - \"max\":25,\ - \"min\":1\ - },\ - \"MergeDeveloperIdentitiesInput\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"SourceUserIdentifier\",\ - \"DestinationUserIdentifier\",\ - \"DeveloperProviderName\",\ - \"IdentityPoolId\"\ - ],\ - \"members\":{\ - \"SourceUserIdentifier\":{\ - \"shape\":\"DeveloperUserIdentifier\",\ - \"documentation\":\"

User identifier for the source user. The value should be a DeveloperUserIdentifier.

\"\ - },\ - \"DestinationUserIdentifier\":{\ - \"shape\":\"DeveloperUserIdentifier\",\ - \"documentation\":\"

User identifier for the destination user. The value should be a DeveloperUserIdentifier.

\"\ - },\ - \"DeveloperProviderName\":{\ - \"shape\":\"DeveloperProviderName\",\ - \"documentation\":\"

The \\\"domain\\\" by which Cognito will refer to your users. This is a (pseudo) domain name that you provide while creating an identity pool. This name acts as a placeholder that allows your backend and the Cognito service to communicate about the developer provider. For the DeveloperProviderName, you can use letters as well as period (.), underscore (_), and dash (-).

\"\ - },\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - }\ - },\ - \"documentation\":\"

Input to the MergeDeveloperIdentities action.

\"\ - },\ - \"MergeDeveloperIdentitiesResponse\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - }\ - },\ - \"documentation\":\"

Returned in response to a successful MergeDeveloperIdentities action.

\"\ - },\ - \"NotAuthorizedException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by a NotAuthorizedException

\"\ - }\ - },\ - \"documentation\":\"

Thrown when a user is not authorized to access the requested resource.

\",\ - \"exception\":true\ - },\ - \"OIDCProviderList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ARNString\"}\ - },\ - \"OIDCToken\":{\"type\":\"string\"},\ - \"PaginationKey\":{\ - \"type\":\"string\",\ - \"min\":1,\ - \"pattern\":\"[\\\\S]+\"\ - },\ - \"QueryLimit\":{\ - \"type\":\"integer\",\ - \"max\":60,\ - \"min\":1\ - },\ - \"ResourceConflictException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by a ResourceConflictException.

\"\ - }\ - },\ - \"documentation\":\"

Thrown when a user tries to use a login which is already linked to another account.

\",\ - \"exception\":true\ - },\ - \"ResourceNotFoundException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

The message returned by a ResourceNotFoundException.

\"\ - }\ - },\ - \"documentation\":\"

Thrown when the requested resource (for example, a dataset or record) does not exist.

\",\ - \"exception\":true\ - },\ - \"RoleMapping\":{\ - \"type\":\"structure\",\ - \"required\":[\"Type\"],\ - \"members\":{\ - \"Type\":{\ - \"shape\":\"RoleMappingType\",\ - \"documentation\":\"

The role mapping type. Token will use cognito:roles and cognito:preferred_role claims from the Cognito identity provider token to map groups to roles. Rules will attempt to match claims from the token to map to a role.

\"\ - },\ - \"AmbiguousRoleResolution\":{\ - \"shape\":\"AmbiguousRoleResolutionType\",\ - \"documentation\":\"

If you specify Token or Rules as the Type, AmbiguousRoleResolution is required.

Specifies the action to be taken if either no rules match the claim value for the Rules type, or there is no cognito:preferred_role claim and there are multiple cognito:roles matches for the Token type.

\"\ - },\ - \"RulesConfiguration\":{\ - \"shape\":\"RulesConfigurationType\",\ - \"documentation\":\"

The rules to be used for mapping users to roles.

If you specify Rules as the role mapping type, RulesConfiguration is required.

\"\ - }\ - },\ - \"documentation\":\"

A role mapping.

\"\ - },\ - \"RoleMappingMap\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"IdentityProviderName\"},\ - \"value\":{\"shape\":\"RoleMapping\"},\ - \"max\":10\ - },\ - \"RoleMappingType\":{\ - \"type\":\"string\",\ - \"enum\":[\ - \"Token\",\ - \"Rules\"\ - ]\ - },\ - \"RoleType\":{\ - \"type\":\"string\",\ - \"pattern\":\"(un)?authenticated\"\ - },\ - \"RolesMap\":{\ - \"type\":\"map\",\ - \"key\":{\"shape\":\"RoleType\"},\ - \"value\":{\"shape\":\"ARNString\"},\ - \"max\":2\ - },\ - \"RulesConfigurationType\":{\ - \"type\":\"structure\",\ - \"required\":[\"Rules\"],\ - \"members\":{\ - \"Rules\":{\ - \"shape\":\"MappingRulesList\",\ - \"documentation\":\"

An array of rules. You can specify up to 25 rules per identity provider.

Rules are evaluated in order. The first one to match specifies the role.

\"\ - }\ - },\ - \"documentation\":\"

A container for rules.

\"\ - },\ - \"SAMLProviderList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"ARNString\"}\ - },\ - \"SecretKeyString\":{\"type\":\"string\"},\ - \"SessionTokenString\":{\"type\":\"string\"},\ - \"SetIdentityPoolRolesInput\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IdentityPoolId\",\ - \"Roles\"\ - ],\ - \"members\":{\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"Roles\":{\ - \"shape\":\"RolesMap\",\ - \"documentation\":\"

The map of roles associated with this pool. For a given role, the key will be either \\\"authenticated\\\" or \\\"unauthenticated\\\" and the value will be the Role ARN.

\"\ - },\ - \"RoleMappings\":{\ - \"shape\":\"RoleMappingMap\",\ - \"documentation\":\"

How users for a specific identity provider are to mapped to roles. This is a string to RoleMapping object map. The string identifies the identity provider, for example, \\\"graph.facebook.com\\\" or \\\"cognito-idp-east-1.amazonaws.com/us-east-1_abcdefghi:app_client_id\\\".

Up to 25 rules can be specified per identity provider.

\"\ - }\ - },\ - \"documentation\":\"

Input to the SetIdentityPoolRoles action.

\"\ - },\ - \"String\":{\"type\":\"string\"},\ - \"TokenDuration\":{\ - \"type\":\"long\",\ - \"max\":86400,\ - \"min\":1\ - },\ - \"TooManyRequestsException\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"message\":{\ - \"shape\":\"String\",\ - \"documentation\":\"

Message returned by a TooManyRequestsException

\"\ - }\ - },\ - \"documentation\":\"

Thrown when a request is throttled.

\",\ - \"exception\":true\ - },\ - \"UnlinkDeveloperIdentityInput\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IdentityId\",\ - \"IdentityPoolId\",\ - \"DeveloperProviderName\",\ - \"DeveloperUserIdentifier\"\ - ],\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"IdentityPoolId\":{\ - \"shape\":\"IdentityPoolId\",\ - \"documentation\":\"

An identity pool ID in the format REGION:GUID.

\"\ - },\ - \"DeveloperProviderName\":{\ - \"shape\":\"DeveloperProviderName\",\ - \"documentation\":\"

The \\\"domain\\\" by which Cognito will refer to your users.

\"\ - },\ - \"DeveloperUserIdentifier\":{\ - \"shape\":\"DeveloperUserIdentifier\",\ - \"documentation\":\"

A unique ID used by your backend authentication process to identify a user.

\"\ - }\ - },\ - \"documentation\":\"

Input to the UnlinkDeveloperIdentity action.

\"\ - },\ - \"UnlinkIdentityInput\":{\ - \"type\":\"structure\",\ - \"required\":[\ - \"IdentityId\",\ - \"Logins\",\ - \"LoginsToRemove\"\ - ],\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"Logins\":{\ - \"shape\":\"LoginsMap\",\ - \"documentation\":\"

A set of optional name-value pairs that map provider names to provider tokens.

\"\ - },\ - \"LoginsToRemove\":{\ - \"shape\":\"LoginsList\",\ - \"documentation\":\"

Provider names to unlink from this identity.

\"\ - }\ - },\ - \"documentation\":\"

Input to the UnlinkIdentity action.

\"\ - },\ - \"UnprocessedIdentityId\":{\ - \"type\":\"structure\",\ - \"members\":{\ - \"IdentityId\":{\ - \"shape\":\"IdentityId\",\ - \"documentation\":\"

A unique identifier in the format REGION:GUID.

\"\ - },\ - \"ErrorCode\":{\ - \"shape\":\"ErrorCode\",\ - \"documentation\":\"

The error code indicating the type of error that occurred.

\"\ - }\ - },\ - \"documentation\":\"

An array of UnprocessedIdentityId objects, each of which contains an ErrorCode and IdentityId.

\"\ - },\ - \"UnprocessedIdentityIdList\":{\ - \"type\":\"list\",\ - \"member\":{\"shape\":\"UnprocessedIdentityId\"},\ - \"max\":60\ - }\ - },\ - \"documentation\":\"Amazon Cognito

Amazon Cognito is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. Amazon Cognito uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.

Using Amazon Cognito, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon), and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.

To provide end-user credentials, first make an unsigned call to GetId. If the end user is authenticated with one of the supported identity providers, set the Logins map with the identity provider token. GetId returns a unique identifier for the user.

Next, make an unsigned call to GetCredentialsForIdentity. This call expects the same Logins map as the GetId call, as well as the IdentityID originally returned by GetId. Assuming your identity pool has been configured via the SetIdentityPoolRoles operation, GetCredentialsForIdentity will return AWS credentials for your use. If your pool has not been configured with SetIdentityPoolRoles, or if you want to follow legacy flow, make an unsigned call to GetOpenIdToken, which returns the OpenID token necessary to call STS and retrieve AWS credentials. This call expects the same Logins map as the GetId call, as well as the IdentityID originally returned by GetId. The token returned by GetOpenIdToken can be passed to the STS operation AssumeRoleWithWebIdentity to retrieve AWS credentials.

If you want to use Amazon Cognito in an Android, iOS, or Unity application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the AWS Mobile SDK Developer Guide.

\"\ -}\ -"; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityService.h b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityService.h deleted file mode 100644 index e5ff2d6..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityService.h +++ /dev/null @@ -1,614 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSCore.h" -#import "AWSCognitoIdentityModel.h" -#import "AWSCognitoIdentityResources.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - Amazon Cognito

Amazon Cognito is a web service that delivers scoped temporary credentials to mobile devices and other untrusted environments. Amazon Cognito uniquely identifies a device and supplies the user with a consistent identity over the lifetime of an application.

Using Amazon Cognito, you can enable authentication with one or more third-party identity providers (Facebook, Google, or Login with Amazon), and you can also choose to support unauthenticated access from your app. Cognito delivers a unique identifier for each user and acts as an OpenID token provider trusted by AWS Security Token Service (STS) to access temporary, limited-privilege AWS credentials.

To provide end-user credentials, first make an unsigned call to GetId. If the end user is authenticated with one of the supported identity providers, set the Logins map with the identity provider token. GetId returns a unique identifier for the user.

Next, make an unsigned call to GetCredentialsForIdentity. This call expects the same Logins map as the GetId call, as well as the IdentityID originally returned by GetId. Assuming your identity pool has been configured via the SetIdentityPoolRoles operation, GetCredentialsForIdentity will return AWS credentials for your use. If your pool has not been configured with SetIdentityPoolRoles, or if you want to follow legacy flow, make an unsigned call to GetOpenIdToken, which returns the OpenID token necessary to call STS and retrieve AWS credentials. This call expects the same Logins map as the GetId call, as well as the IdentityID originally returned by GetId. The token returned by GetOpenIdToken can be passed to the STS operation AssumeRoleWithWebIdentity to retrieve AWS credentials.

If you want to use Amazon Cognito in an Android, iOS, or Unity application, you will probably want to make API calls via the AWS Mobile SDK. To learn more, see the AWS Mobile SDK Developer Guide.

- */ -@interface AWSCognitoIdentity : AWSService - -/** - The service configuration used to instantiate this service client. - - @warning Once the client is instantiated, do not modify the configuration object. It may cause unspecified behaviors. - */ -@property (nonatomic, strong, readonly) AWSServiceConfiguration *configuration; - -/** - Returns the singleton service client. If the singleton object does not exist, the SDK instantiates the default service client with `defaultServiceConfiguration` from `[AWSServiceManager defaultServiceManager]`. The reference to this object is maintained by the SDK, and you do not need to retain it manually. - - For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:` - - *Swift* - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") - let configuration = AWSServiceConfiguration(region: .USEast1, credentialsProvider: credentialProvider) - AWSServiceManager.default().defaultServiceConfiguration = configuration - - return true - } - - *Objective-C* - - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 - identityPoolId:@"YourIdentityPoolId"]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSEast1 - credentialsProvider:credentialsProvider]; - [AWSServiceManager defaultServiceManager].defaultServiceConfiguration = configuration; - - return YES; - } - - Then call the following to get the default service client: - - *Swift* - - let CognitoIdentity = AWSCognitoIdentity.default() - - *Objective-C* - - AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity defaultCognitoIdentity]; - - @return The default service client. - */ -+ (instancetype)defaultCognitoIdentity; - -/** - Creates a service client with the given service configuration and registers it for the key. - - For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:` - - *Swift* - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") - let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) - AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity") - - return true - } - - *Objective-C* - - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 - identityPoolId:@"YourIdentityPoolId"]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 - credentialsProvider:credentialsProvider]; - - [AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"]; - - return YES; - } - - Then call the following to get the service client: - - *Swift* - - let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity") - - *Objective-C* - - AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"]; - - @warning After calling this method, do not modify the configuration object. It may cause unspecified behaviors. - - @param configuration A service configuration object. - @param key A string to identify the service client. - */ -+ (void)registerCognitoIdentityWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key; - -/** - Retrieves the service client associated with the key. You need to call `+ registerCognitoIdentityWithConfiguration:forKey:` before invoking this method. - - For example, set the default service configuration in `- application:didFinishLaunchingWithOptions:` - - *Swift* - - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { - let credentialProvider = AWSCognitoCredentialsProvider(regionType: .USEast1, identityPoolId: "YourIdentityPoolId") - let configuration = AWSServiceConfiguration(region: .USWest2, credentialsProvider: credentialProvider) - AWSCognitoIdentity.register(with: configuration!, forKey: "USWest2CognitoIdentity") - - return true - } - - *Objective-C* - - - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - AWSCognitoCredentialsProvider *credentialsProvider = [[AWSCognitoCredentialsProvider alloc] initWithRegionType:AWSRegionUSEast1 - identityPoolId:@"YourIdentityPoolId"]; - AWSServiceConfiguration *configuration = [[AWSServiceConfiguration alloc] initWithRegion:AWSRegionUSWest2 - credentialsProvider:credentialsProvider]; - - [AWSCognitoIdentity registerCognitoIdentityWithConfiguration:configuration forKey:@"USWest2CognitoIdentity"]; - - return YES; - } - - Then call the following to get the service client: - - *Swift* - - let CognitoIdentity = AWSCognitoIdentity(forKey: "USWest2CognitoIdentity") - - *Objective-C* - - AWSCognitoIdentity *CognitoIdentity = [AWSCognitoIdentity CognitoIdentityForKey:@"USWest2CognitoIdentity"]; - - @param key A string to identify the service client. - - @return An instance of the service client. - */ -+ (instancetype)CognitoIdentityForKey:(NSString *)key; - -/** - Removes the service client associated with the key and release it. - - @warning Before calling this method, make sure no method is running on this client. - - @param key A string to identify the service client. - */ -+ (void)removeCognitoIdentityForKey:(NSString *)key; - -/** -

Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for SupportedLoginProviders are as follows:

  • Facebook: graph.facebook.com

  • Google: accounts.google.com

  • Amazon: www.amazon.com

  • Twitter: api.twitter.com

  • Digits: www.digits.com

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the CreateIdentityPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`. - - @see AWSCognitoIdentityCreateIdentityPoolInput - @see AWSCognitoIdentityIdentityPool - */ -- (AWSTask *)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request; - -/** -

Creates a new identity pool. The identity pool is a store of user identity information that is specific to your AWS account. The limit on identity pools is 60 per account. The keys for SupportedLoginProviders are as follows:

  • Facebook: graph.facebook.com

  • Google: accounts.google.com

  • Amazon: www.amazon.com

  • Twitter: api.twitter.com

  • Digits: www.digits.com

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the CreateIdentityPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`. - - @see AWSCognitoIdentityCreateIdentityPoolInput - @see AWSCognitoIdentityIdentityPool - */ -- (void)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DeleteIdentities service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityDeleteIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDeleteIdentitiesInput - @see AWSCognitoIdentityDeleteIdentitiesResponse - */ -- (AWSTask *)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request; - -/** -

Deletes identities from an identity pool. You can specify a list of 1-60 identities that you want to delete.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DeleteIdentities service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDeleteIdentitiesInput - @see AWSCognitoIdentityDeleteIdentitiesResponse - */ -- (void)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityDeleteIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Deletes a user pool. Once a pool is deleted, users will not be able to authenticate with the pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DeleteIdentityPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDeleteIdentityPoolInput - */ -- (AWSTask *)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request; - -/** -

Deletes a user pool. Once a pool is deleted, users will not be able to authenticate with the pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DeleteIdentityPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDeleteIdentityPoolInput - */ -- (void)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Returns metadata related to the given identity, including when the identity was created and any associated linked logins.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DescribeIdentity service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityDescription`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDescribeIdentityInput - @see AWSCognitoIdentityIdentityDescription - */ -- (AWSTask *)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request; - -/** -

Returns metadata related to the given identity, including when the identity was created and any associated linked logins.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DescribeIdentity service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDescribeIdentityInput - @see AWSCognitoIdentityIdentityDescription - */ -- (void)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityDescription * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DescribeIdentityPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDescribeIdentityPoolInput - @see AWSCognitoIdentityIdentityPool - */ -- (AWSTask *)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request; - -/** -

Gets details about a particular identity pool, including the pool name, ID description, creation date, and current number of users.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the DescribeIdentityPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityDescribeIdentityPoolInput - @see AWSCognitoIdentityIdentityPool - */ -- (void)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetCredentialsForIdentity service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetCredentialsForIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityGetCredentialsForIdentityInput - @see AWSCognitoIdentityGetCredentialsForIdentityResponse - */ -- (AWSTask *)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request; - -/** -

Returns credentials for the provided identity ID. Any provided logins will be validated against supported login providers. If the token is for cognito-identity.amazonaws.com, it will be passed through to AWS Security Token Service with the appropriate role for the token.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetCredentialsForIdentity service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityGetCredentialsForIdentityInput - @see AWSCognitoIdentityGetCredentialsForIdentityResponse - */ -- (void)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetCredentialsForIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetId service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetIdResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityGetIdInput - @see AWSCognitoIdentityGetIdResponse - */ -- (AWSTask *)getId:(AWSCognitoIdentityGetIdInput *)request; - -/** -

Generates (or retrieves) a Cognito ID. Supplying multiple logins will create an implicit linked account.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetId service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorLimitExceeded`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityGetIdInput - @see AWSCognitoIdentityGetIdResponse - */ -- (void)getId:(AWSCognitoIdentityGetIdInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetIdResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets the roles for an identity pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetIdentityPoolRoles service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetIdentityPoolRolesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityGetIdentityPoolRolesInput - @see AWSCognitoIdentityGetIdentityPoolRolesResponse - */ -- (AWSTask *)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request; - -/** -

Gets the roles for an identity pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetIdentityPoolRoles service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityGetIdentityPoolRolesInput - @see AWSCognitoIdentityGetIdentityPoolRolesResponse - */ -- (void)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetIdentityPoolRolesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.

The OpenId token is valid for 15 minutes.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetOpenIdToken service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetOpenIdTokenResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityGetOpenIdTokenInput - @see AWSCognitoIdentityGetOpenIdTokenResponse - */ -- (AWSTask *)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request; - -/** -

Gets an OpenID token, using a known Cognito ID. This known Cognito ID is returned by GetId. You can optionally add additional logins for the identity. Supplying multiple logins creates an implicit link.

The OpenId token is valid for 15 minutes.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetOpenIdToken service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityGetOpenIdTokenInput - @see AWSCognitoIdentityGetOpenIdTokenResponse - */ -- (void)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetOpenIdTokenResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.

You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId. This API will create the identity in the specified IdentityPoolId.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered`. - - @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput - @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse - */ -- (AWSTask *)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request; - -/** -

Registers (or retrieves) a Cognito IdentityId and an OpenID Connect token for a user authenticated by your backend authentication process. Supplying multiple logins will create an implicit linked account. You can only specify one developer provider as part of the Logins map, which is linked to the identity pool. The developer provider is the "domain" by which Cognito will refer to your users.

You can use GetOpenIdTokenForDeveloperIdentity to create a new identity and to link new logins (that is, user credentials issued by a public provider or developer provider) to an existing identity. When you want to create a new identity, the IdentityId should be null. When you want to associate a new login with an existing authenticated/unauthenticated identity, you can do so by providing the existing IdentityId. This API will create the identity in the specified IdentityPoolId.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the GetOpenIdTokenForDeveloperIdentity service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered`. - - @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput - @see AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse - */ -- (void)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists the identities in a pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the ListIdentities service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityListIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityListIdentitiesInput - @see AWSCognitoIdentityListIdentitiesResponse - */ -- (AWSTask *)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request; - -/** -

Lists the identities in a pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the ListIdentities service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityListIdentitiesInput - @see AWSCognitoIdentityListIdentitiesResponse - */ -- (void)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityListIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Lists all of the Cognito identity pools registered for your account.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the ListIdentityPools service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityListIdentityPoolsResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityListIdentityPoolsInput - @see AWSCognitoIdentityListIdentityPoolsResponse - */ -- (AWSTask *)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request; - -/** -

Lists all of the Cognito identity pools registered for your account.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the ListIdentityPools service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityListIdentityPoolsInput - @see AWSCognitoIdentityListIdentityPoolsResponse - */ -- (void)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityListIdentityPoolsResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifiers associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the LookupDeveloperIdentity service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityLookupDeveloperIdentityResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityLookupDeveloperIdentityInput - @see AWSCognitoIdentityLookupDeveloperIdentityResponse - */ -- (AWSTask *)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request; - -/** -

Retrieves the IdentityID associated with a DeveloperUserIdentifier or the list of DeveloperUserIdentifiers associated with an IdentityId for an existing identity. Either IdentityID or DeveloperUserIdentifier must not be null. If you supply only one of these values, the other value will be searched in the database and returned as a part of the response. If you supply both, DeveloperUserIdentifier will be matched against IdentityID. If the values are verified against the database, the response returns both values and is the same as the request. Otherwise a ResourceConflictException is thrown.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the LookupDeveloperIdentity service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityLookupDeveloperIdentityInput - @see AWSCognitoIdentityLookupDeveloperIdentityResponse - */ -- (void)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityLookupDeveloperIdentityResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the MergeDeveloperIdentities service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityMergeDeveloperIdentitiesResponse`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityMergeDeveloperIdentitiesInput - @see AWSCognitoIdentityMergeDeveloperIdentitiesResponse - */ -- (AWSTask *)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request; - -/** -

Merges two users having different IdentityIds, existing in the same identity pool, and identified by the same developer provider. You can use this action to request that discrete users be merged and identified as a single user in the Cognito environment. Cognito associates the given source user (SourceUserIdentifier) with the IdentityId of the DestinationUserIdentifier. Only developer-authenticated users can be merged. If the users to be merged are associated with the same public provider, but as two different users, an exception will be thrown.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the MergeDeveloperIdentities service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityMergeDeveloperIdentitiesInput - @see AWSCognitoIdentityMergeDeveloperIdentitiesResponse - */ -- (void)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityMergeDeveloperIdentitiesResponse * _Nullable response, NSError * _Nullable error))completionHandler; - -/** -

Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the SetIdentityPoolRoles service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`. - - @see AWSCognitoIdentitySetIdentityPoolRolesInput - */ -- (AWSTask *)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request; - -/** -

Sets the roles for an identity pool. These roles are used when making calls to GetCredentialsForIdentity action.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the SetIdentityPoolRoles service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`. - - @see AWSCognitoIdentitySetIdentityPoolRolesInput - */ -- (void)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityUnlinkDeveloperIdentityInput - */ -- (AWSTask *)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request; - -/** -

Unlinks a DeveloperUserIdentifier from an existing identity. Unlinked developer users will be considered new identities next time they are seen. If, for a given Cognito identity, you remove all federated identities as well as the developer user identifier, the Cognito identity becomes inaccessible.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the UnlinkDeveloperIdentity service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`. - - @see AWSCognitoIdentityUnlinkDeveloperIdentityInput - */ -- (void)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the UnlinkIdentity service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will be `nil`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityUnlinkIdentityInput - */ -- (AWSTask *)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request; - -/** -

Unlinks a federated identity from an existing account. Unlinked logins will be considered new identities next time they are seen. Removing the last linked login will make this identity inaccessible.

This is a public API. You do not need any credentials to call this API.

- - @param request A container for the necessary parameters to execute the UnlinkIdentity service method. - @param completionHandler The completion handler to call when the load request is complete. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorExternalService`. - - @see AWSCognitoIdentityUnlinkIdentityInput - */ -- (void)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request completionHandler:(void (^ _Nullable)(NSError * _Nullable error))completionHandler; - -/** -

Updates a user pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the UpdateIdentityPool service method. - - @return An instance of `AWSTask`. On successful execution, `task.result` will contain an instance of `AWSCognitoIdentityIdentityPool`. On failed execution, `task.error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`, `AWSCognitoIdentityErrorLimitExceeded`. - - @see AWSCognitoIdentityIdentityPool - @see AWSCognitoIdentityIdentityPool - */ -- (AWSTask *)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request; - -/** -

Updates a user pool.

You must use AWS Developer credentials to call this API.

- - @param request A container for the necessary parameters to execute the UpdateIdentityPool service method. - @param completionHandler The completion handler to call when the load request is complete. - `response` - A response object, or `nil` if the request failed. - `error` - An error object that indicates why the request failed, or `nil` if the request was successful. On failed execution, `error` may contain an `NSError` with `AWSCognitoIdentityErrorDomain` domain and the following error code: `AWSCognitoIdentityErrorInvalidParameter`, `AWSCognitoIdentityErrorResourceNotFound`, `AWSCognitoIdentityErrorNotAuthorized`, `AWSCognitoIdentityErrorResourceConflict`, `AWSCognitoIdentityErrorTooManyRequests`, `AWSCognitoIdentityErrorInternalError`, `AWSCognitoIdentityErrorConcurrentModification`, `AWSCognitoIdentityErrorLimitExceeded`. - - @see AWSCognitoIdentityIdentityPool - @see AWSCognitoIdentityIdentityPool - */ -- (void)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request completionHandler:(void (^ _Nullable)(AWSCognitoIdentityIdentityPool * _Nullable response, NSError * _Nullable error))completionHandler; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityService.m b/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityService.m deleted file mode 100644 index 540187f..0000000 --- a/demo/Pods/AWSCore/AWSCore/CognitoIdentity/AWSCognitoIdentityService.m +++ /dev/null @@ -1,690 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import "AWSCognitoIdentityService.h" -#import "AWSNetworking.h" -#import "AWSCategory.h" -#import "AWSNetworking.h" -#import "AWSSignature.h" -#import "AWSService.h" -#import "AWSURLRequestSerialization.h" -#import "AWSURLResponseSerialization.h" -#import "AWSURLRequestRetryHandler.h" -#import "AWSSynchronizedMutableDictionary.h" -#import "AWSCognitoIdentityResources.h" - -static NSString *const AWSInfoCognitoIdentity = @"CognitoIdentity"; - - -@interface AWSCognitoIdentityResponseSerializer : AWSJSONResponseSerializer - -@end - -@implementation AWSCognitoIdentityResponseSerializer - -#pragma mark - Service errors - -static NSDictionary *errorCodeDictionary = nil; -+ (void)initialize { - errorCodeDictionary = @{ - @"ConcurrentModificationException" : @(AWSCognitoIdentityErrorConcurrentModification), - @"DeveloperUserAlreadyRegisteredException" : @(AWSCognitoIdentityErrorDeveloperUserAlreadyRegistered), - @"ExternalServiceException" : @(AWSCognitoIdentityErrorExternalService), - @"InternalErrorException" : @(AWSCognitoIdentityErrorInternalError), - @"InvalidIdentityPoolConfigurationException" : @(AWSCognitoIdentityErrorInvalidIdentityPoolConfiguration), - @"InvalidParameterException" : @(AWSCognitoIdentityErrorInvalidParameter), - @"LimitExceededException" : @(AWSCognitoIdentityErrorLimitExceeded), - @"NotAuthorizedException" : @(AWSCognitoIdentityErrorNotAuthorized), - @"ResourceConflictException" : @(AWSCognitoIdentityErrorResourceConflict), - @"ResourceNotFoundException" : @(AWSCognitoIdentityErrorResourceNotFound), - @"TooManyRequestsException" : @(AWSCognitoIdentityErrorTooManyRequests), - }; -} - -#pragma mark - - -- (id)responseObjectForResponse:(NSHTTPURLResponse *)response - originalRequest:(NSURLRequest *)originalRequest - currentRequest:(NSURLRequest *)currentRequest - data:(id)data - error:(NSError *__autoreleasing *)error { - id responseObject = [super responseObjectForResponse:response - originalRequest:originalRequest - currentRequest:currentRequest - data:data - error:error]; - if (!*error && [responseObject isKindOfClass:[NSDictionary class]]) { - if (!*error && [responseObject isKindOfClass:[NSDictionary class]]) { - if ([errorCodeDictionary objectForKey:[[[responseObject objectForKey:@"__type"] componentsSeparatedByString:@"#"] lastObject]]) { - if (error) { - *error = [NSError errorWithDomain:AWSCognitoIdentityErrorDomain - code:[[errorCodeDictionary objectForKey:[[[responseObject objectForKey:@"__type"] componentsSeparatedByString:@"#"] lastObject]] integerValue] - userInfo:responseObject]; - } - return responseObject; - } else if ([[[responseObject objectForKey:@"__type"] componentsSeparatedByString:@"#"] lastObject]) { - if (error) { - *error = [NSError errorWithDomain:AWSCognitoIdentityErrorDomain - code:AWSCognitoIdentityErrorUnknown - userInfo:responseObject]; - } - return responseObject; - } - } - } - - if (!*error && response.statusCode/100 != 2) { - *error = [NSError errorWithDomain:AWSCognitoIdentityErrorDomain - code:AWSCognitoIdentityErrorUnknown - userInfo:nil]; - } - - if (!*error && [responseObject isKindOfClass:[NSDictionary class]]) { - if (self.outputClass) { - responseObject = [AWSMTLJSONAdapter modelOfClass:self.outputClass - fromJSONDictionary:responseObject - error:error]; - } - } - - return responseObject; -} - -@end - -@interface AWSCognitoIdentityRequestRetryHandler : AWSURLRequestRetryHandler - -@end - -@implementation AWSCognitoIdentityRequestRetryHandler - -@end - -@interface AWSRequest() - -@property (nonatomic, strong) AWSNetworkingRequest *internalRequest; - -@end - -@interface AWSCognitoIdentity() - -@property (nonatomic, strong) AWSNetworking *networking; -@property (nonatomic, strong) AWSServiceConfiguration *configuration; - -@end - -@interface AWSServiceConfiguration() - -@property (nonatomic, strong) AWSEndpoint *endpoint; - -@end - -@interface AWSEndpoint() - -- (void) setRegion:(AWSRegionType)regionType service:(AWSServiceType)serviceType; - -@end - -@implementation AWSCognitoIdentity - - -#pragma mark - Setup - -static AWSSynchronizedMutableDictionary *_serviceClients = nil; - -+ (instancetype)defaultCognitoIdentity { - static AWSCognitoIdentity *_defaultCognitoIdentity = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - AWSServiceConfiguration *serviceConfiguration = nil; - AWSServiceInfo *serviceInfo = [[AWSInfo defaultAWSInfo] defaultServiceInfo:AWSInfoCognitoIdentity]; - if (serviceInfo) { - serviceConfiguration = [[AWSServiceConfiguration alloc] initWithRegion:serviceInfo.region - credentialsProvider:serviceInfo.cognitoCredentialsProvider]; - } - - if (!serviceConfiguration) { - serviceConfiguration = [AWSServiceManager defaultServiceManager].defaultServiceConfiguration; - } - - if (!serviceConfiguration) { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"The service configuration is `nil`. You need to configure `awsconfiguration.json`, `Info.plist` or set `defaultServiceConfiguration` before using this method." - userInfo:nil]; - } - _defaultCognitoIdentity = [[AWSCognitoIdentity alloc] initWithConfiguration:serviceConfiguration]; - }); - - return _defaultCognitoIdentity; -} - -+ (void)registerCognitoIdentityWithConfiguration:(AWSServiceConfiguration *)configuration forKey:(NSString *)key { - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - _serviceClients = [AWSSynchronizedMutableDictionary new]; - }); - [_serviceClients setObject:[[AWSCognitoIdentity alloc] initWithConfiguration:configuration] - forKey:key]; -} - -+ (instancetype)CognitoIdentityForKey:(NSString *)key { - @synchronized(self) { - AWSCognitoIdentity *serviceClient = [_serviceClients objectForKey:key]; - if (serviceClient) { - return serviceClient; - } - - AWSServiceInfo *serviceInfo = [[AWSInfo defaultAWSInfo] serviceInfo:AWSInfoCognitoIdentity - forKey:key]; - if (serviceInfo) { - AWSServiceConfiguration *serviceConfiguration = [[AWSServiceConfiguration alloc] initWithRegion:serviceInfo.region - credentialsProvider:serviceInfo.cognitoCredentialsProvider]; - [AWSCognitoIdentity registerCognitoIdentityWithConfiguration:serviceConfiguration - forKey:key]; - } - - return [_serviceClients objectForKey:key]; - } -} - -+ (void)removeCognitoIdentityForKey:(NSString *)key { - [_serviceClients removeObjectForKey:key]; -} - -- (instancetype)init { - @throw [NSException exceptionWithName:NSInternalInconsistencyException - reason:@"`- init` is not a valid initializer. Use `+ defaultCognitoIdentity` or `+ CognitoIdentityForKey:` instead." - userInfo:nil]; - return nil; -} - -#pragma mark - - -- (instancetype)initWithConfiguration:(AWSServiceConfiguration *)configuration { - if (self = [super init]) { - _configuration = [configuration copy]; - - if(!configuration.endpoint){ - _configuration.endpoint = [[AWSEndpoint alloc] initWithRegion:_configuration.regionType - service:AWSServiceCognitoIdentity - useUnsafeURL:NO]; - }else{ - [_configuration.endpoint setRegion:_configuration.regionType - service:AWSServiceCognitoIdentity]; - } - - AWSSignatureV4Signer *signer = [[AWSSignatureV4Signer alloc] initWithCredentialsProvider:_configuration.credentialsProvider - endpoint:_configuration.endpoint]; - AWSNetworkingRequestInterceptor *baseInterceptor = [[AWSNetworkingRequestInterceptor alloc] initWithUserAgent:_configuration.userAgent]; - _configuration.requestInterceptors = @[baseInterceptor, signer]; - - _configuration.baseURL = _configuration.endpoint.URL; - _configuration.retryHandler = [[AWSCognitoIdentityRequestRetryHandler alloc] initWithMaximumRetryCount:_configuration.maxRetryCount]; - _configuration.headers = @{@"Content-Type" : @"application/x-amz-json-1.1"}; - - _networking = [[AWSNetworking alloc] initWithConfiguration:_configuration]; - } - - return self; -} - -- (AWSTask *)invokeRequest:(AWSRequest *)request - HTTPMethod:(AWSHTTPMethod)HTTPMethod - URLString:(NSString *) URLString - targetPrefix:(NSString *)targetPrefix - operationName:(NSString *)operationName - outputClass:(Class)outputClass { - - @autoreleasepool { - if (!request) { - request = [AWSRequest new]; - } - - AWSNetworkingRequest *networkingRequest = request.internalRequest; - if (request) { - networkingRequest.parameters = [[AWSMTLJSONAdapter JSONDictionaryFromModel:request] aws_removeNullValues]; - } else { - networkingRequest.parameters = @{}; - } - - NSMutableDictionary *headers = [NSMutableDictionary new]; - headers[@"X-Amz-Target"] = [NSString stringWithFormat:@"%@.%@", targetPrefix, operationName]; - networkingRequest.headers = headers; - networkingRequest.HTTPMethod = HTTPMethod; - networkingRequest.requestSerializer = [[AWSJSONRequestSerializer alloc] initWithJSONDefinition:[[AWSCognitoIdentityResources sharedInstance] JSONObject] - actionName:operationName]; - networkingRequest.responseSerializer = [[AWSCognitoIdentityResponseSerializer alloc] initWithJSONDefinition:[[AWSCognitoIdentityResources sharedInstance] JSONObject] - actionName:operationName - outputClass:outputClass]; - - return [self.networking sendRequest:networkingRequest]; - } -} - -#pragma mark - Service method - -- (AWSTask *)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"CreateIdentityPool" - outputClass:[AWSCognitoIdentityIdentityPool class]]; -} - -- (void)createIdentityPool:(AWSCognitoIdentityCreateIdentityPoolInput *)request - completionHandler:(void (^)(AWSCognitoIdentityIdentityPool *response, NSError *error))completionHandler { - [[self createIdentityPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityIdentityPool *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"DeleteIdentities" - outputClass:[AWSCognitoIdentityDeleteIdentitiesResponse class]]; -} - -- (void)deleteIdentities:(AWSCognitoIdentityDeleteIdentitiesInput *)request - completionHandler:(void (^)(AWSCognitoIdentityDeleteIdentitiesResponse *response, NSError *error))completionHandler { - [[self deleteIdentities:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityDeleteIdentitiesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"DeleteIdentityPool" - outputClass:nil]; -} - -- (void)deleteIdentityPool:(AWSCognitoIdentityDeleteIdentityPoolInput *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self deleteIdentityPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"DescribeIdentity" - outputClass:[AWSCognitoIdentityIdentityDescription class]]; -} - -- (void)describeIdentity:(AWSCognitoIdentityDescribeIdentityInput *)request - completionHandler:(void (^)(AWSCognitoIdentityIdentityDescription *response, NSError *error))completionHandler { - [[self describeIdentity:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityIdentityDescription *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"DescribeIdentityPool" - outputClass:[AWSCognitoIdentityIdentityPool class]]; -} - -- (void)describeIdentityPool:(AWSCognitoIdentityDescribeIdentityPoolInput *)request - completionHandler:(void (^)(AWSCognitoIdentityIdentityPool *response, NSError *error))completionHandler { - [[self describeIdentityPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityIdentityPool *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"GetCredentialsForIdentity" - outputClass:[AWSCognitoIdentityGetCredentialsForIdentityResponse class]]; -} - -- (void)getCredentialsForIdentity:(AWSCognitoIdentityGetCredentialsForIdentityInput *)request - completionHandler:(void (^)(AWSCognitoIdentityGetCredentialsForIdentityResponse *response, NSError *error))completionHandler { - [[self getCredentialsForIdentity:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityGetCredentialsForIdentityResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getId:(AWSCognitoIdentityGetIdInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"GetId" - outputClass:[AWSCognitoIdentityGetIdResponse class]]; -} - -- (void)getId:(AWSCognitoIdentityGetIdInput *)request - completionHandler:(void (^)(AWSCognitoIdentityGetIdResponse *response, NSError *error))completionHandler { - [[self getId:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityGetIdResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"GetIdentityPoolRoles" - outputClass:[AWSCognitoIdentityGetIdentityPoolRolesResponse class]]; -} - -- (void)getIdentityPoolRoles:(AWSCognitoIdentityGetIdentityPoolRolesInput *)request - completionHandler:(void (^)(AWSCognitoIdentityGetIdentityPoolRolesResponse *response, NSError *error))completionHandler { - [[self getIdentityPoolRoles:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityGetIdentityPoolRolesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"GetOpenIdToken" - outputClass:[AWSCognitoIdentityGetOpenIdTokenResponse class]]; -} - -- (void)getOpenIdToken:(AWSCognitoIdentityGetOpenIdTokenInput *)request - completionHandler:(void (^)(AWSCognitoIdentityGetOpenIdTokenResponse *response, NSError *error))completionHandler { - [[self getOpenIdToken:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityGetOpenIdTokenResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"GetOpenIdTokenForDeveloperIdentity" - outputClass:[AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse class]]; -} - -- (void)getOpenIdTokenForDeveloperIdentity:(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityInput *)request - completionHandler:(void (^)(AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse *response, NSError *error))completionHandler { - [[self getOpenIdTokenForDeveloperIdentity:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityGetOpenIdTokenForDeveloperIdentityResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"ListIdentities" - outputClass:[AWSCognitoIdentityListIdentitiesResponse class]]; -} - -- (void)listIdentities:(AWSCognitoIdentityListIdentitiesInput *)request - completionHandler:(void (^)(AWSCognitoIdentityListIdentitiesResponse *response, NSError *error))completionHandler { - [[self listIdentities:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityListIdentitiesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"ListIdentityPools" - outputClass:[AWSCognitoIdentityListIdentityPoolsResponse class]]; -} - -- (void)listIdentityPools:(AWSCognitoIdentityListIdentityPoolsInput *)request - completionHandler:(void (^)(AWSCognitoIdentityListIdentityPoolsResponse *response, NSError *error))completionHandler { - [[self listIdentityPools:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityListIdentityPoolsResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"LookupDeveloperIdentity" - outputClass:[AWSCognitoIdentityLookupDeveloperIdentityResponse class]]; -} - -- (void)lookupDeveloperIdentity:(AWSCognitoIdentityLookupDeveloperIdentityInput *)request - completionHandler:(void (^)(AWSCognitoIdentityLookupDeveloperIdentityResponse *response, NSError *error))completionHandler { - [[self lookupDeveloperIdentity:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityLookupDeveloperIdentityResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"MergeDeveloperIdentities" - outputClass:[AWSCognitoIdentityMergeDeveloperIdentitiesResponse class]]; -} - -- (void)mergeDeveloperIdentities:(AWSCognitoIdentityMergeDeveloperIdentitiesInput *)request - completionHandler:(void (^)(AWSCognitoIdentityMergeDeveloperIdentitiesResponse *response, NSError *error))completionHandler { - [[self mergeDeveloperIdentities:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityMergeDeveloperIdentitiesResponse *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -- (AWSTask *)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"SetIdentityPoolRoles" - outputClass:nil]; -} - -- (void)setIdentityPoolRoles:(AWSCognitoIdentitySetIdentityPoolRolesInput *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self setIdentityPoolRoles:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"UnlinkDeveloperIdentity" - outputClass:nil]; -} - -- (void)unlinkDeveloperIdentity:(AWSCognitoIdentityUnlinkDeveloperIdentityInput *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self unlinkDeveloperIdentity:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"UnlinkIdentity" - outputClass:nil]; -} - -- (void)unlinkIdentity:(AWSCognitoIdentityUnlinkIdentityInput *)request - completionHandler:(void (^)(NSError *error))completionHandler { - [[self unlinkIdentity:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - NSError *error = task.error; - - if (completionHandler) { - completionHandler(error); - } - - return nil; - }]; -} - -- (AWSTask *)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request { - return [self invokeRequest:request - HTTPMethod:AWSHTTPMethodPOST - URLString:@"" - targetPrefix:@"AWSCognitoIdentityService" - operationName:@"UpdateIdentityPool" - outputClass:[AWSCognitoIdentityIdentityPool class]]; -} - -- (void)updateIdentityPool:(AWSCognitoIdentityIdentityPool *)request - completionHandler:(void (^)(AWSCognitoIdentityIdentityPool *response, NSError *error))completionHandler { - [[self updateIdentityPool:request] continueWithBlock:^id _Nullable(AWSTask * _Nonnull task) { - AWSCognitoIdentityIdentityPool *result = task.result; - NSError *error = task.error; - - if (completionHandler) { - completionHandler(result, error); - } - - return nil; - }]; -} - -#pragma mark - - -@end diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB+AWSHelpers.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB+AWSHelpers.h deleted file mode 100644 index 65b2de0..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB+AWSHelpers.h +++ /dev/null @@ -1,53 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import "AWSFMDatabasePool.h" -#import "AWSFMDatabaseQueue.h" - -NS_ASSUME_NONNULL_BEGIN - -@interface AWSFMDatabaseQueue (AWSHelpers) - -/** - Convenience method to open a database queue with the SQLITE_OPEN_FULLMUTEX flag so it can be safely accessed across - threads. - - @param aPath The file path of the database. - - @return The `FMDatabaseQueue` object. `nil` on error. - */ - -+ (instancetype)serialDatabaseQueueWithPath:(NSString*)aPath; - -@end - - -@interface AWSFMDatabasePool (AWSHelpers) - -/** - Convenience method to create a database pool with the SQLITE_OPEN_FULLMUTEX flag so it can be safely accessed across - threads. - - @param aPath The file path of the database. - - @return The `FMDatabasePool` object. `nil` on error. - */ - -+ (instancetype)serialDatabasePoolWithPath:(NSString*)aPath; - -@end - -NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB+AWSHelpers.m b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB+AWSHelpers.m deleted file mode 100644 index fe43aab..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB+AWSHelpers.m +++ /dev/null @@ -1,42 +0,0 @@ -// -// Copyright 2010-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"). -// You may not use this file except in compliance with the License. -// A copy of the License is located at -// -// http://aws.amazon.com/apache2.0 -// -// or in the "license" file accompanying this file. This file is distributed -// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either -// express or implied. See the License for the specific language governing -// permissions and limitations under the License. -// - -#import -#import -#import "AWSFMDB+AWSHelpers.h" - -@implementation AWSFMDatabaseQueue (AWSHelpers) - -+ (instancetype)serialDatabaseQueueWithPath:(NSString*)aPath { - // Open the database queue in readwrite mode, creating if necessary, with full mutex to prevent errors - // when accessing across threads. - int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX; - return [AWSFMDatabaseQueue databaseQueueWithPath:aPath - flags:flags]; -} - -@end - -@implementation AWSFMDatabasePool (AWSHelpers) - -+ (instancetype)serialDatabasePoolWithPath:(NSString*)aPath { - // Open the database pool in readwrite mode, creating if necessary, with full mutex to prevent errors - // when accessing across threads. - int flags = SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE | SQLITE_OPEN_FULLMUTEX; - return [AWSFMDatabasePool databasePoolWithPath:aPath - flags:flags]; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB.h deleted file mode 100644 index 9056ab2..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDB.h +++ /dev/null @@ -1,8 +0,0 @@ -#import "AWSFMDatabase.h" -#import "AWSFMResultSet.h" -#import "AWSFMDatabaseAdditions.h" -#import "AWSFMDatabaseQueue.h" -#import "AWSFMDatabasePool.h" - -// AWS Helpers -#import "AWSFMDB+AWSHelpers.h" diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase+Private.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase+Private.h deleted file mode 100644 index d667426..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase+Private.h +++ /dev/null @@ -1,39 +0,0 @@ -// -// FMDatabase+Private.h -// deleteme2 -// -// Created by Robert Ryan on 8/2/15. -// Copyright (c) 2015 Robert Ryan. All rights reserved. -// - -#ifndef deleteme2_FMDatabase_Private_h -#define deleteme2_FMDatabase_Private_h - -#import - -@class AWSFMDatabase; -@class AWSFMStatement; - -@interface AWSFMDatabase (Private) - -/** SQLite sqlite3 - - @see [`sqlite3`](http://www.sqlite.org/c3ref/sqlite3.html) - */ - -@property (nonatomic, assign, readonly) sqlite3 *db; - -@end - -@interface AWSFMStatement (Private) - -/** SQLite sqlite3_stmt - - @see [`sqlite3_stmt`](http://www.sqlite.org/c3ref/stmt.html) - */ - -@property (nonatomic, assign) sqlite3_stmt *statement; - -@end - -#endif diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase.h deleted file mode 100644 index 2325535..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase.h +++ /dev/null @@ -1,1080 +0,0 @@ -#import -#import "AWSFMResultSet.h" -#import "AWSFMDatabasePool.h" - - -#if ! __has_feature(objc_arc) - #define AWSFMDBAutorelease(__v) ([__v autorelease]); - #define AWSFMDBReturnAutoreleased AWSFMDBAutorelease - - #define AWSFMDBRetain(__v) ([__v retain]); - #define AWSFMDBReturnRetained AWSFMDBRetain - - #define AWSFMDBRelease(__v) ([__v release]); - - #define AWSFMDBDispatchQueueRelease(__v) (dispatch_release(__v)); -#else - // -fobjc-arc - #define AWSFMDBAutorelease(__v) - #define AWSFMDBReturnAutoreleased(__v) (__v) - - #define AWSFMDBRetain(__v) - #define AWSFMDBReturnRetained(__v) (__v) - - #define AWSFMDBRelease(__v) - -// If OS_OBJECT_USE_OBJC=1, then the dispatch objects will be treated like ObjC objects -// and will participate in ARC. -// See the section on "Dispatch Queues and Automatic Reference Counting" in "Grand Central Dispatch (GCD) Reference" for details. - #if OS_OBJECT_USE_OBJC - #define AWSFMDBDispatchQueueRelease(__v) - #else - #define AWSFMDBDispatchQueueRelease(__v) (dispatch_release(__v)); - #endif -#endif - -#if !__has_feature(objc_instancetype) - #define instancetype id -#endif - - -typedef int(^AWSFMDBExecuteStatementsCallbackBlock)(NSDictionary *resultsDictionary); - - -/** A SQLite ([http://sqlite.org/](http://sqlite.org/)) Objective-C wrapper. - - ### Usage - The three main classes in AWSFMDB are: - - - `FMDatabase` - Represents a single SQLite database. Used for executing SQL statements. - - `` - Represents the results of executing a query on an `FMDatabase`. - - `` - If you want to perform queries and updates on multiple threads, you'll want to use this class. - - ### See also - - - `` - A pool of `FMDatabase` objects. - - `` - A wrapper for `sqlite_stmt`. - - ### External links - - - [AWSFMDB on GitHub](https://github.com/ccgus/fmdb) including introductory documentation - - [SQLite web site](http://sqlite.org/) - - [AWSFMDB mailing list](http://groups.google.com/group/fmdb) - - [SQLite FAQ](http://www.sqlite.org/faq.html) - - @warning Do not instantiate a single `FMDatabase` object and use it across multiple threads. Instead, use ``. - - */ - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wobjc-interface-ivars" - - -@interface AWSFMDatabase : NSObject { - - NSString* _databasePath; - BOOL _logsErrors; - BOOL _crashOnErrors; - BOOL _traceExecution; - BOOL _checkedOut; - BOOL _shouldCacheStatements; - BOOL _isExecutingStatement; - BOOL _inTransaction; - NSTimeInterval _maxBusyRetryTimeInterval; - NSTimeInterval _startBusyRetryTime; - - NSMutableDictionary *_cachedStatements; - NSMutableSet *_openResultSets; - NSMutableSet *_openFunctions; - - NSDateFormatter *_dateFormat; -} - -///----------------- -/// @name Properties -///----------------- - -/** Whether should trace execution */ - -@property (atomic, assign) BOOL traceExecution; - -/** Whether checked out or not */ - -@property (atomic, assign) BOOL checkedOut; - -/** Crash on errors */ - -@property (atomic, assign) BOOL crashOnErrors; - -/** Logs errors */ - -@property (atomic, assign) BOOL logsErrors; - -/** Dictionary of cached statements */ - -@property (atomic, retain) NSMutableDictionary *cachedStatements; - -///--------------------- -/// @name Initialization -///--------------------- - -/** Create a `FMDatabase` object. - - An `FMDatabase` is created with a path to a SQLite database file. This path can be one of these three: - - 1. A file system path. The file does not have to exist on disk. If it does not exist, it is created for you. - 2. An empty string (`@""`). An empty database is created at a temporary location. This database is deleted with the `FMDatabase` connection is closed. - 3. `nil`. An in-memory database is created. This database will be destroyed with the `FMDatabase` connection is closed. - - For example, to create/open a database in your Mac OS X `tmp` folder: - - FMDatabase *db = [FMDatabase databaseWithPath:@"/tmp/tmp.db"]; - - Or, in iOS, you might open a database in the app's `Documents` directory: - - NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; - NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"]; - FMDatabase *db = [FMDatabase databaseWithPath:dbPath]; - - (For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html)) - - @param inPath Path of database file - - @return `FMDatabase` object if successful; `nil` if failure. - - */ - -+ (instancetype)databaseWithPath:(NSString*)inPath; - -/** Initialize a `FMDatabase` object. - - An `FMDatabase` is created with a path to a SQLite database file. This path can be one of these three: - - 1. A file system path. The file does not have to exist on disk. If it does not exist, it is created for you. - 2. An empty string (`@""`). An empty database is created at a temporary location. This database is deleted with the `FMDatabase` connection is closed. - 3. `nil`. An in-memory database is created. This database will be destroyed with the `FMDatabase` connection is closed. - - For example, to create/open a database in your Mac OS X `tmp` folder: - - FMDatabase *db = [FMDatabase databaseWithPath:@"/tmp/tmp.db"]; - - Or, in iOS, you might open a database in the app's `Documents` directory: - - NSString *docsPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0]; - NSString *dbPath = [docsPath stringByAppendingPathComponent:@"test.db"]; - FMDatabase *db = [FMDatabase databaseWithPath:dbPath]; - - (For more information on temporary and in-memory databases, read the sqlite documentation on the subject: [http://www.sqlite.org/inmemorydb.html](http://www.sqlite.org/inmemorydb.html)) - - @param inPath Path of database file - - @return `FMDatabase` object if successful; `nil` if failure. - - */ - -- (instancetype)initWithPath:(NSString*)inPath; - - -///----------------------------------- -/// @name Opening and closing database -///----------------------------------- - -/** Opening a new database connection - - The database is opened for reading and writing, and is created if it does not already exist. - - @return `YES` if successful, `NO` on error. - - @see [sqlite3_open()](http://sqlite.org/c3ref/open.html) - @see openWithFlags: - @see close - */ - -- (BOOL)open; - -/** Opening a new database connection with flags and an optional virtual file system (VFS) - - @param flags one of the following three values, optionally combined with the `SQLITE_OPEN_NOMUTEX`, `SQLITE_OPEN_FULLMUTEX`, `SQLITE_OPEN_SHAREDCACHE`, `SQLITE_OPEN_PRIVATECACHE`, and/or `SQLITE_OPEN_URI` flags: - - `SQLITE_OPEN_READONLY` - - The database is opened in read-only mode. If the database does not already exist, an error is returned. - - `SQLITE_OPEN_READWRITE` - - The database is opened for reading and writing if possible, or reading only if the file is write protected by the operating system. In either case the database must already exist, otherwise an error is returned. - - `SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE` - - The database is opened for reading and writing, and is created if it does not already exist. This is the behavior that is always used for `open` method. - - If vfs is given the value is passed to the vfs parameter of sqlite3_open_v2. - - @return `YES` if successful, `NO` on error. - - @see [sqlite3_open_v2()](http://sqlite.org/c3ref/open.html) - @see open - @see close - - @warning Requires SQLite 3.5 - */ - -- (BOOL)openWithFlags:(int)flags; -- (BOOL)openWithFlags:(int)flags vfs:(NSString *)vfsName; - -/** Closing a database connection - - @return `YES` if success, `NO` on error. - - @see [sqlite3_close()](http://sqlite.org/c3ref/close.html) - @see open - @see openWithFlags: - */ - -- (BOOL)close; - -/** Test to see if we have a good connection to the database. - - This will confirm whether: - - - is database open - - if open, it will try a simple SELECT statement and confirm that it succeeds. - - @return `YES` if everything succeeds, `NO` on failure. - */ - -- (BOOL)goodConnection; - - -///---------------------- -/// @name Perform updates -///---------------------- - -/** Execute single update statement - - This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html), [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) to bind values to `?` placeholders in the SQL with the optional list of parameters, and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. - - The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. - - @param sql The SQL to be performed, with optional `?` placeholders. - - @param outErr A reference to the `NSError` pointer to be updated with an auto released `NSError` object if an error if an error occurs. If `nil`, no `NSError` object will be returned. - - @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see lastError - @see lastErrorCode - @see lastErrorMessage - @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) - */ - -- (BOOL)executeUpdate:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ...; - -/** Execute single update statement - - @see executeUpdate:withErrorAndBindings: - - @warning **Deprecated**: Please use `` instead. - */ - -- (BOOL)update:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ... __attribute__ ((deprecated)); - -/** Execute single update statement - - This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html), [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) to bind values to `?` placeholders in the SQL with the optional list of parameters, and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. - - The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. - - @param sql The SQL to be performed, with optional `?` placeholders. - - @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see lastError - @see lastErrorCode - @see lastErrorMessage - @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) - - @note This technique supports the use of `?` placeholders in the SQL, automatically binding any supplied value parameters to those placeholders. This approach is more robust than techniques that entail using `stringWithFormat` to manually build SQL statements, which can be problematic if the values happened to include any characters that needed to be quoted. - - @note If you want to use this from Swift, please note that you must include `FMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as ``. - */ - -- (BOOL)executeUpdate:(NSString*)sql, ...; - -/** Execute single update statement - - This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. Do not use `?` placeholders in the SQL if you use this method. - - @param format The SQL to be performed, with `printf`-style escape sequences. - - @param ... Optional parameters to bind to use in conjunction with the `printf`-style escape sequences in the SQL statement. - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see executeUpdate: - @see lastError - @see lastErrorCode - @see lastErrorMessage - - @note This method does not technically perform a traditional printf-style replacement. What this method actually does is replace the printf-style percent sequences with a SQLite `?` placeholder, and then bind values to that placeholder. Thus the following command - - [db executeUpdateWithFormat:@"INSERT INTO test (name) VALUES (%@)", @"Gus"]; - - is actually replacing the `%@` with `?` placeholder, and then performing something equivalent to `` - - [db executeUpdate:@"INSERT INTO test (name) VALUES (?)", @"Gus"]; - - There are two reasons why this distinction is important. First, the printf-style escape sequences can only be used where it is permissible to use a SQLite `?` placeholder. You can use it only for values in SQL statements, but not for table names or column names or any other non-value context. This method also cannot be used in conjunction with `pragma` statements and the like. Second, note the lack of quotation marks in the SQL. The `VALUES` clause was _not_ `VALUES ('%@')` (like you might have to do if you built a SQL statement using `NSString` method `stringWithFormat`), but rather simply `VALUES (%@)`. - */ - -- (BOOL)executeUpdateWithFormat:(NSString *)format, ... NS_FORMAT_FUNCTION(1,2); - -/** Execute single update statement - - This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) binding any `?` placeholders in the SQL with the optional list of parameters. - - The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. - - @param sql The SQL to be performed, with optional `?` placeholders. - - @param arguments A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see lastError - @see lastErrorCode - @see lastErrorMessage - */ - -- (BOOL)executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments; - -/** Execute single update statement - - This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. - - The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. - - @param sql The SQL to be performed, with optional `?` placeholders. - - @param arguments A `NSDictionary` of objects keyed by column names that will be used when binding values to the `?` placeholders in the SQL statement. - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see lastError - @see lastErrorCode - @see lastErrorMessage -*/ - -- (BOOL)executeUpdate:(NSString*)sql withParameterDictionary:(NSDictionary *)arguments; - - -/** Execute single update statement - - This method executes a single SQL update statement (i.e. any SQL that does not return results, such as `UPDATE`, `INSERT`, or `DELETE`. This method employs [`sqlite3_prepare_v2`](http://sqlite.org/c3ref/prepare.html) and [`sqlite_step`](http://sqlite.org/c3ref/step.html) to perform the update. Unlike the other `executeUpdate` methods, this uses printf-style formatters (e.g. `%s`, `%d`, etc.) to build the SQL. - - The optional values provided to this method should be objects (e.g. `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects), not fundamental data types (e.g. `int`, `long`, `NSInteger`, etc.). This method automatically handles the aforementioned object types, and all other object types will be interpreted as text values using the object's `description` method. - - @param sql The SQL to be performed, with optional `?` placeholders. - - @param args A `va_list` of arguments. - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see lastError - @see lastErrorCode - @see lastErrorMessage - */ - -- (BOOL)executeUpdate:(NSString*)sql withVAList: (va_list)args; - -/** Execute multiple SQL statements - - This executes a series of SQL statements that are combined in a single string (e.g. the SQL generated by the `sqlite3` command line `.dump` command). This accepts no value parameters, but rather simply expects a single string with multiple SQL statements, each terminated with a semicolon. This uses `sqlite3_exec`. - - @param sql The SQL to be performed - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see executeStatements:withResultBlock: - @see [sqlite3_exec()](http://sqlite.org/c3ref/exec.html) - - */ - -- (BOOL)executeStatements:(NSString *)sql; - -/** Execute multiple SQL statements with callback handler - - This executes a series of SQL statements that are combined in a single string (e.g. the SQL generated by the `sqlite3` command line `.dump` command). This accepts no value parameters, but rather simply expects a single string with multiple SQL statements, each terminated with a semicolon. This uses `sqlite3_exec`. - - @param sql The SQL to be performed. - @param block A block that will be called for any result sets returned by any SQL statements. - Note, if you supply this block, it must return integer value, zero upon success (this would be a good opportunity to use SQLITE_OK), - non-zero value upon failure (which will stop the bulk execution of the SQL). If a statement returns values, the block will be called with the results from the query in NSDictionary *resultsDictionary. - This may be `nil` if you don't care to receive any results. - - @return `YES` upon success; `NO` upon failure. If failed, you can call ``, - ``, or `` for diagnostic information regarding the failure. - - @see executeStatements: - @see [sqlite3_exec()](http://sqlite.org/c3ref/exec.html) - - */ - -- (BOOL)executeStatements:(NSString *)sql withResultBlock:(AWSFMDBExecuteStatementsCallbackBlock)block; - -/** Last insert rowid - - Each entry in an SQLite table has a unique 64-bit signed integer key called the "rowid". The rowid is always available as an undeclared column named `ROWID`, `OID`, or `_ROWID_` as long as those names are not also used by explicitly declared columns. If the table has a column of type `INTEGER PRIMARY KEY` then that column is another alias for the rowid. - - This routine returns the rowid of the most recent successful `INSERT` into the database from the database connection in the first argument. As of SQLite version 3.7.7, this routines records the last insert rowid of both ordinary tables and virtual tables. If no successful `INSERT`s have ever occurred on that database connection, zero is returned. - - @return The rowid of the last inserted row. - - @see [sqlite3_last_insert_rowid()](http://sqlite.org/c3ref/last_insert_rowid.html) - - */ - -- (long long int)lastInsertRowId; - -/** The number of rows changed by prior SQL statement. - - This function returns the number of database rows that were changed or inserted or deleted by the most recently completed SQL statement on the database connection specified by the first parameter. Only changes that are directly specified by the INSERT, UPDATE, or DELETE statement are counted. - - @return The number of rows changed by prior SQL statement. - - @see [sqlite3_changes()](http://sqlite.org/c3ref/changes.html) - - */ - -- (int)changes; - - -///------------------------- -/// @name Retrieving results -///------------------------- - -/** Execute select statement - - Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. - - In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[FMResultSet next]>`) from one record to the other. - - This method employs [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) for any optional value parameters. This properly escapes any characters that need escape sequences (e.g. quotation marks), which eliminates simple SQL errors as well as protects against SQL injection attacks. This method natively handles `NSString`, `NSNumber`, `NSNull`, `NSDate`, and `NSData` objects. All other object types will be interpreted as text values using the object's `description` method. - - @param sql The SELECT statement to be performed, with optional `?` placeholders. - - @param ... Optional parameters to bind to `?` placeholders in the SQL statement. These should be Objective-C objects (e.g. `NSString`, `NSNumber`, etc.), not fundamental C data types (e.g. `int`, `char *`, etc.). - - @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see FMResultSet - @see [`FMResultSet next`](<[FMResultSet next]>) - @see [`sqlite3_bind`](http://sqlite.org/c3ref/bind_blob.html) - - @note If you want to use this from Swift, please note that you must include `FMDatabaseVariadic.swift` in your project. Without that, you cannot use this method directly, and instead have to use methods such as ``. - */ - -- (AWSFMResultSet *)executeQuery:(NSString*)sql, ...; - -/** Execute select statement - - Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. - - In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[FMResultSet next]>`) from one record to the other. - - @param format The SQL to be performed, with `printf`-style escape sequences. - - @param ... Optional parameters to bind to use in conjunction with the `printf`-style escape sequences in the SQL statement. - - @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see executeQuery: - @see FMResultSet - @see [`FMResultSet next`](<[FMResultSet next]>) - - @note This method does not technically perform a traditional printf-style replacement. What this method actually does is replace the printf-style percent sequences with a SQLite `?` placeholder, and then bind values to that placeholder. Thus the following command - - [db executeQueryWithFormat:@"SELECT * FROM test WHERE name=%@", @"Gus"]; - - is actually replacing the `%@` with `?` placeholder, and then performing something equivalent to `` - - [db executeQuery:@"SELECT * FROM test WHERE name=?", @"Gus"]; - - There are two reasons why this distinction is important. First, the printf-style escape sequences can only be used where it is permissible to use a SQLite `?` placeholder. You can use it only for values in SQL statements, but not for table names or column names or any other non-value context. This method also cannot be used in conjunction with `pragma` statements and the like. Second, note the lack of quotation marks in the SQL. The `WHERE` clause was _not_ `WHERE name='%@'` (like you might have to do if you built a SQL statement using `NSString` method `stringWithFormat`), but rather simply `WHERE name=%@`. - - */ - -- (AWSFMResultSet *)executeQueryWithFormat:(NSString*)format, ... NS_FORMAT_FUNCTION(1,2); - -/** Execute select statement - - Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. - - In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[FMResultSet next]>`) from one record to the other. - - @param sql The SELECT statement to be performed, with optional `?` placeholders. - - @param arguments A `NSArray` of objects to be used when binding values to the `?` placeholders in the SQL statement. - - @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see FMResultSet - @see [`FMResultSet next`](<[FMResultSet next]>) - */ - -- (AWSFMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments; - -/** Execute select statement - - Executing queries returns an `` object if successful, and `nil` upon failure. Like executing updates, there is a variant that accepts an `NSError **` parameter. Otherwise you should use the `` and `` methods to determine why a query failed. - - In order to iterate through the results of your query, you use a `while()` loop. You also need to "step" (via `<[FMResultSet next]>`) from one record to the other. - - @param sql The SELECT statement to be performed, with optional `?` placeholders. - - @param arguments A `NSDictionary` of objects keyed by column names that will be used when binding values to the `?` placeholders in the SQL statement. - - @return A `` for the result set upon success; `nil` upon failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see FMResultSet - @see [`FMResultSet next`](<[FMResultSet next]>) - */ - -- (AWSFMResultSet *)executeQuery:(NSString *)sql withParameterDictionary:(NSDictionary *)arguments; - - -// Documentation forthcoming. -- (AWSFMResultSet *)executeQuery:(NSString*)sql withVAList: (va_list)args; - -///------------------- -/// @name Transactions -///------------------- - -/** Begin a transaction - - @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see commit - @see rollback - @see beginDeferredTransaction - @see inTransaction - */ - -- (BOOL)beginTransaction; - -/** Begin a deferred transaction - - @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see commit - @see rollback - @see beginTransaction - @see inTransaction - */ - -- (BOOL)beginDeferredTransaction; - -/** Commit a transaction - - Commit a transaction that was initiated with either `` or with ``. - - @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see beginTransaction - @see beginDeferredTransaction - @see rollback - @see inTransaction - */ - -- (BOOL)commit; - -/** Rollback a transaction - - Rollback a transaction that was initiated with either `` or with ``. - - @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see beginTransaction - @see beginDeferredTransaction - @see commit - @see inTransaction - */ - -- (BOOL)rollback; - -/** Identify whether currently in a transaction or not - - @return `YES` if currently within transaction; `NO` if not. - - @see beginTransaction - @see beginDeferredTransaction - @see commit - @see rollback - */ - -- (BOOL)inTransaction; - - -///---------------------------------------- -/// @name Cached statements and result sets -///---------------------------------------- - -/** Clear cached statements */ - -- (void)clearCachedStatements; - -/** Close all open result sets */ - -- (void)closeOpenResultSets; - -/** Whether database has any open result sets - - @return `YES` if there are open result sets; `NO` if not. - */ - -- (BOOL)hasOpenResultSets; - -/** Return whether should cache statements or not - - @return `YES` if should cache statements; `NO` if not. - */ - -- (BOOL)shouldCacheStatements; - -/** Set whether should cache statements or not - - @param value `YES` if should cache statements; `NO` if not. - */ - -- (void)setShouldCacheStatements:(BOOL)value; - - -///------------------------- -/// @name Encryption methods -///------------------------- - -/** Set encryption key. - - @param key The key to be used. - - @return `YES` if success, `NO` on error. - - @see http://www.sqlite-encrypt.com/develop-guide.htm - - @warning You need to have purchased the sqlite encryption extensions for this method to work. - */ - -- (BOOL)setKey:(NSString*)key; - -/** Reset encryption key - - @param key The key to be used. - - @return `YES` if success, `NO` on error. - - @see http://www.sqlite-encrypt.com/develop-guide.htm - - @warning You need to have purchased the sqlite encryption extensions for this method to work. - */ - -- (BOOL)rekey:(NSString*)key; - -/** Set encryption key using `keyData`. - - @param keyData The `NSData` to be used. - - @return `YES` if success, `NO` on error. - - @see http://www.sqlite-encrypt.com/develop-guide.htm - - @warning You need to have purchased the sqlite encryption extensions for this method to work. - */ - -- (BOOL)setKeyWithData:(NSData *)keyData; - -/** Reset encryption key using `keyData`. - - @param keyData The `NSData` to be used. - - @return `YES` if success, `NO` on error. - - @see http://www.sqlite-encrypt.com/develop-guide.htm - - @warning You need to have purchased the sqlite encryption extensions for this method to work. - */ - -- (BOOL)rekeyWithData:(NSData *)keyData; - - -///------------------------------ -/// @name General inquiry methods -///------------------------------ - -/** The path of the database file - - @return path of database. - - */ - -- (NSString *)databasePath; - -/** The underlying SQLite handle - - @return The `sqlite3` pointer. - - */ - -- (void*)sqliteHandle; - - -///----------------------------- -/// @name Retrieving error codes -///----------------------------- - -/** Last error message - - Returns the English-language text that describes the most recent failed SQLite API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, this return value is undefined. - - @return `NSString` of the last error message. - - @see [sqlite3_errmsg()](http://sqlite.org/c3ref/errcode.html) - @see lastErrorCode - @see lastError - - */ - -- (NSString*)lastErrorMessage; - -/** Last error code - - Returns the numeric result code or extended result code for the most recent failed SQLite API call associated with a database connection. If a prior API call failed but the most recent API call succeeded, this return value is undefined. - - @return Integer value of the last error code. - - @see [sqlite3_errcode()](http://sqlite.org/c3ref/errcode.html) - @see lastErrorMessage - @see lastError - - */ - -- (int)lastErrorCode; - -/** Had error - - @return `YES` if there was an error, `NO` if no error. - - @see lastError - @see lastErrorCode - @see lastErrorMessage - - */ - -- (BOOL)hadError; - -/** Last error - - @return `NSError` representing the last error. - - @see lastErrorCode - @see lastErrorMessage - - */ - -- (NSError*)lastError; - - -// description forthcoming -- (void)setMaxBusyRetryTimeInterval:(NSTimeInterval)timeoutInSeconds; -- (NSTimeInterval)maxBusyRetryTimeInterval; - - -///------------------ -/// @name Save points -///------------------ - -/** Start save point - - @param name Name of save point. - - @param outErr A `NSError` object to receive any error object (if any). - - @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see releaseSavePointWithName:error: - @see rollbackToSavePointWithName:error: - */ - -- (BOOL)startSavePointWithName:(NSString*)name error:(NSError**)outErr; - -/** Release save point - - @param name Name of save point. - - @param outErr A `NSError` object to receive any error object (if any). - - @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see startSavePointWithName:error: - @see rollbackToSavePointWithName:error: - - */ - -- (BOOL)releaseSavePointWithName:(NSString*)name error:(NSError**)outErr; - -/** Roll back to save point - - @param name Name of save point. - @param outErr A `NSError` object to receive any error object (if any). - - @return `YES` on success; `NO` on failure. If failed, you can call ``, ``, or `` for diagnostic information regarding the failure. - - @see startSavePointWithName:error: - @see releaseSavePointWithName:error: - - */ - -- (BOOL)rollbackToSavePointWithName:(NSString*)name error:(NSError**)outErr; - -/** Start save point - - @param block Block of code to perform from within save point. - - @return The NSError corresponding to the error, if any. If no error, returns `nil`. - - @see startSavePointWithName:error: - @see releaseSavePointWithName:error: - @see rollbackToSavePointWithName:error: - - */ - -- (NSError*)inSavePoint:(void (^)(BOOL *rollback))block; - - -///---------------------------- -/// @name SQLite library status -///---------------------------- - -/** Test to see if the library is threadsafe - - @return `NO` if and only if SQLite was compiled with mutexing code omitted due to the SQLITE_THREADSAFE compile-time option being set to 0. - - @see [sqlite3_threadsafe()](http://sqlite.org/c3ref/threadsafe.html) - */ - -+ (BOOL)isSQLiteThreadSafe; - -/** Run-time library version numbers - - @return The sqlite library version string. - - @see [sqlite3_libversion()](http://sqlite.org/c3ref/libversion.html) - */ - -+ (NSString*)sqliteLibVersion; - - -+ (NSString*)AWSFMDBUserVersion; - -+ (SInt32)AWSFMDBVersion; - - -///------------------------ -/// @name Make SQL function -///------------------------ - -/** Adds SQL functions or aggregates or to redefine the behavior of existing SQL functions or aggregates. - - For example: - - [queue inDatabase:^(FMDatabase *adb) { - - [adb executeUpdate:@"create table ftest (foo text)"]; - [adb executeUpdate:@"insert into ftest values ('hello')"]; - [adb executeUpdate:@"insert into ftest values ('hi')"]; - [adb executeUpdate:@"insert into ftest values ('not h!')"]; - [adb executeUpdate:@"insert into ftest values ('definitely not h!')"]; - - [adb makeFunctionNamed:@"StringStartsWithH" maximumArguments:1 withBlock:^(sqlite3_context *context, int aargc, sqlite3_value **aargv) { - if (sqlite3_value_type(aargv[0]) == SQLITE_TEXT) { - @autoreleasepool { - const char *c = (const char *)sqlite3_value_text(aargv[0]); - NSString *s = [NSString stringWithUTF8String:c]; - sqlite3_result_int(context, [s hasPrefix:@"h"]); - } - } - else { - NSLog(@"Unknown formart for StringStartsWithH (%d) %s:%d", sqlite3_value_type(aargv[0]), __FUNCTION__, __LINE__); - sqlite3_result_null(context); - } - }]; - - int rowCount = 0; - FMResultSet *ars = [adb executeQuery:@"select * from ftest where StringStartsWithH(foo)"]; - while ([ars next]) { - rowCount++; - NSLog(@"Does %@ start with 'h'?", [rs stringForColumnIndex:0]); - } - AWSFMDBQuickCheck(rowCount == 2); - }]; - - @param name Name of function - - @param count Maximum number of parameters - - @param block The block of code for the function - - @see [sqlite3_create_function()](http://sqlite.org/c3ref/create_function.html) - */ - -- (void)makeFunctionNamed:(NSString*)name maximumArguments:(int)count withBlock:(void (^)(void *context, int argc, void **argv))block; - - -///--------------------- -/// @name Date formatter -///--------------------- - -/** Generate an `NSDateFormatter` that won't be broken by permutations of timezones or locales. - - Use this method to generate values to set the dateFormat property. - - Example: - - myDB.dateFormat = [FMDatabase storeableDateFormat:@"yyyy-MM-dd HH:mm:ss"]; - - @param format A valid NSDateFormatter format string. - - @return A `NSDateFormatter` that can be used for converting dates to strings and vice versa. - - @see hasDateFormatter - @see setDateFormat: - @see dateFromString: - @see stringFromDate: - @see storeableDateFormat: - - @warning Note that `NSDateFormatter` is not thread-safe, so the formatter generated by this method should be assigned to only one AWSFMDB instance and should not be used for other purposes. - - */ - -+ (NSDateFormatter *)storeableDateFormat:(NSString *)format; - -/** Test whether the database has a date formatter assigned. - - @return `YES` if there is a date formatter; `NO` if not. - - @see hasDateFormatter - @see setDateFormat: - @see dateFromString: - @see stringFromDate: - @see storeableDateFormat: - */ - -- (BOOL)hasDateFormatter; - -/** Set to a date formatter to use string dates with sqlite instead of the default UNIX timestamps. - - @param format Set to nil to use UNIX timestamps. Defaults to nil. Should be set using a formatter generated using FMDatabase::storeableDateFormat. - - @see hasDateFormatter - @see setDateFormat: - @see dateFromString: - @see stringFromDate: - @see storeableDateFormat: - - @warning Note there is no direct getter for the `NSDateFormatter`, and you should not use the formatter you pass to AWSFMDB for other purposes, as `NSDateFormatter` is not thread-safe. - */ - -- (void)setDateFormat:(NSDateFormatter *)format; - -/** Convert the supplied NSString to NSDate, using the current database formatter. - - @param s `NSString` to convert to `NSDate`. - - @return The `NSDate` object; or `nil` if no formatter is set. - - @see hasDateFormatter - @see setDateFormat: - @see dateFromString: - @see stringFromDate: - @see storeableDateFormat: - */ - -- (NSDate *)dateFromString:(NSString *)s; - -/** Convert the supplied NSDate to NSString, using the current database formatter. - - @param date `NSDate` of date to convert to `NSString`. - - @return The `NSString` representation of the date; `nil` if no formatter is set. - - @see hasDateFormatter - @see setDateFormat: - @see dateFromString: - @see stringFromDate: - @see storeableDateFormat: - */ - -- (NSString *)stringFromDate:(NSDate *)date; - -@end - - -/** Objective-C wrapper for `sqlite3_stmt` - - This is a wrapper for a SQLite `sqlite3_stmt`. Generally when using AWSFMDB you will not need to interact directly with `FMStatement`, but rather with `` and `` only. - - ### See also - - - `` - - `` - - [`sqlite3_stmt`](http://www.sqlite.org/c3ref/stmt.html) - */ - -@interface AWSFMStatement : NSObject { - NSString *_query; - long _useCount; - BOOL _inUse; -} - -///----------------- -/// @name Properties -///----------------- - -/** Usage count */ - -@property (atomic, assign) long useCount; - -/** SQL statement */ - -@property (atomic, retain) NSString *query; - -/** SQLite sqlite3_stmt - - @see [`sqlite3_stmt`](http://www.sqlite.org/c3ref/stmt.html) - */ - -@property (atomic, assign) void *statement; - -/** Indication of whether the statement is in use */ - -@property (atomic, assign) BOOL inUse; - -///---------------------------- -/// @name Closing and Resetting -///---------------------------- - -/** Close statement */ - -- (void)close; - -/** Reset statement */ - -- (void)reset; - -@end - -#pragma clang diagnostic pop - diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase.m b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase.m deleted file mode 100644 index 824b65f..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabase.m +++ /dev/null @@ -1,1446 +0,0 @@ -#import "AWSFMDatabase.h" -#import "unistd.h" -#import -#import "AWSFMDatabase+Private.h" - -@interface AWSFMDatabase () - -@property (nonatomic, assign) sqlite3 *db; - -- (AWSFMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args; -- (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args; - -@end - -@implementation AWSFMDatabase -@synthesize cachedStatements=_cachedStatements; -@synthesize logsErrors=_logsErrors; -@synthesize crashOnErrors=_crashOnErrors; -@synthesize checkedOut=_checkedOut; -@synthesize traceExecution=_traceExecution; - -#pragma mark FMDatabase instantiation and deallocation - -+ (instancetype)databaseWithPath:(NSString*)aPath { - return AWSFMDBReturnAutoreleased([[self alloc] initWithPath:aPath]); -} - -- (instancetype)init { - return [self initWithPath:nil]; -} - -- (instancetype)initWithPath:(NSString*)aPath { - - assert(sqlite3_threadsafe()); // whoa there big boy- gotta make sure sqlite it happy with what we're going to do. - - self = [super init]; - - if (self) { - _databasePath = [aPath copy]; - _openResultSets = [[NSMutableSet alloc] init]; - _db = nil; - _logsErrors = YES; - _crashOnErrors = NO; - _maxBusyRetryTimeInterval = 2; - } - - return self; -} - -#if ! __has_feature(objc_arc) -- (void)finalize { - [self close]; - [super finalize]; -} -#endif - -- (void)dealloc { - [self close]; - AWSFMDBRelease(_openResultSets); - AWSFMDBRelease(_cachedStatements); - AWSFMDBRelease(_dateFormat); - AWSFMDBRelease(_databasePath); - AWSFMDBRelease(_openFunctions); - -#if ! __has_feature(objc_arc) - [super dealloc]; -#endif -} - -- (NSString *)databasePath { - return _databasePath; -} - -+ (NSString*)AWSFMDBUserVersion { - return @"2.5"; -} - -// returns 0x0240 for version 2.4. This makes it super easy to do things like: -// /* need to make sure to do X with AWSFMDB version 2.4 or later */ -// if ([FMDatabase AWSFMDBVersion] >= 0x0240) { … } - -+ (SInt32)AWSFMDBVersion { - - // we go through these hoops so that we only have to change the version number in a single spot. - static dispatch_once_t once; - static SInt32 AWSFMDBVersionVal = 0; - - dispatch_once(&once, ^{ - NSString *prodVersion = [self AWSFMDBUserVersion]; - - if ([[prodVersion componentsSeparatedByString:@"."] count] < 3) { - prodVersion = [prodVersion stringByAppendingString:@".0"]; - } - - NSString *junk = [prodVersion stringByReplacingOccurrencesOfString:@"." withString:@""]; - - char *e = nil; - AWSFMDBVersionVal = (int) strtoul([junk UTF8String], &e, 16); - - }); - - - return AWSFMDBVersionVal; -} - -#pragma mark SQLite information - -+ (NSString*)sqliteLibVersion { - return [NSString stringWithFormat:@"%s", sqlite3_libversion()]; -} - -+ (BOOL)isSQLiteThreadSafe { - // make sure to read the sqlite headers on this guy! - return sqlite3_threadsafe() != 0; -} - -- (void*)sqliteHandle { - return _db; -} - -- (const char*)sqlitePath { - - if (!_databasePath) { - return ":memory:"; - } - - if ([_databasePath length] == 0) { - return ""; // this creates a temporary database (it's an sqlite thing). - } - - return [_databasePath fileSystemRepresentation]; - -} - -#pragma mark Open and close database - -- (BOOL)open { - if (_db) { - return YES; - } - - int err = sqlite3_open([self sqlitePath], &_db ); - if(err != SQLITE_OK) { - NSLog(@"error opening!: %d", err); - return NO; - } - - if (_maxBusyRetryTimeInterval > 0.0) { - // set the handler - [self setMaxBusyRetryTimeInterval:_maxBusyRetryTimeInterval]; - } - - - return YES; -} - -- (BOOL)openWithFlags:(int)flags { - return [self openWithFlags:flags vfs:nil]; -} -- (BOOL)openWithFlags:(int)flags vfs:(NSString *)vfsName; { -#if SQLITE_VERSION_NUMBER >= 3005000 - if (_db) { - return YES; - } - - int err = sqlite3_open_v2([self sqlitePath], &_db, flags, [vfsName UTF8String]); - if(err != SQLITE_OK) { - NSLog(@"error opening!: %d", err); - return NO; - } - - if (_maxBusyRetryTimeInterval > 0.0) { - // set the handler - [self setMaxBusyRetryTimeInterval:_maxBusyRetryTimeInterval]; - } - - return YES; -#else - NSLog(@"Requires SQLite 3.5; will just open"); - return [self open]; -#endif - -} - - -- (BOOL)close { - - [self clearCachedStatements]; - [self closeOpenResultSets]; - - if (!_db) { - return YES; - } - - int rc; - BOOL retry; - BOOL triedFinalizingOpenStatements = NO; - - do { - retry = NO; - rc = sqlite3_close(_db); - if (SQLITE_BUSY == rc || SQLITE_LOCKED == rc) { - if (!triedFinalizingOpenStatements) { - triedFinalizingOpenStatements = YES; - sqlite3_stmt *pStmt; - while ((pStmt = sqlite3_next_stmt(_db, nil)) !=0) { - NSLog(@"Closing leaked statement"); - sqlite3_finalize(pStmt); - retry = YES; - } - } - } - else if (SQLITE_OK != rc) { - NSLog(@"error closing!: %d", rc); - } - } - while (retry); - - _db = nil; - return YES; -} - -#pragma mark Busy handler routines - -// NOTE: appledoc seems to choke on this function for some reason; -// so when generating documentation, you might want to ignore the -// .m files so that it only documents the public interfaces outlined -// in the .h files. -// -// This is a known appledoc bug that it has problems with C functions -// within a class implementation, but for some reason, only this -// C function causes problems; the rest don't. Anyway, ignoring the .m -// files with appledoc will prevent this problem from occurring. - -static int AWSFMDBDatabaseBusyHandler(void *f, int count) { - AWSFMDatabase *self = (__bridge AWSFMDatabase*)f; - - if (count == 0) { - self->_startBusyRetryTime = [NSDate timeIntervalSinceReferenceDate]; - return 1; - } - - NSTimeInterval delta = [NSDate timeIntervalSinceReferenceDate] - (self->_startBusyRetryTime); - - if (delta < [self maxBusyRetryTimeInterval]) { - int requestedSleepInMillseconds = (int) arc4random_uniform(50) + 50; - int actualSleepInMilliseconds = sqlite3_sleep(requestedSleepInMillseconds); - if (actualSleepInMilliseconds != requestedSleepInMillseconds) { - NSLog(@"WARNING: Requested sleep of %i milliseconds, but SQLite returned %i. Maybe SQLite wasn't built with HAVE_USLEEP=1?", requestedSleepInMillseconds, actualSleepInMilliseconds); - } - return 1; - } - - return 0; -} - -- (void)setMaxBusyRetryTimeInterval:(NSTimeInterval)timeout { - - _maxBusyRetryTimeInterval = timeout; - - if (!_db) { - return; - } - - if (timeout > 0) { - sqlite3_busy_handler(_db, &AWSFMDBDatabaseBusyHandler, (__bridge void *)(self)); - } - else { - // turn it off otherwise - sqlite3_busy_handler(_db, nil, nil); - } -} - -- (NSTimeInterval)maxBusyRetryTimeInterval { - return _maxBusyRetryTimeInterval; -} - - -// we no longer make busyRetryTimeout public -// but for folks who don't bother noticing that the interface to FMDatabase changed, -// we'll still implement the method so they don't get suprise crashes -- (int)busyRetryTimeout { - NSLog(@"%s:%d", __FUNCTION__, __LINE__); - NSLog(@"AWSFMDB: busyRetryTimeout no longer works, please use maxBusyRetryTimeInterval"); - return -1; -} - -- (void)setBusyRetryTimeout:(int)i { - NSLog(@"%s:%d", __FUNCTION__, __LINE__); - NSLog(@"AWSFMDB: setBusyRetryTimeout does nothing, please use setMaxBusyRetryTimeInterval:"); -} - -#pragma mark Result set functions - -- (BOOL)hasOpenResultSets { - return [_openResultSets count] > 0; -} - -- (void)closeOpenResultSets { - - //Copy the set so we don't get mutation errors - NSSet *openSetCopy = AWSFMDBReturnAutoreleased([_openResultSets copy]); - for (NSValue *rsInWrappedInATastyValueMeal in openSetCopy) { - AWSFMResultSet *rs = (AWSFMResultSet *)[rsInWrappedInATastyValueMeal pointerValue]; - - [rs setParentDB:nil]; - [rs close]; - - [_openResultSets removeObject:rsInWrappedInATastyValueMeal]; - } -} - -- (void)resultSetDidClose:(AWSFMResultSet *)resultSet { - NSValue *setValue = [NSValue valueWithNonretainedObject:resultSet]; - - [_openResultSets removeObject:setValue]; -} - -#pragma mark Cached statements - -- (void)clearCachedStatements { - - for (NSMutableSet *statements in [_cachedStatements objectEnumerator]) { - [statements makeObjectsPerformSelector:@selector(close)]; - } - - [_cachedStatements removeAllObjects]; -} - -- (AWSFMStatement*)cachedStatementForQuery:(NSString*)query { - - NSMutableSet* statements = [_cachedStatements objectForKey:query]; - - return [[statements objectsPassingTest:^BOOL(AWSFMStatement* statement, BOOL *stop) { - - *stop = ![statement inUse]; - return *stop; - - }] anyObject]; -} - - -- (void)setCachedStatement:(AWSFMStatement*)statement forQuery:(nonnull NSString*)query { - - query = [query copy]; // in case we got handed in a mutable string... - [statement setQuery:query]; - - NSMutableSet* statements = [_cachedStatements objectForKey:query]; - if (!statements) { - statements = [NSMutableSet set]; - } - - [statements addObject:statement]; - - [_cachedStatements setObject:statements forKey:query]; - - AWSFMDBRelease(query); -} - -#pragma mark Key routines - -- (BOOL)rekey:(NSString*)key { - NSData *keyData = [NSData dataWithBytes:(void *)[key UTF8String] length:(NSUInteger)strlen([key UTF8String])]; - - return [self rekeyWithData:keyData]; -} - -- (BOOL)rekeyWithData:(NSData *)keyData { -#ifdef SQLITE_HAS_CODEC - if (!keyData) { - return NO; - } - - int rc = sqlite3_rekey(_db, [keyData bytes], (int)[keyData length]); - - if (rc != SQLITE_OK) { - NSLog(@"error on rekey: %d", rc); - NSLog(@"%@", [self lastErrorMessage]); - } - - return (rc == SQLITE_OK); -#else - return NO; -#endif -} - -- (BOOL)setKey:(NSString*)key { - NSData *keyData = [NSData dataWithBytes:[key UTF8String] length:(NSUInteger)strlen([key UTF8String])]; - - return [self setKeyWithData:keyData]; -} - -- (BOOL)setKeyWithData:(NSData *)keyData { -#ifdef SQLITE_HAS_CODEC - if (!keyData) { - return NO; - } - - int rc = sqlite3_key(_db, [keyData bytes], (int)[keyData length]); - - return (rc == SQLITE_OK); -#else - return NO; -#endif -} - -#pragma mark Date routines - -+ (NSDateFormatter *)storeableDateFormat:(NSString *)format { - - NSDateFormatter *result = AWSFMDBReturnAutoreleased([[NSDateFormatter alloc] init]); - result.dateFormat = format; - result.timeZone = [NSTimeZone timeZoneForSecondsFromGMT:0]; - result.locale = AWSFMDBReturnAutoreleased([[NSLocale alloc] initWithLocaleIdentifier:@"en_US"]); - return result; -} - - -- (BOOL)hasDateFormatter { - return _dateFormat != nil; -} - -- (void)setDateFormat:(NSDateFormatter *)format { - AWSFMDBAutorelease(_dateFormat); - _dateFormat = AWSFMDBReturnRetained(format); -} - -- (NSDate *)dateFromString:(NSString *)s { - return [_dateFormat dateFromString:s]; -} - -- (NSString *)stringFromDate:(NSDate *)date { - return [_dateFormat stringFromDate:date]; -} - -#pragma mark State of database - -- (BOOL)goodConnection { - - if (!_db) { - return NO; - } - - AWSFMResultSet *rs = [self executeQuery:@"select name from sqlite_master where type='table'"]; - - if (rs) { - [rs close]; - return YES; - } - - return NO; -} - -- (void)warnInUse { - NSLog(@"The FMDatabase %@ is currently in use.", self); - -#ifndef NS_BLOCK_ASSERTIONS - if (_crashOnErrors) { - NSAssert(false, @"The FMDatabase %@ is currently in use.", self); - abort(); - } -#endif -} - -- (BOOL)databaseExists { - - if (!_db) { - - NSLog(@"The FMDatabase %@ is not open.", self); - - #ifndef NS_BLOCK_ASSERTIONS - if (_crashOnErrors) { - NSAssert(false, @"The FMDatabase %@ is not open.", self); - abort(); - } - #endif - - return NO; - } - - return YES; -} - -#pragma mark Error routines - -- (NSString*)lastErrorMessage { - return [NSString stringWithUTF8String:sqlite3_errmsg(_db)]; -} - -- (BOOL)hadError { - int lastErrCode = [self lastErrorCode]; - - return (lastErrCode > SQLITE_OK && lastErrCode < SQLITE_ROW); -} - -- (int)lastErrorCode { - return sqlite3_errcode(_db); -} - -- (NSError*)errorWithMessage:(NSString*)message { - NSDictionary* errorMessage = [NSDictionary dictionaryWithObject:message forKey:NSLocalizedDescriptionKey]; - - return [NSError errorWithDomain:@"AWSFMDatabase" code:sqlite3_errcode(_db) userInfo:errorMessage]; -} - -- (NSError*)lastError { - return [self errorWithMessage:[self lastErrorMessage]]; -} - -#pragma mark Update information routines - -- (sqlite_int64)lastInsertRowId { - - if (_isExecutingStatement) { - [self warnInUse]; - return NO; - } - - _isExecutingStatement = YES; - - sqlite_int64 ret = sqlite3_last_insert_rowid(_db); - - _isExecutingStatement = NO; - - return ret; -} - -- (int)changes { - if (_isExecutingStatement) { - [self warnInUse]; - return 0; - } - - _isExecutingStatement = YES; - - int ret = sqlite3_changes(_db); - - _isExecutingStatement = NO; - - return ret; -} - -#pragma mark SQL manipulation - -- (void)bindObject:(id)obj toColumn:(int)idx inStatement:(sqlite3_stmt*)pStmt { - - if ((!obj) || ((NSNull *)obj == [NSNull null])) { - sqlite3_bind_null(pStmt, idx); - } - - // FIXME - someday check the return codes on these binds. - else if ([obj isKindOfClass:[NSData class]]) { - const void *bytes = [obj bytes]; - if (!bytes) { - // it's an empty NSData object, aka [NSData data]. - // Don't pass a NULL pointer, or sqlite will bind a SQL null instead of a blob. - bytes = ""; - } - sqlite3_bind_blob(pStmt, idx, bytes, (int)[obj length], SQLITE_STATIC); - } - else if ([obj isKindOfClass:[NSDate class]]) { - if (self.hasDateFormatter) - sqlite3_bind_text(pStmt, idx, [[self stringFromDate:obj] UTF8String], -1, SQLITE_STATIC); - else - sqlite3_bind_double(pStmt, idx, [obj timeIntervalSince1970]); - } - else if ([obj isKindOfClass:[NSNumber class]]) { - - if (strcmp([obj objCType], @encode(char)) == 0) { - sqlite3_bind_int(pStmt, idx, [obj charValue]); - } - else if (strcmp([obj objCType], @encode(unsigned char)) == 0) { - sqlite3_bind_int(pStmt, idx, [obj unsignedCharValue]); - } - else if (strcmp([obj objCType], @encode(short)) == 0) { - sqlite3_bind_int(pStmt, idx, [obj shortValue]); - } - else if (strcmp([obj objCType], @encode(unsigned short)) == 0) { - sqlite3_bind_int(pStmt, idx, [obj unsignedShortValue]); - } - else if (strcmp([obj objCType], @encode(int)) == 0) { - sqlite3_bind_int(pStmt, idx, [obj intValue]); - } - else if (strcmp([obj objCType], @encode(unsigned int)) == 0) { - sqlite3_bind_int64(pStmt, idx, (long long)[obj unsignedIntValue]); - } - else if (strcmp([obj objCType], @encode(long)) == 0) { - sqlite3_bind_int64(pStmt, idx, [obj longValue]); - } - else if (strcmp([obj objCType], @encode(unsigned long)) == 0) { - sqlite3_bind_int64(pStmt, idx, (long long)[obj unsignedLongValue]); - } - else if (strcmp([obj objCType], @encode(long long)) == 0) { - sqlite3_bind_int64(pStmt, idx, [obj longLongValue]); - } - else if (strcmp([obj objCType], @encode(unsigned long long)) == 0) { - sqlite3_bind_int64(pStmt, idx, (long long)[obj unsignedLongLongValue]); - } - else if (strcmp([obj objCType], @encode(float)) == 0) { - sqlite3_bind_double(pStmt, idx, [obj floatValue]); - } - else if (strcmp([obj objCType], @encode(double)) == 0) { - sqlite3_bind_double(pStmt, idx, [obj doubleValue]); - } - else if (strcmp([obj objCType], @encode(BOOL)) == 0) { - sqlite3_bind_int(pStmt, idx, ([obj boolValue] ? 1 : 0)); - } - else { - sqlite3_bind_text(pStmt, idx, [[obj description] UTF8String], -1, SQLITE_STATIC); - } - } - else { - sqlite3_bind_text(pStmt, idx, [[obj description] UTF8String], -1, SQLITE_STATIC); - } -} - -- (void)extractSQL:(NSString *)sql argumentsList:(va_list)args intoString:(NSMutableString *)cleanedSQL arguments:(NSMutableArray *)arguments { - - NSUInteger length = [sql length]; - unichar last = '\0'; - for (NSUInteger i = 0; i < length; ++i) { - id arg = nil; - unichar current = [sql characterAtIndex:i]; - unichar add = current; - if (last == '%') { - switch (current) { - case '@': - arg = va_arg(args, id); - break; - case 'c': - // warning: second argument to 'va_arg' is of promotable type 'char'; this va_arg has undefined behavior because arguments will be promoted to 'int' - arg = [NSString stringWithFormat:@"%c", va_arg(args, int)]; - break; - case 's': - arg = [NSString stringWithUTF8String:va_arg(args, char*)]; - break; - case 'd': - case 'D': - case 'i': - arg = [NSNumber numberWithInt:va_arg(args, int)]; - break; - case 'u': - case 'U': - arg = [NSNumber numberWithUnsignedInt:va_arg(args, unsigned int)]; - break; - case 'h': - i++; - if (i < length && [sql characterAtIndex:i] == 'i') { - // warning: second argument to 'va_arg' is of promotable type 'short'; this va_arg has undefined behavior because arguments will be promoted to 'int' - arg = [NSNumber numberWithShort:(short)(va_arg(args, int))]; - } - else if (i < length && [sql characterAtIndex:i] == 'u') { - // warning: second argument to 'va_arg' is of promotable type 'unsigned short'; this va_arg has undefined behavior because arguments will be promoted to 'int' - arg = [NSNumber numberWithUnsignedShort:(unsigned short)(va_arg(args, uint))]; - } - else { - i--; - } - break; - case 'q': - i++; - if (i < length && [sql characterAtIndex:i] == 'i') { - arg = [NSNumber numberWithLongLong:va_arg(args, long long)]; - } - else if (i < length && [sql characterAtIndex:i] == 'u') { - arg = [NSNumber numberWithUnsignedLongLong:va_arg(args, unsigned long long)]; - } - else { - i--; - } - break; - case 'f': - arg = [NSNumber numberWithDouble:va_arg(args, double)]; - break; - case 'g': - // warning: second argument to 'va_arg' is of promotable type 'float'; this va_arg has undefined behavior because arguments will be promoted to 'double' - arg = [NSNumber numberWithFloat:(float)(va_arg(args, double))]; - break; - case 'l': - i++; - if (i < length) { - unichar next = [sql characterAtIndex:i]; - if (next == 'l') { - i++; - if (i < length && [sql characterAtIndex:i] == 'd') { - //%lld - arg = [NSNumber numberWithLongLong:va_arg(args, long long)]; - } - else if (i < length && [sql characterAtIndex:i] == 'u') { - //%llu - arg = [NSNumber numberWithUnsignedLongLong:va_arg(args, unsigned long long)]; - } - else { - i--; - } - } - else if (next == 'd') { - //%ld - arg = [NSNumber numberWithLong:va_arg(args, long)]; - } - else if (next == 'u') { - //%lu - arg = [NSNumber numberWithUnsignedLong:va_arg(args, unsigned long)]; - } - else { - i--; - } - } - else { - i--; - } - break; - default: - // something else that we can't interpret. just pass it on through like normal - break; - } - } - else if (current == '%') { - // percent sign; skip this character - add = '\0'; - } - - if (arg != nil) { - [cleanedSQL appendString:@"?"]; - [arguments addObject:arg]; - } - else if (add == (unichar)'@' && last == (unichar) '%') { - [cleanedSQL appendFormat:@"NULL"]; - } - else if (add != '\0') { - [cleanedSQL appendFormat:@"%C", add]; - } - last = current; - } -} - -#pragma mark Execute queries - -- (AWSFMResultSet *)executeQuery:(NSString *)sql withParameterDictionary:(NSDictionary *)arguments { - return [self executeQuery:sql withArgumentsInArray:nil orDictionary:arguments orVAList:nil]; -} - -- (AWSFMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args { - - if (![self databaseExists]) { - return 0x00; - } - - if (_isExecutingStatement) { - [self warnInUse]; - return 0x00; - } - - _isExecutingStatement = YES; - - int rc = 0x00; - sqlite3_stmt *pStmt = 0x00; - AWSFMStatement *statement = 0x00; - AWSFMResultSet *rs = 0x00; - - if (_traceExecution && sql) { - NSLog(@"%@ executeQuery: %@", self, sql); - } - - if (_shouldCacheStatements) { - statement = [self cachedStatementForQuery:sql]; - pStmt = statement ? [statement statement] : 0x00; - [statement reset]; - } - - if (!pStmt) { - - rc = sqlite3_prepare_v2(_db, [sql UTF8String], -1, &pStmt, 0); - - if (SQLITE_OK != rc) { - if (_logsErrors) { - NSLog(@"DB Error: %d \"%@\"", [self lastErrorCode], [self lastErrorMessage]); - NSLog(@"DB Query: %@", sql); - NSLog(@"DB Path: %@", _databasePath); - } - - if (_crashOnErrors) { - NSAssert(false, @"DB Error: %d \"%@\"", [self lastErrorCode], [self lastErrorMessage]); - abort(); - } - - sqlite3_finalize(pStmt); - _isExecutingStatement = NO; - return nil; - } - } - - id obj; - int idx = 0; - int queryCount = sqlite3_bind_parameter_count(pStmt); // pointed out by Dominic Yu (thanks!) - - // If dictionaryArgs is passed in, that means we are using sqlite's named parameter support - if (dictionaryArgs) { - - for (NSString *dictionaryKey in [dictionaryArgs allKeys]) { - - // Prefix the key with a colon. - NSString *parameterName = [[NSString alloc] initWithFormat:@":%@", dictionaryKey]; - - if (_traceExecution) { - NSLog(@"%@ = %@", parameterName, [dictionaryArgs objectForKey:dictionaryKey]); - } - - // Get the index for the parameter name. - int namedIdx = sqlite3_bind_parameter_index(pStmt, [parameterName UTF8String]); - - AWSFMDBRelease(parameterName); - - if (namedIdx > 0) { - // Standard binding from here. - [self bindObject:[dictionaryArgs objectForKey:dictionaryKey] toColumn:namedIdx inStatement:pStmt]; - // increment the binding count, so our check below works out - idx++; - } - else { - NSLog(@"Could not find index for %@", dictionaryKey); - } - } - } - else { - - while (idx < queryCount) { - - if (arrayArgs && idx < (int)[arrayArgs count]) { - obj = [arrayArgs objectAtIndex:(NSUInteger)idx]; - } - else if (args) { - obj = va_arg(args, id); - } - else { - //We ran out of arguments - break; - } - - if (_traceExecution) { - if ([obj isKindOfClass:[NSData class]]) { - NSLog(@"data: %ld bytes", (unsigned long)[(NSData*)obj length]); - } - else { - NSLog(@"obj: %@", obj); - } - } - - idx++; - - [self bindObject:obj toColumn:idx inStatement:pStmt]; - } - } - - if (idx != queryCount) { - NSLog(@"Error: the bind count is not correct for the # of variables (executeQuery)"); - sqlite3_finalize(pStmt); - _isExecutingStatement = NO; - return nil; - } - - AWSFMDBRetain(statement); // to balance the release below - - if (!statement) { - statement = [[AWSFMStatement alloc] init]; - [statement setStatement:pStmt]; - - if (_shouldCacheStatements && sql) { - [self setCachedStatement:statement forQuery:sql]; - } - } - - // the statement gets closed in rs's dealloc or [rs close]; - rs = [AWSFMResultSet resultSetWithStatement:statement usingParentDatabase:self]; - [rs setQuery:sql]; - - NSValue *openResultSet = [NSValue valueWithNonretainedObject:rs]; - [_openResultSets addObject:openResultSet]; - - [statement setUseCount:[statement useCount] + 1]; - - AWSFMDBRelease(statement); - - _isExecutingStatement = NO; - - return rs; -} - -- (AWSFMResultSet *)executeQuery:(NSString*)sql, ... { - va_list args; - va_start(args, sql); - - id result = [self executeQuery:sql withArgumentsInArray:nil orDictionary:nil orVAList:args]; - - va_end(args); - return result; -} - -- (AWSFMResultSet *)executeQueryWithFormat:(NSString*)format, ... { - va_list args; - va_start(args, format); - - NSMutableString *sql = [NSMutableString stringWithCapacity:[format length]]; - NSMutableArray *arguments = [NSMutableArray array]; - [self extractSQL:format argumentsList:args intoString:sql arguments:arguments]; - - va_end(args); - - return [self executeQuery:sql withArgumentsInArray:arguments]; -} - -- (AWSFMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray *)arguments { - return [self executeQuery:sql withArgumentsInArray:arguments orDictionary:nil orVAList:nil]; -} - -- (AWSFMResultSet *)executeQuery:(NSString*)sql withVAList:(va_list)args { - return [self executeQuery:sql withArgumentsInArray:nil orDictionary:nil orVAList:args]; -} - -#pragma mark Execute updates - -- (BOOL)executeUpdate:(NSString*)sql error:(NSError**)outErr withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args { - - if (!sql) { - return YES; - } - - if (![self databaseExists]) { - return NO; - } - - if (_isExecutingStatement) { - [self warnInUse]; - return NO; - } - - _isExecutingStatement = YES; - - int rc = 0x00; - sqlite3_stmt *pStmt = 0x00; - AWSFMStatement *cachedStmt = 0x00; - - if (_traceExecution && sql) { - NSLog(@"%@ executeUpdate: %@", self, sql); - } - - if (_shouldCacheStatements) { - cachedStmt = [self cachedStatementForQuery:sql]; - pStmt = cachedStmt ? [cachedStmt statement] : 0x00; - [cachedStmt reset]; - } - - if (!pStmt) { - rc = sqlite3_prepare_v2(_db, [sql UTF8String], -1, &pStmt, 0); - - if (SQLITE_OK != rc) { - if (_logsErrors) { - NSLog(@"DB Error: %d \"%@\"", [self lastErrorCode], [self lastErrorMessage]); - NSLog(@"DB Query: %@", sql); - NSLog(@"DB Path: %@", _databasePath); - } - - if (_crashOnErrors) { - NSAssert(false, @"DB Error: %d \"%@\"", [self lastErrorCode], [self lastErrorMessage]); - abort(); - } - - sqlite3_finalize(pStmt); - - if (outErr) { - *outErr = [self errorWithMessage:[NSString stringWithUTF8String:sqlite3_errmsg(_db)]]; - } - - _isExecutingStatement = NO; - return NO; - } - } - - id obj; - int idx = 0; - int queryCount = sqlite3_bind_parameter_count(pStmt); - - // If dictionaryArgs is passed in, that means we are using sqlite's named parameter support - if (dictionaryArgs) { - - for (NSString *dictionaryKey in [dictionaryArgs allKeys]) { - - // Prefix the key with a colon. - NSString *parameterName = [[NSString alloc] initWithFormat:@":%@", dictionaryKey]; - - if (_traceExecution) { - NSLog(@"%@ = %@", parameterName, [dictionaryArgs objectForKey:dictionaryKey]); - } - // Get the index for the parameter name. - int namedIdx = sqlite3_bind_parameter_index(pStmt, [parameterName UTF8String]); - - AWSFMDBRelease(parameterName); - - if (namedIdx > 0) { - // Standard binding from here. - [self bindObject:[dictionaryArgs objectForKey:dictionaryKey] toColumn:namedIdx inStatement:pStmt]; - - // increment the binding count, so our check below works out - idx++; - } - else { - NSLog(@"Could not find index for %@", dictionaryKey); - } - } - } - else { - - while (idx < queryCount) { - - if (arrayArgs && idx < (int)[arrayArgs count]) { - obj = [arrayArgs objectAtIndex:(NSUInteger)idx]; - } - else if (args) { - obj = va_arg(args, id); - } - else { - //We ran out of arguments - break; - } - - if (_traceExecution) { - if ([obj isKindOfClass:[NSData class]]) { - NSLog(@"data: %ld bytes", (unsigned long)[(NSData*)obj length]); - } - else { - NSLog(@"obj: %@", obj); - } - } - - idx++; - - [self bindObject:obj toColumn:idx inStatement:pStmt]; - } - } - - - if (idx != queryCount) { - NSLog(@"Error: the bind count (%d) is not correct for the # of variables in the query (%d) (%@) (executeUpdate)", idx, queryCount, sql); - sqlite3_finalize(pStmt); - _isExecutingStatement = NO; - return NO; - } - - /* Call sqlite3_step() to run the virtual machine. Since the SQL being - ** executed is not a SELECT statement, we assume no data will be returned. - */ - - rc = sqlite3_step(pStmt); - - if (SQLITE_DONE == rc) { - // all is well, let's return. - } - else if (SQLITE_ERROR == rc) { - if (_logsErrors) { - NSLog(@"Error calling sqlite3_step (%d: %s) SQLITE_ERROR", rc, sqlite3_errmsg(_db)); - NSLog(@"DB Query: %@", sql); - } - } - else if (SQLITE_MISUSE == rc) { - // uh oh. - if (_logsErrors) { - NSLog(@"Error calling sqlite3_step (%d: %s) SQLITE_MISUSE", rc, sqlite3_errmsg(_db)); - NSLog(@"DB Query: %@", sql); - } - } - else { - // wtf? - if (_logsErrors) { - NSLog(@"Unknown error calling sqlite3_step (%d: %s) eu", rc, sqlite3_errmsg(_db)); - NSLog(@"DB Query: %@", sql); - } - } - - if (rc == SQLITE_ROW) { - NSAssert(NO, @"A executeUpdate is being called with a query string '%@'", sql); - } - - if (_shouldCacheStatements && !cachedStmt) { - cachedStmt = [[AWSFMStatement alloc] init]; - - [cachedStmt setStatement:pStmt]; - - [self setCachedStatement:cachedStmt forQuery:sql]; - - AWSFMDBRelease(cachedStmt); - } - - int closeErrorCode; - - if (cachedStmt) { - [cachedStmt setUseCount:[cachedStmt useCount] + 1]; - closeErrorCode = sqlite3_reset(pStmt); - } - else { - /* Finalize the virtual machine. This releases all memory and other - ** resources allocated by the sqlite3_prepare() call above. - */ - closeErrorCode = sqlite3_finalize(pStmt); - } - - if (closeErrorCode != SQLITE_OK) { - if (_logsErrors) { - NSLog(@"Unknown error finalizing or resetting statement (%d: %s)", closeErrorCode, sqlite3_errmsg(_db)); - NSLog(@"DB Query: %@", sql); - } - } - - _isExecutingStatement = NO; - return (rc == SQLITE_DONE || rc == SQLITE_OK); -} - - -- (BOOL)executeUpdate:(NSString*)sql, ... { - va_list args; - va_start(args, sql); - - BOOL result = [self executeUpdate:sql error:nil withArgumentsInArray:nil orDictionary:nil orVAList:args]; - - va_end(args); - return result; -} - -- (BOOL)executeUpdate:(NSString*)sql withArgumentsInArray:(NSArray *)arguments { - return [self executeUpdate:sql error:nil withArgumentsInArray:arguments orDictionary:nil orVAList:nil]; -} - -- (BOOL)executeUpdate:(NSString*)sql withParameterDictionary:(NSDictionary *)arguments { - return [self executeUpdate:sql error:nil withArgumentsInArray:nil orDictionary:arguments orVAList:nil]; -} - -- (BOOL)executeUpdate:(NSString*)sql withVAList:(va_list)args { - return [self executeUpdate:sql error:nil withArgumentsInArray:nil orDictionary:nil orVAList:args]; -} - -- (BOOL)executeUpdateWithFormat:(NSString*)format, ... { - va_list args; - va_start(args, format); - - NSMutableString *sql = [NSMutableString stringWithCapacity:[format length]]; - NSMutableArray *arguments = [NSMutableArray array]; - - [self extractSQL:format argumentsList:args intoString:sql arguments:arguments]; - - va_end(args); - - return [self executeUpdate:sql withArgumentsInArray:arguments]; -} - - -int AWSFMDBExecuteBulkSQLCallback(void *theBlockAsVoid, int columns, char **values, char **names); // shhh clang. -int AWSFMDBExecuteBulkSQLCallback(void *theBlockAsVoid, int columns, char **values, char **names) { - - if (!theBlockAsVoid) { - return SQLITE_OK; - } - - int (^execCallbackBlock)(NSDictionary *resultsDictionary) = (__bridge int (^)(NSDictionary *__strong))(theBlockAsVoid); - - NSMutableDictionary *dictionary = [NSMutableDictionary dictionaryWithCapacity:(NSUInteger)columns]; - - for (NSInteger i = 0; i < columns; i++) { - NSString *key = [NSString stringWithUTF8String:names[i]]; - id value = values[i] ? [NSString stringWithUTF8String:values[i]] : [NSNull null]; - [dictionary setObject:value forKey:key]; - } - - return execCallbackBlock(dictionary); -} - -- (BOOL)executeStatements:(NSString *)sql { - return [self executeStatements:sql withResultBlock:nil]; -} - -- (BOOL)executeStatements:(NSString *)sql withResultBlock:(AWSFMDBExecuteStatementsCallbackBlock)block { - - int rc; - char *errmsg = nil; - - rc = sqlite3_exec([self sqliteHandle], [sql UTF8String], block ? AWSFMDBExecuteBulkSQLCallback : nil, (__bridge void *)(block), &errmsg); - - if (errmsg && [self logsErrors]) { - NSLog(@"Error inserting batch: %s", errmsg); - sqlite3_free(errmsg); - } - - return (rc == SQLITE_OK); -} - -- (BOOL)executeUpdate:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ... { - - va_list args; - va_start(args, outErr); - - BOOL result = [self executeUpdate:sql error:outErr withArgumentsInArray:nil orDictionary:nil orVAList:args]; - - va_end(args); - return result; -} - - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-implementations" -- (BOOL)update:(NSString*)sql withErrorAndBindings:(NSError**)outErr, ... { - va_list args; - va_start(args, outErr); - - BOOL result = [self executeUpdate:sql error:outErr withArgumentsInArray:nil orDictionary:nil orVAList:args]; - - va_end(args); - return result; -} - -#pragma clang diagnostic pop - -#pragma mark Transactions - -- (BOOL)rollback { - BOOL b = [self executeUpdate:@"rollback transaction"]; - - if (b) { - _inTransaction = NO; - } - - return b; -} - -- (BOOL)commit { - BOOL b = [self executeUpdate:@"commit transaction"]; - - if (b) { - _inTransaction = NO; - } - - return b; -} - -- (BOOL)beginDeferredTransaction { - - BOOL b = [self executeUpdate:@"begin deferred transaction"]; - if (b) { - _inTransaction = YES; - } - - return b; -} - -- (BOOL)beginTransaction { - - BOOL b = [self executeUpdate:@"begin exclusive transaction"]; - if (b) { - _inTransaction = YES; - } - - return b; -} - -- (BOOL)inTransaction { - return _inTransaction; -} - -#if SQLITE_VERSION_NUMBER >= 3007000 - -static NSString *AWSFMDBEscapeSavePointName(NSString *savepointName) { - return [savepointName stringByReplacingOccurrencesOfString:@"'" withString:@"''"]; -} - -- (BOOL)startSavePointWithName:(NSString*)name error:(NSError**)outErr { - - NSParameterAssert(name); - - NSString *sql = [NSString stringWithFormat:@"savepoint '%@';", AWSFMDBEscapeSavePointName(name)]; - - if (![self executeUpdate:sql]) { - - if (outErr) { - *outErr = [self lastError]; - } - - return NO; - } - - return YES; -} - -- (BOOL)releaseSavePointWithName:(NSString*)name error:(NSError**)outErr { - - NSParameterAssert(name); - - NSString *sql = [NSString stringWithFormat:@"release savepoint '%@';", AWSFMDBEscapeSavePointName(name)]; - BOOL worked = [self executeUpdate:sql]; - - if (!worked && outErr) { - *outErr = [self lastError]; - } - - return worked; -} - -- (BOOL)rollbackToSavePointWithName:(NSString*)name error:(NSError**)outErr { - - NSParameterAssert(name); - - NSString *sql = [NSString stringWithFormat:@"rollback transaction to savepoint '%@';", AWSFMDBEscapeSavePointName(name)]; - BOOL worked = [self executeUpdate:sql]; - - if (!worked && outErr) { - *outErr = [self lastError]; - } - - return worked; -} - -- (NSError*)inSavePoint:(void (^)(BOOL *rollback))block { - static unsigned long savePointIdx = 0; - - NSString *name = [NSString stringWithFormat:@"dbSavePoint%ld", savePointIdx++]; - - BOOL shouldRollback = NO; - - NSError *err = 0x00; - - if (![self startSavePointWithName:name error:&err]) { - return err; - } - - if (block) { - block(&shouldRollback); - } - - if (shouldRollback) { - // We need to rollback and release this savepoint to remove it - [self rollbackToSavePointWithName:name error:&err]; - } - [self releaseSavePointWithName:name error:&err]; - - return err; -} - -#endif - -#pragma mark Cache statements - -- (BOOL)shouldCacheStatements { - return _shouldCacheStatements; -} - -- (void)setShouldCacheStatements:(BOOL)value { - - _shouldCacheStatements = value; - - if (_shouldCacheStatements && !_cachedStatements) { - [self setCachedStatements:[NSMutableDictionary dictionary]]; - } - - if (!_shouldCacheStatements) { - [self setCachedStatements:nil]; - } -} - -#pragma mark Callback function - -void AWSFMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3_value **argv); // -Wmissing-prototypes -void AWSFMDBBlockSQLiteCallBackFunction(sqlite3_context *context, int argc, sqlite3_value **argv) { -#if ! __has_feature(objc_arc) - void (^block)(sqlite3_context *context, int argc, sqlite3_value **argv) = (id)sqlite3_user_data(context); -#else - void (^block)(sqlite3_context *context, int argc, sqlite3_value **argv) = (__bridge id)sqlite3_user_data(context); -#endif - if (block) { - block(context, argc, argv); - } -} - - -- (void)makeFunctionNamed:(NSString*)name maximumArguments:(int)count withBlock:(void (^)(void *context, int argc, void **argv))block { - - if (!_openFunctions) { - _openFunctions = [NSMutableSet new]; - } - - id b = AWSFMDBReturnAutoreleased([block copy]); - - [_openFunctions addObject:b]; - - /* I tried adding custom functions to release the block when the connection is destroyed- but they seemed to never be called, so we use _openFunctions to store the values instead. */ -#if ! __has_feature(objc_arc) - sqlite3_create_function([self sqliteHandle], [name UTF8String], count, SQLITE_UTF8, (void*)b, &AWSFMDBBlockSQLiteCallBackFunction, 0x00, 0x00); -#else - sqlite3_create_function([self sqliteHandle], [name UTF8String], count, SQLITE_UTF8, (__bridge void*)b, &AWSFMDBBlockSQLiteCallBackFunction, 0x00, 0x00); -#endif -} - -@end - - - -@implementation AWSFMStatement -@synthesize statement=_statement; -@synthesize query=_query; -@synthesize useCount=_useCount; -@synthesize inUse=_inUse; - -#if ! __has_feature(objc_arc) -- (void)finalize { - [self close]; - [super finalize]; -} -#endif - -- (void)dealloc { - [self close]; - AWSFMDBRelease(_query); -#if ! __has_feature(objc_arc) - [super dealloc]; -#endif -} - -- (void)close { - if (_statement) { - sqlite3_finalize(_statement); - _statement = 0x00; - } - - _inUse = NO; -} - -- (void)reset { - if (_statement) { - sqlite3_reset(_statement); - } - - _inUse = NO; -} - -- (NSString*)description { - return [NSString stringWithFormat:@"%@ %ld hit(s) for query %@", [super description], _useCount, _query]; -} - - -@end - diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseAdditions.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseAdditions.h deleted file mode 100644 index 2882198..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseAdditions.h +++ /dev/null @@ -1,277 +0,0 @@ -// -// FMDatabaseAdditions.h -// fmdb -// -// Created by August Mueller on 10/30/05. -// Copyright 2005 Flying Meat Inc.. All rights reserved. -// - -#import -#import "AWSFMDatabase.h" - - -/** Category of additions for `` class. - - ### See also - - - `` - */ - -@interface AWSFMDatabase (AWSFMDatabaseAdditions) - -///---------------------------------------- -/// @name Return results of SQL to variable -///---------------------------------------- - -/** Return `int` value for query - - @param query The SQL query to be performed. - @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. - - @return `int` value. - - @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project. - */ - -- (int)intForQuery:(NSString*)query, ...; - -/** Return `long` value for query - - @param query The SQL query to be performed. - @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. - - @return `long` value. - - @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project. - */ - -- (long)longForQuery:(NSString*)query, ...; - -/** Return `BOOL` value for query - - @param query The SQL query to be performed. - @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. - - @return `BOOL` value. - - @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project. - */ - -- (BOOL)boolForQuery:(NSString*)query, ...; - -/** Return `double` value for query - - @param query The SQL query to be performed. - @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. - - @return `double` value. - - @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project. - */ - -- (double)doubleForQuery:(NSString*)query, ...; - -/** Return `NSString` value for query - - @param query The SQL query to be performed. - @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. - - @return `NSString` value. - - @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project. - */ - -- (NSString*)stringForQuery:(NSString*)query, ...; - -/** Return `NSData` value for query - - @param query The SQL query to be performed. - @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. - - @return `NSData` value. - - @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project. - */ - -- (NSData*)dataForQuery:(NSString*)query, ...; - -/** Return `NSDate` value for query - - @param query The SQL query to be performed. - @param ... A list of parameters that will be bound to the `?` placeholders in the SQL query. - - @return `NSDate` value. - - @note To use this method from Swift, you must include `FMDatabaseAdditionsVariadic.swift` in your project. - */ - -- (NSDate*)dateForQuery:(NSString*)query, ...; - - -// Notice that there's no dataNoCopyForQuery:. -// That would be a bad idea, because we close out the result set, and then what -// happens to the data that we just didn't copy? Who knows, not I. - - -///-------------------------------- -/// @name Schema related operations -///-------------------------------- - -/** Does table exist in database? - - @param tableName The name of the table being looked for. - - @return `YES` if table found; `NO` if not found. - */ - -- (BOOL)tableExists:(NSString*)tableName; - -/** The schema of the database. - - This will be the schema for the entire database. For each entity, each row of the result set will include the following fields: - - - `type` - The type of entity (e.g. table, index, view, or trigger) - - `name` - The name of the object - - `tbl_name` - The name of the table to which the object references - - `rootpage` - The page number of the root b-tree page for tables and indices - - `sql` - The SQL that created the entity - - @return `FMResultSet` of schema; `nil` on error. - - @see [SQLite File Format](http://www.sqlite.org/fileformat.html) - */ - -- (AWSFMResultSet*)getSchema; - -/** The schema of the database. - - This will be the schema for a particular table as report by SQLite `PRAGMA`, for example: - - PRAGMA table_info('employees') - - This will report: - - - `cid` - The column ID number - - `name` - The name of the column - - `type` - The data type specified for the column - - `notnull` - whether the field is defined as NOT NULL (i.e. values required) - - `dflt_value` - The default value for the column - - `pk` - Whether the field is part of the primary key of the table - - @param tableName The name of the table for whom the schema will be returned. - - @return `FMResultSet` of schema; `nil` on error. - - @see [table_info](http://www.sqlite.org/pragma.html#pragma_table_info) - */ - -- (AWSFMResultSet*)getTableSchema:(NSString*)tableName; - -/** Test to see if particular column exists for particular table in database - - @param columnName The name of the column. - - @param tableName The name of the table. - - @return `YES` if column exists in table in question; `NO` otherwise. - */ - -- (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName; - -/** Test to see if particular column exists for particular table in database - - @param columnName The name of the column. - - @param tableName The name of the table. - - @return `YES` if column exists in table in question; `NO` otherwise. - - @see columnExists:inTableWithName: - - @warning Deprecated - use `` instead. - */ - -- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __attribute__ ((deprecated)); - - -/** Validate SQL statement - - This validates SQL statement by performing `sqlite3_prepare_v2`, but not returning the results, but instead immediately calling `sqlite3_finalize`. - - @param sql The SQL statement being validated. - - @param error This is a pointer to a `NSError` object that will receive the autoreleased `NSError` object if there was any error. If this is `nil`, no `NSError` result will be returned. - - @return `YES` if validation succeeded without incident; `NO` otherwise. - - */ - -- (BOOL)validateSQL:(NSString*)sql error:(NSError**)error; - - -///----------------------------------- -/// @name Application identifier tasks -///----------------------------------- - -/** Retrieve application ID - - @return The `uint32_t` numeric value of the application ID. - - @see setApplicationID: - */ - -- (uint32_t)applicationID; - -/** Set the application ID - - @param appID The `uint32_t` numeric value of the application ID. - - @see applicationID - */ - -- (void)setApplicationID:(uint32_t)appID; - -#if TARGET_OS_MAC && !TARGET_OS_IPHONE -/** Retrieve application ID string - - @return The `NSString` value of the application ID. - - @see setApplicationIDString: - */ - - -- (NSString*)applicationIDString; - -/** Set the application ID string - - @param string The `NSString` value of the application ID. - - @see applicationIDString - */ - -- (void)setApplicationIDString:(NSString*)string; -#endif - -///----------------------------------- -/// @name user version identifier tasks -///----------------------------------- - -/** Retrieve user version - - @return The `uint32_t` numeric value of the user version. - - @see setUserVersion: - */ - -- (uint32_t)userVersion; - -/** Set the user-version - - @param version The `uint32_t` numeric value of the user version. - - @see userVersion - */ - -- (void)setUserVersion:(uint32_t)version; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseAdditions.m b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseAdditions.m deleted file mode 100644 index 0b84c13..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseAdditions.m +++ /dev/null @@ -1,225 +0,0 @@ -// -// FMDatabaseAdditions.m -// fmdb -// -// Created by August Mueller on 10/30/05. -// Copyright 2005 Flying Meat Inc.. All rights reserved. -// - -#import "AWSFMDatabase.h" -#import "AWSFMDatabaseAdditions.h" -#import "TargetConditionals.h" -#import "AWSFMDatabase+Private.h" - -@interface AWSFMDatabase (PrivateStuff) -- (AWSFMResultSet *)executeQuery:(NSString *)sql withArgumentsInArray:(NSArray*)arrayArgs orDictionary:(NSDictionary *)dictionaryArgs orVAList:(va_list)args; -@end - -@implementation AWSFMDatabase (AWSFMDatabaseAdditions) - -#define RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(type, sel) \ -va_list args; \ -va_start(args, query); \ -AWSFMResultSet *resultSet = [self executeQuery:query withArgumentsInArray:0x00 orDictionary:0x00 orVAList:args]; \ -va_end(args); \ -if (![resultSet next]) { return (type)0; } \ -type ret = [resultSet sel:0]; \ -[resultSet close]; \ -[resultSet setParentDB:nil]; \ -return ret; - - -- (NSString*)stringForQuery:(NSString*)query, ... { - RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(NSString *, stringForColumnIndex); -} - -- (int)intForQuery:(NSString*)query, ... { - RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(int, intForColumnIndex); -} - -- (long)longForQuery:(NSString*)query, ... { - RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(long, longForColumnIndex); -} - -- (BOOL)boolForQuery:(NSString*)query, ... { - RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(BOOL, boolForColumnIndex); -} - -- (double)doubleForQuery:(NSString*)query, ... { - RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(double, doubleForColumnIndex); -} - -- (NSData*)dataForQuery:(NSString*)query, ... { - RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(NSData *, dataForColumnIndex); -} - -- (NSDate*)dateForQuery:(NSString*)query, ... { - RETURN_RESULT_FOR_QUERY_WITH_SELECTOR(NSDate *, dateForColumnIndex); -} - - -- (BOOL)tableExists:(NSString*)tableName { - - tableName = [tableName lowercaseString]; - - AWSFMResultSet *rs = [self executeQuery:@"select [sql] from sqlite_master where [type] = 'table' and lower(name) = ?", tableName]; - - //if at least one next exists, table exists - BOOL returnBool = [rs next]; - - //close and free object - [rs close]; - - return returnBool; -} - -/* - get table with list of tables: result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING] - check if table exist in database (patch from OZLB) -*/ -- (AWSFMResultSet*)getSchema { - - //result colums: type[STRING], name[STRING],tbl_name[STRING],rootpage[INTEGER],sql[STRING] - AWSFMResultSet *rs = [self executeQuery:@"SELECT type, name, tbl_name, rootpage, sql FROM (SELECT * FROM sqlite_master UNION ALL SELECT * FROM sqlite_temp_master) WHERE type != 'meta' AND name NOT LIKE 'sqlite_%' ORDER BY tbl_name, type DESC, name"]; - - return rs; -} - -/* - get table schema: result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER] -*/ -- (AWSFMResultSet*)getTableSchema:(NSString*)tableName { - - //result colums: cid[INTEGER], name,type [STRING], notnull[INTEGER], dflt_value[],pk[INTEGER] - AWSFMResultSet *rs = [self executeQuery:[NSString stringWithFormat: @"pragma table_info('%@')", tableName]]; - - return rs; -} - -- (BOOL)columnExists:(NSString*)columnName inTableWithName:(NSString*)tableName { - - BOOL returnBool = NO; - - tableName = [tableName lowercaseString]; - columnName = [columnName lowercaseString]; - - AWSFMResultSet *rs = [self getTableSchema:tableName]; - - //check if column is present in table schema - while ([rs next]) { - if ([[[rs stringForColumn:@"name"] lowercaseString] isEqualToString:columnName]) { - returnBool = YES; - break; - } - } - - //If this is not done FMDatabase instance stays out of pool - [rs close]; - - return returnBool; -} - - -- (uint32_t)applicationID { - -#if SQLITE_VERSION_NUMBER >= 3007017 - uint32_t r = 0; - - AWSFMResultSet *rs = [self executeQuery:@"pragma application_id"]; - - if ([rs next]) { - r = (uint32_t)[rs longLongIntForColumnIndex:0]; - } - - [rs close]; -#endif - - return r; -} - -- (void)setApplicationID:(uint32_t)appID { -#if SQLITE_VERSION_NUMBER >= 3007017 - NSString *query = [NSString stringWithFormat:@"pragma application_id=%d", appID]; - AWSFMResultSet *rs = [self executeQuery:query]; - [rs next]; - [rs close]; -#endif -} - - -#if TARGET_OS_MAC && !TARGET_OS_IPHONE -- (NSString*)applicationIDString { - NSString *s = NSFileTypeForHFSTypeCode([self applicationID]); - - assert([s length] == 6); - - s = [s substringWithRange:NSMakeRange(1, 4)]; - - - return s; - -} - -- (void)setApplicationIDString:(NSString*)s { - - if ([s length] != 4) { - NSLog(@"setApplicationIDString: string passed is not exactly 4 chars long. (was %ld)", [s length]); - } - - [self setApplicationID:NSHFSTypeCodeFromFileType([NSString stringWithFormat:@"'%@'", s])]; -} - -#endif - - -- (uint32_t)userVersion { - uint32_t r = 0; - - AWSFMResultSet *rs = [self executeQuery:@"pragma user_version"]; - - if ([rs next]) { - r = (uint32_t)[rs longLongIntForColumnIndex:0]; - } - - [rs close]; - return r; -} - -- (void)setUserVersion:(uint32_t)version { - NSString *query = [NSString stringWithFormat:@"pragma user_version = %d", version]; - AWSFMResultSet *rs = [self executeQuery:query]; - [rs next]; - [rs close]; -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-implementations" - -- (BOOL)columnExists:(NSString*)tableName columnName:(NSString*)columnName __attribute__ ((deprecated)) { - return [self columnExists:columnName inTableWithName:tableName]; -} - -#pragma clang diagnostic pop - - -- (BOOL)validateSQL:(NSString*)sql error:(NSError**)error { - sqlite3_stmt *pStmt = NULL; - BOOL validationSucceeded = YES; - - int rc = sqlite3_prepare_v2(self.db, [sql UTF8String], -1, &pStmt, 0); - if (rc != SQLITE_OK) { - validationSucceeded = NO; - if (error) { - *error = [NSError errorWithDomain:NSCocoaErrorDomain - code:[self lastErrorCode] - userInfo:[NSDictionary dictionaryWithObject:[self lastErrorMessage] - forKey:NSLocalizedDescriptionKey]]; - } - } - - sqlite3_finalize(pStmt); - - return validationSucceeded; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabasePool.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabasePool.h deleted file mode 100644 index 397e61d..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabasePool.h +++ /dev/null @@ -1,200 +0,0 @@ -// -// FMDatabasePool.h -// fmdb -// -// Created by August Mueller on 6/22/11. -// Copyright 2011 Flying Meat Inc. All rights reserved. -// - -#import - -@class AWSFMDatabase; - -/** Pool of `` objects. - - ### See also - - - `` - - `` - - @warning Before using `FMDatabasePool`, please consider using `` instead. - - If you really really really know what you're doing and `FMDatabasePool` is what - you really really need (ie, you're using a read only database), OK you can use - it. But just be careful not to deadlock! - - For an example on deadlocking, search for: - `ONLY_USE_THE_POOL_IF_YOU_ARE_DOING_READS_OTHERWISE_YOULL_DEADLOCK_USE_FMDATABASEQUEUE_INSTEAD` - in the main.m file. - */ - -@interface AWSFMDatabasePool : NSObject { - NSString *_path; - - dispatch_queue_t _lockQueue; - - NSMutableArray *_databaseInPool; - NSMutableArray *_databaseOutPool; - - __unsafe_unretained id _delegate; - - NSUInteger _maximumNumberOfDatabasesToCreate; - int _openFlags; -} - -/** Database path */ - -@property (atomic, retain) NSString *path; - -/** Delegate object */ - -@property (atomic, assign) id delegate; - -/** Maximum number of databases to create */ - -@property (atomic, assign) NSUInteger maximumNumberOfDatabasesToCreate; - -/** Open flags */ - -@property (atomic, readonly) int openFlags; - - -///--------------------- -/// @name Initialization -///--------------------- - -/** Create pool using path. - - @param aPath The file path of the database. - - @return The `FMDatabasePool` object. `nil` on error. - */ - -+ (instancetype)databasePoolWithPath:(NSString*)aPath; - -/** Create pool using path and specified flags - - @param aPath The file path of the database. - @param openFlags Flags passed to the openWithFlags method of the database - - @return The `FMDatabasePool` object. `nil` on error. - */ - -+ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags; - -/** Create pool using path. - - @param aPath The file path of the database. - - @return The `FMDatabasePool` object. `nil` on error. - */ - -- (instancetype)initWithPath:(NSString*)aPath; - -/** Create pool using path and specified flags. - - @param aPath The file path of the database. - @param openFlags Flags passed to the openWithFlags method of the database - - @return The `FMDatabasePool` object. `nil` on error. - */ - -- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags; - -///------------------------------------------------ -/// @name Keeping track of checked in/out databases -///------------------------------------------------ - -/** Number of checked-in databases in pool - - @returns Number of databases - */ - -- (NSUInteger)countOfCheckedInDatabases; - -/** Number of checked-out databases in pool - - @returns Number of databases - */ - -- (NSUInteger)countOfCheckedOutDatabases; - -/** Total number of databases in pool - - @returns Number of databases - */ - -- (NSUInteger)countOfOpenDatabases; - -/** Release all databases in pool */ - -- (void)releaseAllDatabases; - -///------------------------------------------ -/// @name Perform database operations in pool -///------------------------------------------ - -/** Synchronously perform database operations in pool. - - @param block The code to be run on the `FMDatabasePool` pool. - */ - -- (void)inDatabase:(void (^)(AWSFMDatabase *db))block; - -/** Synchronously perform database operations in pool using transaction. - - @param block The code to be run on the `FMDatabasePool` pool. - */ - -- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block; - -/** Synchronously perform database operations in pool using deferred transaction. - - @param block The code to be run on the `FMDatabasePool` pool. - */ - -- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block; - -/** Synchronously perform database operations in pool using save point. - - @param block The code to be run on the `FMDatabasePool` pool. - - @return `NSError` object if error; `nil` if successful. - - @warning You can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. If you need to nest, use `<[FMDatabase startSavePointWithName:error:]>` instead. -*/ - -- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block; - -@end - - -/** FMDatabasePool delegate category - - This is a category that defines the protocol for the FMDatabasePool delegate - */ - -@interface NSObject (AWSFMDatabasePoolDelegate) - -/** Asks the delegate whether database should be added to the pool. - - @param pool The `FMDatabasePool` object. - @param database The `FMDatabase` object. - - @return `YES` if it should add database to pool; `NO` if not. - - */ - -- (BOOL)databasePool:(AWSFMDatabasePool*)pool shouldAddDatabaseToPool:(AWSFMDatabase*)database; - -/** Tells the delegate that database was added to the pool. - - @param pool The `FMDatabasePool` object. - @param database The `FMDatabase` object. - - */ - -- (void)databasePool:(AWSFMDatabasePool*)pool didAddDatabase:(AWSFMDatabase*)database; - -@end - diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabasePool.m b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabasePool.m deleted file mode 100644 index 9363046..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabasePool.m +++ /dev/null @@ -1,277 +0,0 @@ -// -// FMDatabasePool.m -// fmdb -// -// Created by August Mueller on 6/22/11. -// Copyright 2011 Flying Meat Inc. All rights reserved. -// - -#import "AWSFMDatabasePool.h" -#import "AWSFMDatabase.h" -#import "AWSFMDatabase+Private.h" - -@interface AWSFMDatabasePool() - -- (void)pushDatabaseBackInPool:(AWSFMDatabase*)db; -- (AWSFMDatabase*)db; - -@end - - -@implementation AWSFMDatabasePool -@synthesize path=_path; -@synthesize delegate=_delegate; -@synthesize maximumNumberOfDatabasesToCreate=_maximumNumberOfDatabasesToCreate; -@synthesize openFlags=_openFlags; - - -+ (instancetype)databasePoolWithPath:(NSString*)aPath { - return AWSFMDBReturnAutoreleased([[self alloc] initWithPath:aPath]); -} - -+ (instancetype)databasePoolWithPath:(NSString*)aPath flags:(int)openFlags { - return AWSFMDBReturnAutoreleased([[self alloc] initWithPath:aPath flags:openFlags]); -} - -- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags { - - self = [super init]; - - if (self != nil) { - _path = [aPath copy]; - _lockQueue = dispatch_queue_create([[NSString stringWithFormat:@"fmdb.%@", self] UTF8String], NULL); - _databaseInPool = AWSFMDBReturnRetained([NSMutableArray array]); - _databaseOutPool = AWSFMDBReturnRetained([NSMutableArray array]); - _openFlags = openFlags; - } - - return self; -} - -- (instancetype)initWithPath:(NSString*)aPath -{ - // default flags for sqlite3_open - return [self initWithPath:aPath flags:SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE]; -} - -- (instancetype)init { - return [self initWithPath:nil]; -} - - -- (void)dealloc { - - _delegate = 0x00; - AWSFMDBRelease(_path); - AWSFMDBRelease(_databaseInPool); - AWSFMDBRelease(_databaseOutPool); - - if (_lockQueue) { - AWSFMDBDispatchQueueRelease(_lockQueue); - _lockQueue = 0x00; - } -#if ! __has_feature(objc_arc) - [super dealloc]; -#endif -} - - -- (void)executeLocked:(void (^)(void))aBlock { - dispatch_sync(_lockQueue, aBlock); -} - -- (void)pushDatabaseBackInPool:(AWSFMDatabase*)db { - - if (!db) { // db can be null if we set an upper bound on the # of databases to create. - return; - } - - [self executeLocked:^() { - - if ([self->_databaseInPool containsObject:db]) { - [[NSException exceptionWithName:@"Database already in pool" reason:@"The FMDatabase being put back into the pool is already present in the pool" userInfo:nil] raise]; - } - - [self->_databaseInPool addObject:db]; - [self->_databaseOutPool removeObject:db]; - - }]; -} - -- (AWSFMDatabase*)db { - - __block AWSFMDatabase *db; - - - [self executeLocked:^() { - db = [self->_databaseInPool lastObject]; - - BOOL shouldNotifyDelegate = NO; - - if (db) { - [self->_databaseOutPool addObject:db]; - [self->_databaseInPool removeLastObject]; - } - else { - - if (self->_maximumNumberOfDatabasesToCreate) { - NSUInteger currentCount = [self->_databaseOutPool count] + [self->_databaseInPool count]; - - if (currentCount >= self->_maximumNumberOfDatabasesToCreate) { - NSLog(@"Maximum number of databases (%ld) has already been reached!", (long)currentCount); - return; - } - } - - db = [AWSFMDatabase databaseWithPath:self->_path]; - shouldNotifyDelegate = YES; - } - - //This ensures that the db is opened before returning -#if SQLITE_VERSION_NUMBER >= 3005000 - BOOL success = [db openWithFlags:self->_openFlags]; -#else - BOOL success = [db open]; -#endif - if (success) { - if ([self->_delegate respondsToSelector:@selector(databasePool:shouldAddDatabaseToPool:)] && ![self->_delegate databasePool:self shouldAddDatabaseToPool:db]) { - [db close]; - db = 0x00; - } - else { - //It should not get added in the pool twice if lastObject was found - if (![self->_databaseOutPool containsObject:db]) { - [self->_databaseOutPool addObject:db]; - - if (shouldNotifyDelegate && [self->_delegate respondsToSelector:@selector(databasePool:didAddDatabase:)]) { - [self->_delegate databasePool:self didAddDatabase:db]; - } - } - } - } - else { - NSLog(@"Could not open up the database at path %@", self->_path); - db = 0x00; - } - }]; - - return db; -} - -- (NSUInteger)countOfCheckedInDatabases { - - __block NSUInteger count; - - [self executeLocked:^() { - count = [self->_databaseInPool count]; - }]; - - return count; -} - -- (NSUInteger)countOfCheckedOutDatabases { - - __block NSUInteger count; - - [self executeLocked:^() { - count = [self->_databaseOutPool count]; - }]; - - return count; -} - -- (NSUInteger)countOfOpenDatabases { - __block NSUInteger count; - - [self executeLocked:^() { - count = [self->_databaseOutPool count] + [self->_databaseInPool count]; - }]; - - return count; -} - -- (void)releaseAllDatabases { - [self executeLocked:^() { - [self->_databaseOutPool removeAllObjects]; - [self->_databaseInPool removeAllObjects]; - }]; -} - -- (void)inDatabase:(void (^)(AWSFMDatabase *db))block { - - AWSFMDatabase *db = [self db]; - - block(db); - - [self pushDatabaseBackInPool:db]; -} - -- (void)beginTransaction:(BOOL)useDeferred withBlock:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - - BOOL shouldRollback = NO; - - AWSFMDatabase *db = [self db]; - - if (useDeferred) { - [db beginDeferredTransaction]; - } - else { - [db beginTransaction]; - } - - - block(db, &shouldRollback); - - if (shouldRollback) { - [db rollback]; - } - else { - [db commit]; - } - - [self pushDatabaseBackInPool:db]; -} - -- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - [self beginTransaction:YES withBlock:block]; -} - -- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - [self beginTransaction:NO withBlock:block]; -} - -- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - - NSError *err = 0x00; - -#if SQLITE_VERSION_NUMBER >= 3007000 - - static unsigned long savePointIdx = 0; - - NSString *name = [NSString stringWithFormat:@"savePoint%ld", savePointIdx++]; - - BOOL shouldRollback = NO; - - AWSFMDatabase *db = [self db]; - - if (![db startSavePointWithName:name error:&err]) { - [self pushDatabaseBackInPool:db]; - return err; - } - - block(db, &shouldRollback); - - if (shouldRollback) { - // We need to rollback and release this savepoint to remove it - [db rollbackToSavePointWithName:name error:&err]; - } - [db releaseSavePointWithName:name error:&err]; - - [self pushDatabaseBackInPool:db]; - -#endif - - return err; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseQueue.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseQueue.h deleted file mode 100644 index 7a078b7..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseQueue.h +++ /dev/null @@ -1,182 +0,0 @@ -// -// FMDatabaseQueue.h -// fmdb -// -// Created by August Mueller on 6/22/11. -// Copyright 2011 Flying Meat Inc. All rights reserved. -// - -#import - -@class AWSFMDatabase; - -/** To perform queries and updates on multiple threads, you'll want to use `FMDatabaseQueue`. - - Using a single instance of `` from multiple threads at once is a bad idea. It has always been OK to make a `` object *per thread*. Just don't share a single instance across threads, and definitely not across multiple threads at the same time. - - Instead, use `FMDatabaseQueue`. Here's how to use it: - - First, make your queue. - - FMDatabaseQueue *queue = [FMDatabaseQueue databaseQueueWithPath:aPath]; - - Then use it like so: - - [queue inDatabase:^(FMDatabase *db) { - [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]]; - [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]]; - [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]]; - - FMResultSet *rs = [db executeQuery:@"select * from foo"]; - while ([rs next]) { - //… - } - }]; - - An easy way to wrap things up in a transaction can be done like this: - - [queue inTransaction:^(FMDatabase *db, BOOL *rollback) { - [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:1]]; - [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:2]]; - [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:3]]; - - if (whoopsSomethingWrongHappened) { - *rollback = YES; - return; - } - // etc… - [db executeUpdate:@"INSERT INTO myTable VALUES (?)", [NSNumber numberWithInt:4]]; - }]; - - `FMDatabaseQueue` will run the blocks on a serialized queue (hence the name of the class). So if you call `FMDatabaseQueue`'s methods from multiple threads at the same time, they will be executed in the order they are received. This way queries and updates won't step on each other's toes, and every one is happy. - - ### See also - - - `` - - @warning Do not instantiate a single `` object and use it across multiple threads. Use `FMDatabaseQueue` instead. - - @warning The calls to `FMDatabaseQueue`'s methods are blocking. So even though you are passing along blocks, they will **not** be run on another thread. - - */ - -@interface AWSFMDatabaseQueue : NSObject { - NSString *_path; - dispatch_queue_t _queue; - AWSFMDatabase *_db; - int _openFlags; -} - -/** Path of database */ - -@property (atomic, retain) NSString *path; - -/** Open flags */ - -@property (atomic, readonly) int openFlags; - -///---------------------------------------------------- -/// @name Initialization, opening, and closing of queue -///---------------------------------------------------- - -/** Create queue using path. - - @param aPath The file path of the database. - - @return The `FMDatabaseQueue` object. `nil` on error. - */ - -+ (instancetype)databaseQueueWithPath:(NSString*)aPath; - -/** Create queue using path and specified flags. - - @param aPath The file path of the database. - @param openFlags Flags passed to the openWithFlags method of the database - - @return The `FMDatabaseQueue` object. `nil` on error. - */ -+ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags; - -/** Create queue using path. - - @param aPath The file path of the database. - - @return The `FMDatabaseQueue` object. `nil` on error. - */ - -- (instancetype)initWithPath:(NSString*)aPath; - -/** Create queue using path and specified flags. - - @param aPath The file path of the database. - @param openFlags Flags passed to the openWithFlags method of the database - - @return The `FMDatabaseQueue` object. `nil` on error. - */ - -- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags; - -/** Create queue using path and specified flags. - - @param aPath The file path of the database. - @param openFlags Flags passed to the openWithFlags method of the database - @param vfsName The name of a custom virtual file system - - @return The `FMDatabaseQueue` object. `nil` on error. - */ - -- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName; - -/** Returns the Class of 'FMDatabase' subclass, that will be used to instantiate database object. - - Subclasses can override this method to return specified Class of 'FMDatabase' subclass. - - @return The Class of 'FMDatabase' subclass, that will be used to instantiate database object. - */ - -+ (Class)databaseClass; - -/** Close database used by queue. */ - -- (void)close; - -///----------------------------------------------- -/// @name Dispatching database operations to queue -///----------------------------------------------- - -/** Synchronously perform database operations on queue. - - @param block The code to be run on the queue of `FMDatabaseQueue` - */ - -- (void)inDatabase:(void (^)(AWSFMDatabase *db))block; - -/** Synchronously perform database operations on queue, using transactions. - - @param block The code to be run on the queue of `FMDatabaseQueue` - */ - -- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block; - -/** Synchronously perform database operations on queue, using deferred transactions. - - @param block The code to be run on the queue of `FMDatabaseQueue` - */ - -- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block; - -///----------------------------------------------- -/// @name Dispatching database operations to queue -///----------------------------------------------- - -/** Synchronously perform database operations using save point. - - @param block The code to be run on the queue of `FMDatabaseQueue` - */ - -// NOTE: you can not nest these, since calling it will pull another database out of the pool and you'll get a deadlock. -// If you need to nest, use FMDatabase's startSavePointWithName:error: instead. -- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block; - -@end - diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseQueue.m b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseQueue.m deleted file mode 100644 index 8a9d2b8..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMDatabaseQueue.m +++ /dev/null @@ -1,240 +0,0 @@ -// -// FMDatabaseQueue.m -// fmdb -// -// Created by August Mueller on 6/22/11. -// Copyright 2011 Flying Meat Inc. All rights reserved. -// - -#import "AWSFMDatabaseQueue.h" -#import "AWSFMDatabase.h" -#import "AWSFMDatabase+Private.h" - -/* - - Note: we call [self retain]; before using dispatch_sync, just incase - FMDatabaseQueue is released on another thread and we're in the middle of doing - something in dispatch_sync - - */ - -/* - * A key used to associate the FMDatabaseQueue object with the dispatch_queue_t it uses. - * This in turn is used for deadlock detection by seeing if inDatabase: is called on - * the queue's dispatch queue, which should not happen and causes a deadlock. - */ -static const void * const kDispatchQueueSpecificKey = &kDispatchQueueSpecificKey; - -@implementation AWSFMDatabaseQueue - -@synthesize path = _path; -@synthesize openFlags = _openFlags; - -+ (instancetype)databaseQueueWithPath:(NSString*)aPath { - - AWSFMDatabaseQueue *q = [[self alloc] initWithPath:aPath]; - - AWSFMDBAutorelease(q); - - return q; -} - -+ (instancetype)databaseQueueWithPath:(NSString*)aPath flags:(int)openFlags { - - AWSFMDatabaseQueue *q = [[self alloc] initWithPath:aPath flags:openFlags]; - - AWSFMDBAutorelease(q); - - return q; -} - -+ (Class)databaseClass { - return [AWSFMDatabase class]; -} - -- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags vfs:(NSString *)vfsName { - - self = [super init]; - - if (self != nil) { - - _db = [[[self class] databaseClass] databaseWithPath:aPath]; - AWSFMDBRetain(_db); - -#if SQLITE_VERSION_NUMBER >= 3005000 - BOOL success = [_db openWithFlags:openFlags vfs:vfsName]; -#else - BOOL success = [_db open]; -#endif - if (!success) { - NSLog(@"Could not create database queue for path %@", aPath); - AWSFMDBRelease(self); - return 0x00; - } - - _path = AWSFMDBReturnRetained(aPath); - - _queue = dispatch_queue_create([[NSString stringWithFormat:@"fmdb.%@", self] UTF8String], NULL); - dispatch_queue_set_specific(_queue, kDispatchQueueSpecificKey, (__bridge void *)self, NULL); - _openFlags = openFlags; - } - - return self; -} - -- (instancetype)initWithPath:(NSString*)aPath flags:(int)openFlags { - return [self initWithPath:aPath flags:openFlags vfs:nil]; -} - -- (instancetype)initWithPath:(NSString*)aPath { - - // default flags for sqlite3_open - return [self initWithPath:aPath flags:SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE vfs:nil]; -} - -- (instancetype)init { - return [self initWithPath:nil]; -} - - -- (void)dealloc { - - AWSFMDBRelease(_db); - AWSFMDBRelease(_path); - - if (_queue) { - AWSFMDBDispatchQueueRelease(_queue); - _queue = 0x00; - } -#if ! __has_feature(objc_arc) - [super dealloc]; -#endif -} - -- (void)close { - AWSFMDBRetain(self); - dispatch_sync(_queue, ^() { - [self->_db close]; - AWSFMDBRelease(_db); - self->_db = 0x00; - }); - AWSFMDBRelease(self); -} - -- (AWSFMDatabase*)database { - if (!_db) { - _db = AWSFMDBReturnRetained([AWSFMDatabase databaseWithPath:_path]); - -#if SQLITE_VERSION_NUMBER >= 3005000 - BOOL success = [_db openWithFlags:_openFlags]; -#else - BOOL success = [_db open]; -#endif - if (!success) { - NSLog(@"FMDatabaseQueue could not reopen database for path %@", _path); - AWSFMDBRelease(_db); - _db = 0x00; - return 0x00; - } - } - - return _db; -} - -- (void)inDatabase:(void (^)(AWSFMDatabase *db))block { - /* Get the currently executing queue (which should probably be nil, but in theory could be another DB queue - * and then check it against self to make sure we're not about to deadlock. */ - AWSFMDatabaseQueue *currentSyncQueue = (__bridge id)dispatch_get_specific(kDispatchQueueSpecificKey); - assert(currentSyncQueue != self && "inDatabase: was called reentrantly on the same queue, which would lead to a deadlock"); - - AWSFMDBRetain(self); - - dispatch_sync(_queue, ^() { - - AWSFMDatabase *db = [self database]; - block(db); - - if ([db hasOpenResultSets]) { - NSLog(@"Warning: there is at least one open result set around after performing [FMDatabaseQueue inDatabase:]"); - -#if defined(DEBUG) && DEBUG - NSSet *openSetCopy = AWSFMDBReturnAutoreleased([[db valueForKey:@"_openResultSets"] copy]); - for (NSValue *rsInWrappedInATastyValueMeal in openSetCopy) { - AWSFMResultSet *rs = (AWSFMResultSet *)[rsInWrappedInATastyValueMeal pointerValue]; - NSLog(@"query: '%@'", [rs query]); - } -#endif - } - }); - - AWSFMDBRelease(self); -} - - -- (void)beginTransaction:(BOOL)useDeferred withBlock:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - AWSFMDBRetain(self); - dispatch_sync(_queue, ^() { - - BOOL shouldRollback = NO; - - if (useDeferred) { - [[self database] beginDeferredTransaction]; - } - else { - [[self database] beginTransaction]; - } - - block([self database], &shouldRollback); - - if (shouldRollback) { - [[self database] rollback]; - } - else { - [[self database] commit]; - } - }); - - AWSFMDBRelease(self); -} - -- (void)inDeferredTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - [self beginTransaction:YES withBlock:block]; -} - -- (void)inTransaction:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - [self beginTransaction:NO withBlock:block]; -} - -- (NSError*)inSavePoint:(void (^)(AWSFMDatabase *db, BOOL *rollback))block { - - __block NSError *err = 0x00; - -#if SQLITE_VERSION_NUMBER >= 3007000 - - static unsigned long savePointIdx = 0; - AWSFMDBRetain(self); - dispatch_sync(_queue, ^() { - - NSString *name = [NSString stringWithFormat:@"savePoint%ld", savePointIdx++]; - - BOOL shouldRollback = NO; - - if ([[self database] startSavePointWithName:name error:&err]) { - - block([self database], &shouldRollback); - - if (shouldRollback) { - // We need to rollback and release this savepoint to remove it - [[self database] rollbackToSavePointWithName:name error:&err]; - } - [[self database] releaseSavePointWithName:name error:&err]; - - } - }); - AWSFMDBRelease(self); - -#endif - return err; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMResultSet.h b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMResultSet.h deleted file mode 100644 index f92568d..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMResultSet.h +++ /dev/null @@ -1,468 +0,0 @@ -#import - -#ifndef __has_feature // Optional. -#define __has_feature(x) 0 // Compatibility with non-clang compilers. -#endif - -#ifndef NS_RETURNS_NOT_RETAINED -#if __has_feature(attribute_ns_returns_not_retained) -#define NS_RETURNS_NOT_RETAINED __attribute__((ns_returns_not_retained)) -#else -#define NS_RETURNS_NOT_RETAINED -#endif -#endif - -@class AWSFMDatabase; -@class AWSFMStatement; - -/** Represents the results of executing a query on an ``. - - ### See also - - - `` - */ - -@interface AWSFMResultSet : NSObject { - AWSFMDatabase *_parentDB; - AWSFMStatement *_statement; - - NSString *_query; - NSMutableDictionary *_columnNameToIndexMap; -} - -///----------------- -/// @name Properties -///----------------- - -/** Executed query */ - -@property (atomic, retain) NSString *query; - -/** `NSMutableDictionary` mapping column names to numeric index */ - -@property (readonly) NSMutableDictionary *columnNameToIndexMap; - -/** `FMStatement` used by result set. */ - -@property (atomic, retain) AWSFMStatement *statement; - -///------------------------------------ -/// @name Creating and closing database -///------------------------------------ - -/** Create result set from `` - - @param statement A `` to be performed - - @param aDB A `` to be used - - @return A `FMResultSet` on success; `nil` on failure - */ - -+ (instancetype)resultSetWithStatement:(AWSFMStatement *)statement usingParentDatabase:(AWSFMDatabase*)aDB; - -/** Close result set */ - -- (void)close; - -- (void)setParentDB:(AWSFMDatabase *)newDb; - -///--------------------------------------- -/// @name Iterating through the result set -///--------------------------------------- - -/** Retrieve next row for result set. - - You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one. - - @return `YES` if row successfully retrieved; `NO` if end of result set reached - - @see hasAnotherRow - */ - -- (BOOL)next; - -/** Retrieve next row for result set. - - You must always invoke `next` or `nextWithError` before attempting to access the values returned in a query, even if you're only expecting one. - - @param outErr A 'NSError' object to receive any error object (if any). - - @return 'YES' if row successfully retrieved; 'NO' if end of result set reached - - @see hasAnotherRow - */ - -- (BOOL)nextWithError:(NSError **)outErr; - -/** Did the last call to `` succeed in retrieving another row? - - @return `YES` if the last call to `` succeeded in retrieving another record; `NO` if not. - - @see next - - @warning The `hasAnotherRow` method must follow a call to ``. If the previous database interaction was something other than a call to `next`, then this method may return `NO`, whether there is another row of data or not. - */ - -- (BOOL)hasAnotherRow; - -///--------------------------------------------- -/// @name Retrieving information from result set -///--------------------------------------------- - -/** How many columns in result set - - @return Integer value of the number of columns. - */ - -- (int)columnCount; - -/** Column index for column name - - @param columnName `NSString` value of the name of the column. - - @return Zero-based index for column. - */ - -- (int)columnIndexForName:(NSString*)columnName; - -/** Column name for column index - - @param columnIdx Zero-based index for column. - - @return columnName `NSString` value of the name of the column. - */ - -- (NSString*)columnNameForIndex:(int)columnIdx; - -/** Result set integer value for column. - - @param columnName `NSString` value of the name of the column. - - @return `int` value of the result set's column. - */ - -- (int)intForColumn:(NSString*)columnName; - -/** Result set integer value for column. - - @param columnIdx Zero-based index for column. - - @return `int` value of the result set's column. - */ - -- (int)intForColumnIndex:(int)columnIdx; - -/** Result set `long` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `long` value of the result set's column. - */ - -- (long)longForColumn:(NSString*)columnName; - -/** Result set long value for column. - - @param columnIdx Zero-based index for column. - - @return `long` value of the result set's column. - */ - -- (long)longForColumnIndex:(int)columnIdx; - -/** Result set `long long int` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `long long int` value of the result set's column. - */ - -- (long long int)longLongIntForColumn:(NSString*)columnName; - -/** Result set `long long int` value for column. - - @param columnIdx Zero-based index for column. - - @return `long long int` value of the result set's column. - */ - -- (long long int)longLongIntForColumnIndex:(int)columnIdx; - -/** Result set `unsigned long long int` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `unsigned long long int` value of the result set's column. - */ - -- (unsigned long long int)unsignedLongLongIntForColumn:(NSString*)columnName; - -/** Result set `unsigned long long int` value for column. - - @param columnIdx Zero-based index for column. - - @return `unsigned long long int` value of the result set's column. - */ - -- (unsigned long long int)unsignedLongLongIntForColumnIndex:(int)columnIdx; - -/** Result set `BOOL` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `BOOL` value of the result set's column. - */ - -- (BOOL)boolForColumn:(NSString*)columnName; - -/** Result set `BOOL` value for column. - - @param columnIdx Zero-based index for column. - - @return `BOOL` value of the result set's column. - */ - -- (BOOL)boolForColumnIndex:(int)columnIdx; - -/** Result set `double` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `double` value of the result set's column. - - */ - -- (double)doubleForColumn:(NSString*)columnName; - -/** Result set `double` value for column. - - @param columnIdx Zero-based index for column. - - @return `double` value of the result set's column. - - */ - -- (double)doubleForColumnIndex:(int)columnIdx; - -/** Result set `NSString` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `NSString` value of the result set's column. - - */ - -- (NSString*)stringForColumn:(NSString*)columnName; - -/** Result set `NSString` value for column. - - @param columnIdx Zero-based index for column. - - @return `NSString` value of the result set's column. - */ - -- (NSString*)stringForColumnIndex:(int)columnIdx; - -/** Result set `NSDate` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `NSDate` value of the result set's column. - */ - -- (NSDate*)dateForColumn:(NSString*)columnName; - -/** Result set `NSDate` value for column. - - @param columnIdx Zero-based index for column. - - @return `NSDate` value of the result set's column. - - */ - -- (NSDate*)dateForColumnIndex:(int)columnIdx; - -/** Result set `NSData` value for column. - - This is useful when storing binary data in table (such as image or the like). - - @param columnName `NSString` value of the name of the column. - - @return `NSData` value of the result set's column. - - */ - -- (NSData*)dataForColumn:(NSString*)columnName; - -/** Result set `NSData` value for column. - - @param columnIdx Zero-based index for column. - - @return `NSData` value of the result set's column. - */ - -- (NSData*)dataForColumnIndex:(int)columnIdx; - -/** Result set `(const unsigned char *)` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `(const unsigned char *)` value of the result set's column. - */ - -- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName; - -/** Result set `(const unsigned char *)` value for column. - - @param columnIdx Zero-based index for column. - - @return `(const unsigned char *)` value of the result set's column. - */ - -- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx; - -/** Result set object for column. - - @param columnName `NSString` value of the name of the column. - - @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. - - @see objectForKeyedSubscript: - */ - -- (id)objectForColumnName:(NSString*)columnName; - -/** Result set object for column. - - @param columnIdx Zero-based index for column. - - @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. - - @see objectAtIndexedSubscript: - */ - -- (id)objectForColumnIndex:(int)columnIdx; - -/** Result set object for column. - - This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported: - - id result = rs[@"employee_name"]; - - This simplified syntax is equivalent to calling: - - id result = [rs objectForKeyedSubscript:@"employee_name"]; - - which is, it turns out, equivalent to calling: - - id result = [rs objectForColumnName:@"employee_name"]; - - @param columnName `NSString` value of the name of the column. - - @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. - */ - -- (id)objectForKeyedSubscript:(NSString *)columnName; - -/** Result set object for column. - - This method allows the use of the "boxed" syntax supported in Modern Objective-C. For example, by defining this method, the following syntax is now supported: - - id result = rs[0]; - - This simplified syntax is equivalent to calling: - - id result = [rs objectForKeyedSubscript:0]; - - which is, it turns out, equivalent to calling: - - id result = [rs objectForColumnName:0]; - - @param columnIdx Zero-based index for column. - - @return Either `NSNumber`, `NSString`, `NSData`, or `NSNull`. If the column was `NULL`, this returns `[NSNull null]` object. - */ - -- (id)objectAtIndexedSubscript:(int)columnIdx; - -/** Result set `NSData` value for column. - - @param columnName `NSString` value of the name of the column. - - @return `NSData` value of the result set's column. - - @warning If you are going to use this data after you iterate over the next row, or after you close the -result set, make sure to make a copy of the data first (or just use ``/``) -If you don't, you're going to be in a world of hurt when you try and use the data. - - */ - -- (NSData*)dataNoCopyForColumn:(NSString*)columnName NS_RETURNS_NOT_RETAINED; - -/** Result set `NSData` value for column. - - @param columnIdx Zero-based index for column. - - @return `NSData` value of the result set's column. - - @warning If you are going to use this data after you iterate over the next row, or after you close the - result set, make sure to make a copy of the data first (or just use ``/``) - If you don't, you're going to be in a world of hurt when you try and use the data. - - */ - -- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx NS_RETURNS_NOT_RETAINED; - -/** Is the column `NULL`? - - @param columnIdx Zero-based index for column. - - @return `YES` if column is `NULL`; `NO` if not `NULL`. - */ - -- (BOOL)columnIndexIsNull:(int)columnIdx; - -/** Is the column `NULL`? - - @param columnName `NSString` value of the name of the column. - - @return `YES` if column is `NULL`; `NO` if not `NULL`. - */ - -- (BOOL)columnIsNull:(NSString*)columnName; - - -/** Returns a dictionary of the row results mapped to case sensitive keys of the column names. - - @returns `NSDictionary` of the row results. - - @warning The keys to the dictionary are case sensitive of the column names. - */ - -- (NSDictionary*)resultDictionary; - -/** Returns a dictionary of the row results - - @see resultDictionary - - @warning **Deprecated**: Please use `` instead. Also, beware that `` is case sensitive! - */ - -- (NSDictionary*)resultDict __attribute__ ((deprecated)); - -///----------------------------- -/// @name Key value coding magic -///----------------------------- - -/** Performs `setValue` to yield support for key value observing. - - @param object The object for which the values will be set. This is the key-value-coding compliant object that you might, for example, observe. - - */ - -- (void)kvcMagic:(id)object; - - -@end - diff --git a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMResultSet.m b/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMResultSet.m deleted file mode 100644 index 0dc1712..0000000 --- a/demo/Pods/AWSCore/AWSCore/FMDB/AWSFMResultSet.m +++ /dev/null @@ -1,419 +0,0 @@ -#import "AWSFMResultSet.h" -#import "AWSFMDatabase.h" -#import "unistd.h" -#import "AWSFMDatabase+Private.h" - -@interface AWSFMDatabase () -- (void)resultSetDidClose:(AWSFMResultSet *)resultSet; -@end - - -@implementation AWSFMResultSet -@synthesize query=_query; -@synthesize statement=_statement; - -+ (instancetype)resultSetWithStatement:(AWSFMStatement *)statement usingParentDatabase:(AWSFMDatabase*)aDB { - - AWSFMResultSet *rs = [[AWSFMResultSet alloc] init]; - - [rs setStatement:statement]; - [rs setParentDB:aDB]; - - NSParameterAssert(![statement inUse]); - [statement setInUse:YES]; // weak reference - - return AWSFMDBReturnAutoreleased(rs); -} - -#if ! __has_feature(objc_arc) -- (void)finalize { - [self close]; - [super finalize]; -} -#endif - -- (void)dealloc { - [self close]; - - AWSFMDBRelease(_query); - _query = nil; - - AWSFMDBRelease(_columnNameToIndexMap); - _columnNameToIndexMap = nil; - -#if ! __has_feature(objc_arc) - [super dealloc]; -#endif -} - -- (void)close { - [_statement reset]; - AWSFMDBRelease(_statement); - _statement = nil; - - // we don't need this anymore... (i think) - //[_parentDB setInUse:NO]; - [_parentDB resultSetDidClose:self]; - _parentDB = nil; -} - -- (int)columnCount { - return sqlite3_column_count([_statement statement]); -} - -- (NSMutableDictionary *)columnNameToIndexMap { - if (!_columnNameToIndexMap) { - int columnCount = sqlite3_column_count([_statement statement]); - _columnNameToIndexMap = [[NSMutableDictionary alloc] initWithCapacity:(NSUInteger)columnCount]; - int columnIdx = 0; - for (columnIdx = 0; columnIdx < columnCount; columnIdx++) { - [_columnNameToIndexMap setObject:[NSNumber numberWithInt:columnIdx] - forKey:[[NSString stringWithUTF8String:sqlite3_column_name([_statement statement], columnIdx)] lowercaseString]]; - } - } - return _columnNameToIndexMap; -} - -- (void)kvcMagic:(id)object { - - int columnCount = sqlite3_column_count([_statement statement]); - - int columnIdx = 0; - for (columnIdx = 0; columnIdx < columnCount; columnIdx++) { - - const char *c = (const char *)sqlite3_column_text([_statement statement], columnIdx); - - // check for a null row - if (c) { - NSString *s = [NSString stringWithUTF8String:c]; - - [object setValue:s forKey:[NSString stringWithUTF8String:sqlite3_column_name([_statement statement], columnIdx)]]; - } - } -} - -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-implementations" - -- (NSDictionary*)resultDict { - - NSUInteger num_cols = (NSUInteger)sqlite3_data_count([_statement statement]); - - if (num_cols > 0) { - NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:num_cols]; - - NSEnumerator *columnNames = [[self columnNameToIndexMap] keyEnumerator]; - NSString *columnName = nil; - while ((columnName = [columnNames nextObject])) { - id objectValue = [self objectForColumnName:columnName]; - [dict setObject:objectValue forKey:columnName]; - } - - return AWSFMDBReturnAutoreleased([dict copy]); - } - else { - NSLog(@"Warning: There seem to be no columns in this set."); - } - - return nil; -} - -#pragma clang diagnostic pop - -- (NSDictionary*)resultDictionary { - - NSUInteger num_cols = (NSUInteger)sqlite3_data_count([_statement statement]); - - if (num_cols > 0) { - NSMutableDictionary *dict = [NSMutableDictionary dictionaryWithCapacity:num_cols]; - - int columnCount = sqlite3_column_count([_statement statement]); - - int columnIdx = 0; - for (columnIdx = 0; columnIdx < columnCount; columnIdx++) { - - NSString *columnName = [NSString stringWithUTF8String:sqlite3_column_name([_statement statement], columnIdx)]; - id objectValue = [self objectForColumnIndex:columnIdx]; - [dict setObject:objectValue forKey:columnName]; - } - - return dict; - } - else { - NSLog(@"Warning: There seem to be no columns in this set."); - } - - return nil; -} - - - - -- (BOOL)next { - return [self nextWithError:nil]; -} - -- (BOOL)nextWithError:(NSError **)outErr { - - int rc = sqlite3_step([_statement statement]); - - if (SQLITE_BUSY == rc || SQLITE_LOCKED == rc) { - NSLog(@"%s:%d Database busy (%@)", __FUNCTION__, __LINE__, [_parentDB databasePath]); - NSLog(@"Database busy"); - if (outErr) { - *outErr = [_parentDB lastError]; - } - } - else if (SQLITE_DONE == rc || SQLITE_ROW == rc) { - // all is well, let's return. - } - else if (SQLITE_ERROR == rc) { - NSLog(@"Error calling sqlite3_step (%d: %s) rs", rc, sqlite3_errmsg([_parentDB sqliteHandle])); - if (outErr) { - *outErr = [_parentDB lastError]; - } - } - else if (SQLITE_MISUSE == rc) { - // uh oh. - NSLog(@"Error calling sqlite3_step (%d: %s) rs", rc, sqlite3_errmsg([_parentDB sqliteHandle])); - if (outErr) { - if (_parentDB) { - *outErr = [_parentDB lastError]; - } - else { - // If 'next' or 'nextWithError' is called after the result set is closed, - // we need to return the appropriate error. - NSDictionary* errorMessage = [NSDictionary dictionaryWithObject:@"parentDB does not exist" forKey:NSLocalizedDescriptionKey]; - *outErr = [NSError errorWithDomain:@"AWSFMDatabase" code:SQLITE_MISUSE userInfo:errorMessage]; - } - - } - } - else { - // wtf? - NSLog(@"Unknown error calling sqlite3_step (%d: %s) rs", rc, sqlite3_errmsg([_parentDB sqliteHandle])); - if (outErr) { - *outErr = [_parentDB lastError]; - } - } - - - if (rc != SQLITE_ROW) { - [self close]; - } - - return (rc == SQLITE_ROW); -} - -- (BOOL)hasAnotherRow { - return sqlite3_errcode([_parentDB sqliteHandle]) == SQLITE_ROW; -} - -- (int)columnIndexForName:(NSString*)columnName { - columnName = [columnName lowercaseString]; - - NSNumber *n = [[self columnNameToIndexMap] objectForKey:columnName]; - - if (n != nil) { - return [n intValue]; - } - - NSLog(@"Warning: I could not find the column named '%@'.", columnName); - - return -1; -} - - - -- (int)intForColumn:(NSString*)columnName { - return [self intForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (int)intForColumnIndex:(int)columnIdx { - return sqlite3_column_int([_statement statement], columnIdx); -} - -- (long)longForColumn:(NSString*)columnName { - return [self longForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (long)longForColumnIndex:(int)columnIdx { - return (long)sqlite3_column_int64([_statement statement], columnIdx); -} - -- (long long int)longLongIntForColumn:(NSString*)columnName { - return [self longLongIntForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (long long int)longLongIntForColumnIndex:(int)columnIdx { - return sqlite3_column_int64([_statement statement], columnIdx); -} - -- (unsigned long long int)unsignedLongLongIntForColumn:(NSString*)columnName { - return [self unsignedLongLongIntForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (unsigned long long int)unsignedLongLongIntForColumnIndex:(int)columnIdx { - return (unsigned long long int)[self longLongIntForColumnIndex:columnIdx]; -} - -- (BOOL)boolForColumn:(NSString*)columnName { - return [self boolForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (BOOL)boolForColumnIndex:(int)columnIdx { - return ([self intForColumnIndex:columnIdx] != 0); -} - -- (double)doubleForColumn:(NSString*)columnName { - return [self doubleForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (double)doubleForColumnIndex:(int)columnIdx { - return sqlite3_column_double([_statement statement], columnIdx); -} - -- (NSString*)stringForColumnIndex:(int)columnIdx { - - if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) { - return nil; - } - - const char *c = (const char *)sqlite3_column_text([_statement statement], columnIdx); - - if (!c) { - // null row. - return nil; - } - - return [NSString stringWithUTF8String:c]; -} - -- (NSString*)stringForColumn:(NSString*)columnName { - return [self stringForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (NSDate*)dateForColumn:(NSString*)columnName { - return [self dateForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (NSDate*)dateForColumnIndex:(int)columnIdx { - - if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) { - return nil; - } - - return [_parentDB hasDateFormatter] ? [_parentDB dateFromString:[self stringForColumnIndex:columnIdx]] : [NSDate dateWithTimeIntervalSince1970:[self doubleForColumnIndex:columnIdx]]; -} - - -- (NSData*)dataForColumn:(NSString*)columnName { - return [self dataForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (NSData*)dataForColumnIndex:(int)columnIdx { - - if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) { - return nil; - } - - const char *dataBuffer = sqlite3_column_blob([_statement statement], columnIdx); - int dataSize = sqlite3_column_bytes([_statement statement], columnIdx); - - if (dataBuffer == NULL) { - return nil; - } - - return [NSData dataWithBytes:(const void *)dataBuffer length:(NSUInteger)dataSize]; -} - - -- (NSData*)dataNoCopyForColumn:(NSString*)columnName { - return [self dataNoCopyForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (NSData*)dataNoCopyForColumnIndex:(int)columnIdx { - - if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) { - return nil; - } - - const char *dataBuffer = sqlite3_column_blob([_statement statement], columnIdx); - int dataSize = sqlite3_column_bytes([_statement statement], columnIdx); - - NSData *data = [NSData dataWithBytesNoCopy:(void *)dataBuffer length:(NSUInteger)dataSize freeWhenDone:NO]; - - return data; -} - - -- (BOOL)columnIndexIsNull:(int)columnIdx { - return sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL; -} - -- (BOOL)columnIsNull:(NSString*)columnName { - return [self columnIndexIsNull:[self columnIndexForName:columnName]]; -} - -- (const unsigned char *)UTF8StringForColumnIndex:(int)columnIdx { - - if (sqlite3_column_type([_statement statement], columnIdx) == SQLITE_NULL || (columnIdx < 0)) { - return nil; - } - - return sqlite3_column_text([_statement statement], columnIdx); -} - -- (const unsigned char *)UTF8StringForColumnName:(NSString*)columnName { - return [self UTF8StringForColumnIndex:[self columnIndexForName:columnName]]; -} - -- (id)objectForColumnIndex:(int)columnIdx { - int columnType = sqlite3_column_type([_statement statement], columnIdx); - - id returnValue = nil; - - if (columnType == SQLITE_INTEGER) { - returnValue = [NSNumber numberWithLongLong:[self longLongIntForColumnIndex:columnIdx]]; - } - else if (columnType == SQLITE_FLOAT) { - returnValue = [NSNumber numberWithDouble:[self doubleForColumnIndex:columnIdx]]; - } - else if (columnType == SQLITE_BLOB) { - returnValue = [self dataForColumnIndex:columnIdx]; - } - else { - //default to a string for everything else - returnValue = [self stringForColumnIndex:columnIdx]; - } - - if (returnValue == nil) { - returnValue = [NSNull null]; - } - - return returnValue; -} - -- (id)objectForColumnName:(NSString*)columnName { - return [self objectForColumnIndex:[self columnIndexForName:columnName]]; -} - -// returns autoreleased NSString containing the name of the column in the result set -- (NSString*)columnNameForIndex:(int)columnIdx { - return [NSString stringWithUTF8String: sqlite3_column_name([_statement statement], columnIdx)]; -} - -- (void)setParentDB:(AWSFMDatabase *)newDb { - _parentDB = newDb; -} - -- (id)objectAtIndexedSubscript:(int)columnIdx { - return [self objectForColumnIndex:columnIdx]; -} - -- (id)objectForKeyedSubscript:(NSString *)columnName { - return [self objectForColumnName:columnName]; -} - - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Fabric/FABAttributes.h b/demo/Pods/AWSCore/AWSCore/Fabric/FABAttributes.h deleted file mode 100644 index e35f9ce..0000000 --- a/demo/Pods/AWSCore/AWSCore/Fabric/FABAttributes.h +++ /dev/null @@ -1,60 +0,0 @@ -// -// FABAttributes.h -// Fabric -// -// Copyright (C) 2015 Twitter, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#pragma once - -#define FAB_UNAVAILABLE(x) __attribute__((unavailable(x))) - -#if __has_feature(nullability) - #define fab_nullable nullable - #define fab_nonnull nonnull - #define fab_null_unspecified null_unspecified - #define fab_null_resettable null_resettable - #define __fab_nullable __nullable - #define __fab_nonnull __nonnull - #define __fab_null_unspecified __null_unspecified -#else - #define fab_nullable - #define fab_nonnull - #define fab_null_unspecified - #define fab_null_resettable - #define __fab_nullable - #define __fab_nonnull - #define __fab_null_unspecified -#endif - -#ifndef NS_ASSUME_NONNULL_BEGIN - #define NS_ASSUME_NONNULL_BEGIN -#endif - -#ifndef NS_ASSUME_NONNULL_END - #define NS_ASSUME_NONNULL_END -#endif - - -/** - * The following macros are defined here to provide - * backwards compatability. If you are still using - * them you should migrate to the new versions that - * are defined above. - */ -#define FAB_NONNULL __fab_nonnull -#define FAB_NULLABLE __fab_nullable -#define FAB_START_NONNULL NS_ASSUME_NONNULL_BEGIN -#define FAB_END_NONNULL NS_ASSUME_NONNULL_END diff --git a/demo/Pods/AWSCore/AWSCore/Fabric/FABKitProtocol.h b/demo/Pods/AWSCore/AWSCore/Fabric/FABKitProtocol.h deleted file mode 100644 index f24ab4b..0000000 --- a/demo/Pods/AWSCore/AWSCore/Fabric/FABKitProtocol.h +++ /dev/null @@ -1,59 +0,0 @@ -// -// FABKitProtocol.h -// Fabric -// -// Copyright (C) 2015 Twitter, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import - -/** - * Protocol that a class in a Fabric Kit must conform to to provide information to Fabric at runtime. - */ -@protocol FABKit - -@required - -/** - * Required. The globally unique identifier of the Kit. - * We encourage the use of reverse-DNS notation. - * Example: @"io.fabric.sdk.ios" - */ -+ (NSString *)bundleIdentifier; - -/** - * Required. Must return the current version of the Kit that is being used at runtime. - * We encourage the use of semantic versioning (http://semver.org/), without prefixing the version with a "v". - * This is commonly referred to as the "marketing version". - * Example: @"1.2.3" - */ -+ (NSString *)kitDisplayVersion; - -@optional - -/** - * The build version of the kit. Should be monotonically increasing and unique. - * Example: 137 - */ -+ (NSString *)kitBuildVersion; - -/** - * Perform any necessary initialization. - * This method will be invoked on the Kit when the user calls +[Fabric initializeKits]. - * @note This method being called does not necessarily imply that the developer has started using the Kit yet. - */ -+ (void)initializeIfNeeded; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Fabric/Fabric+FABKits.h b/demo/Pods/AWSCore/AWSCore/Fabric/Fabric+FABKits.h deleted file mode 100644 index 5493ceb..0000000 --- a/demo/Pods/AWSCore/AWSCore/Fabric/Fabric+FABKits.h +++ /dev/null @@ -1,38 +0,0 @@ -// -// Fabric+FABKits.h -// Fabric -// -// Copyright (C) 2015 Twitter, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import "Fabric.h" - -@protocol FABKit; -// Use this category for methods that kits can call on Fabric. -@interface Fabric (FABKits) - -/** - * Returns a dictionary containing the kit configuration info for the provided kit. - * The configuration information is parsed from the application's Info.plist. This - * method is primarily intended to be used by kits to retrieve their configuration. - * - * @param kitClass The class of the kit whose configuration should be returned. - * It should conform to the FABKit protocol. - * - * @return A dictionary containing kit specific configuration information or nil if none exists. - */ -+ (fab_nonnull NSDictionary *)configurationDictionaryForKitClass:(fab_nonnull Class)kitClass; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Fabric/Fabric.h b/demo/Pods/AWSCore/AWSCore/Fabric/Fabric.h deleted file mode 100644 index f3c2425..0000000 --- a/demo/Pods/AWSCore/AWSCore/Fabric/Fabric.h +++ /dev/null @@ -1,67 +0,0 @@ -// -// Fabric.h -// Fabric -// -// Copyright (C) 2015 Twitter, Inc. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -#import -#import "FABAttributes.h" - -NS_ASSUME_NONNULL_BEGIN - -/** - * Fabric Base. Coordinates configuration and starts all provided kits. - */ -@interface Fabric : NSObject - -/** - * Initialize Fabric and all provided kits. Call this method within your App Delegate's `application:didFinishLaunchingWithOptions:` and provide the kits you wish to use. - * - * For example, in Objective-C: - * - * `[Fabric with:@[[Crashlytics class], [Twitter class], [Digits class], [MoPub class]]];` - * - * Swift: - * - * `Fabric.with([Crashlytics.self(), Twitter.self(), Digits.self(), MoPub.self()])` - * - * Only the first call to this method is honored. Subsequent calls are no-ops. - * - * @param kitClasses An array of kit Class objects - * - * @return Returns the shared Fabric instance. In most cases this can be ignored. - */ -+ (instancetype)with:(NSArray *)kitClasses; - -/** - * Returns the Fabric singleton object. - */ -+ (instancetype)sharedSDK; - -/** - * This BOOL enables or disables debug logging, such as kit version information. The default value is NO. - */ -@property (nonatomic, assign) BOOL debug; - -/** - * Unavailable. Use `+sharedSDK` to retrieve the shared Fabric instance. - */ -- (id)init FAB_UNAVAILABLE("Use +sharedSDK to retrieve the shared Fabric instance."); - -@end - -NS_ASSUME_NONNULL_END - diff --git a/demo/Pods/AWSCore/AWSCore/GZIP/AWSGZIP.h b/demo/Pods/AWSCore/AWSCore/GZIP/AWSGZIP.h deleted file mode 100644 index b0efed9..0000000 --- a/demo/Pods/AWSCore/AWSCore/GZIP/AWSGZIP.h +++ /dev/null @@ -1,44 +0,0 @@ -// -// GZIP.h -// -// Version 1.0.3 -// -// Created by Nick Lockwood on 03/06/2012. -// Copyright (C) 2012 Charcoal Design -// -// Distributed under the permissive zlib License -// Get the latest version from here: -// -// https://github.com/nicklockwood/GZIP -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// - - -#import - -void awsgzip_loadGZIP(void); - -@interface NSData (AWSGZIP) - -- (NSData *)awsgzip_gzippedDataWithCompressionLevel:(float)level; -- (NSData *)awsgzip_gzippedData; -- (NSData *)awsgzip_gunzippedData; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/GZIP/AWSGZIP.m b/demo/Pods/AWSCore/AWSCore/GZIP/AWSGZIP.m deleted file mode 100644 index 14f55d5..0000000 --- a/demo/Pods/AWSCore/AWSCore/GZIP/AWSGZIP.m +++ /dev/null @@ -1,124 +0,0 @@ -// -// GZIP.m -// -// Version 1.0.3 -// -// Created by Nick Lockwood on 03/06/2012. -// Copyright (C) 2012 Charcoal Design -// -// Distributed under the permissive zlib License -// Get the latest version from here: -// -// https://github.com/nicklockwood/GZIP -// -// This software is provided 'as-is', without any express or implied -// warranty. In no event will the authors be held liable for any damages -// arising from the use of this software. -// -// Permission is granted to anyone to use this software for any purpose, -// including commercial applications, and to alter it and redistribute it -// freely, subject to the following restrictions: -// -// 1. The origin of this software must not be misrepresented; you must not -// claim that you wrote the original software. If you use this software -// in a product, an acknowledgment in the product documentation would be -// appreciated but is not required. -// -// 2. Altered source versions must be plainly marked as such, and must not be -// misrepresented as being the original software. -// -// 3. This notice may not be removed or altered from any source distribution. -// - - -#import "AWSGZIP.h" -#import - -void awsgzip_loadGZIP(){ -} - -static const NSUInteger ChunkSize = 16384; - - -@implementation NSData (AWSGZIP) - -- (NSData *)awsgzip_gzippedDataWithCompressionLevel:(float)level -{ - if ([self length]) - { - z_stream stream; - stream.zalloc = Z_NULL; - stream.zfree = Z_NULL; - stream.opaque = Z_NULL; - stream.avail_in = (uint)[self length]; - stream.next_in = (Bytef *)[self bytes]; - stream.total_out = 0; - stream.avail_out = 0; - - int compression = (level < 0.0f)? Z_DEFAULT_COMPRESSION: (int)(roundf(level * 9)); - if (deflateInit2(&stream, compression, Z_DEFLATED, 31, 8, Z_DEFAULT_STRATEGY) == Z_OK) - { - NSMutableData *data = [NSMutableData dataWithLength:ChunkSize]; - while (stream.avail_out == 0) - { - if (stream.total_out >= [data length]) - { - data.length += ChunkSize; - } - stream.next_out = (uint8_t *)[data mutableBytes] + stream.total_out; - stream.avail_out = (uInt)([data length] - stream.total_out); - deflate(&stream, Z_FINISH); - } - deflateEnd(&stream); - data.length = stream.total_out; - return data; - } - } - return nil; -} - -- (NSData *)awsgzip_gzippedData -{ - return [self awsgzip_gzippedDataWithCompressionLevel:-1.0f]; -} - -- (NSData *)awsgzip_gunzippedData -{ - if ([self length]) - { - z_stream stream; - stream.zalloc = Z_NULL; - stream.zfree = Z_NULL; - stream.avail_in = (uint)[self length]; - stream.next_in = (Bytef *)[self bytes]; - stream.total_out = 0; - stream.avail_out = 0; - - NSMutableData *data = [NSMutableData dataWithLength:(NSUInteger)([self length] * 1.5)]; - if (inflateInit2(&stream, 47) == Z_OK) - { - int status = Z_OK; - while (status == Z_OK) - { - if (stream.total_out >= [data length]) - { - data.length += [self length] / 2; - } - stream.next_out = (uint8_t *)[data mutableBytes] + stream.total_out; - stream.avail_out = (uInt)([data length] - stream.total_out); - status = inflate (&stream, Z_SYNC_FLUSH); - } - if (inflateEnd(&stream) == Z_OK) - { - if (status == Z_STREAM_END) - { - data.length = stream.total_out; - return data; - } - } - } - } - return nil; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/KSReachability/AWSKSReachability.h b/demo/Pods/AWSCore/AWSCore/KSReachability/AWSKSReachability.h deleted file mode 100644 index 6ed1f24..0000000 --- a/demo/Pods/AWSCore/AWSCore/KSReachability/AWSKSReachability.h +++ /dev/null @@ -1,204 +0,0 @@ -// -// KSReachability.h -// -// Created by Karl Stenerud on 5/5/12. -// -// Copyright (c) 2012 Karl Stenerud. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall remain in place -// in this source code. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#import -#import - - -/** This is the notification name used in the Apple reachability example. - * It is not used internally, and is merely a suggested notification name. - */ -#define kAWSDefaultNetworkReachabilityChangedNotification @"kAWSNetworkReachabilityChangedNotification" - - -@class AWSKSReachability; - -typedef void(^AWSKSReachabilityCallback)(AWSKSReachability* reachability); - - -/** Monitors network connectivity. - * - * You can elect to be notified via blocks (onReachabilityChanged), - * notifications (notificationName), or KVO (flags, reachable, and WWANOnly). - * - * All notification methods are disabled by default. - * - * Note: Upon construction, this object will fetch its initial reachability - * state in the background. This means that the reachability status will ALWAYS - * be "unreachable" until some time after object construction (possibly up to 10 - * seconds, depending on how long the DNS lookup takes). Use the "initialized" - * property to monitor initialization, or set the callback "onInitializationComplete". - */ -@interface AWSKSReachability : NSObject - -#pragma mark Constructors - -/** Reachability to a specific host. Returns nil if an initialization error occurs. - * - * @param hostname The name or IP address of the host to monitor. If nil or - * empty string, check reachability to the internet in general. - */ -+ (AWSKSReachability*) reachabilityToHost:(NSString*) hostname; - -/** Reachability to the local (wired or wifi) network. Returns nil if an initialization error occurs. - */ -+ (AWSKSReachability*) reachabilityToLocalNetwork; - -/** Reachability to the internet. Returns nil if an initialization error occurs. - */ -+ (AWSKSReachability*) reachabilityToInternet; - - -#pragma mark General Information - -/** The host we are monitoring reachability to, if any. */ -@property(nonatomic,readonly,retain) NSString* hostname; - - -#pragma mark Notifications and Callbacks - -/** If non-nil, called when the KSReachability object has finished initializing. - * If initialization has already completed, calls on the next main thread run loop. - * This block will only be called once, and then discarded (released). - * Block will be invoked on the main thread. - */ -@property(atomic,readwrite,copy) AWSKSReachabilityCallback onInitializationComplete; - -/** If non-nil, called whenever reachability flags change. - * Block will be invoked on the main thread. - */ -@property(atomic,readwrite,copy) AWSKSReachabilityCallback onReachabilityChanged; - -/** The notification to send when reachability changes (nil = don't send). - * Default = nil - */ -@property(nonatomic,readwrite,retain) NSString* notificationName; - - -#pragma mark KVO Compliant Status Properties - -/** The current reachability flags. - * This property will always report 0 while "initialized" property = NO. - */ -@property(nonatomic,readonly,assign) SCNetworkReachabilityFlags flags; - -/** Whether the host is reachable or not. - * This property will always report NO while "initialized" property = NO. - */ -@property(nonatomic,readonly,assign) BOOL reachable; - -/* If YES, the host is only reachable by WWAN (iOS only). - * This property will always report NO while "initialized" property = NO. - */ -@property(nonatomic,readonly,assign) BOOL WWANOnly; - -/** If YES, this object's status properties are valid. */ -@property(atomic,readonly,assign) BOOL initialized; - -@end - - - -/** A one-time operation to perform as soon as a host is deemed reachable. - * The operation will only be performed once, regardless of how many times a - * host becomes reachable. - */ -@interface AWSKSReachableOperation: NSObject - -/** Constructor. Returns nil if an initialization error occurs. - * - * @param hostname The name or IP address of the host to monitor. If nil or - * empty string, check reachability to the internet in general. - * If hostname is a URL string, it will use the host portion. - * - * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger - * this operation. - * - * @param onReachabilityAchieved Invoke when the host becomes reachable. - * This will be invoked ONE TIME ONLY, no matter - * how many times reachability changes. - * Block will be invoked on the main thread. - */ -+ (AWSKSReachableOperation*) operationWithHost:(NSString*) hostname - allowWWAN:(BOOL) allowWWAN - onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved; - -/** Constructor. Returns nil if an initialization error occurs. - * - * @param reachability A reachability instance. Note: This object will overwrite - * the onReachabilityChanged property. - * - * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger - * this operation. - * - * @param onReachabilityAchieved Invoke when the host becomes reachable. - * This will be invoked ONE TIME ONLY, no matter - * how many times reachability changes. - * Block will be invoked on the main thread. - */ -+ (AWSKSReachableOperation*) operationWithReachability:(AWSKSReachability*) reachability - allowWWAN:(BOOL) allowWWAN - onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved; - -/** Initializer. Returns nil if an initialization error occurs. - * - * @param hostname The name or IP address of the host to monitor. If nil or - * empty string, check reachability to the internet in general. - * If hostname is a URL string, it will use the host portion. - * - * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger - * this operation. - * - * @param onReachabilityAchieved Invoke when the host becomes reachable. - * This will be invoked ONE TIME ONLY, no matter - * how many times reachability changes. - * Block will be invoked on the main thread. - */ -- (id) initWithHost:(NSString*) hostname - allowWWAN:(BOOL) allowWWAN -onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved; - -/** Initializer. Returns nil if an initialization error occurs. - * - * @param reachability A reachability instance. Note: This object will overwrite - * the onReachabilityChanged property. - * - * @param allowWWAN If NO, a WWAN-only connection is not enough to trigger - * this operation. - * - * @param onReachabilityAchieved Invoke when the host becomes reachable. - * This will be invoked ONE TIME ONLY, no matter - * how many times reachability changes. - * Block will be invoked on the main thread. - */ -- (id) initWithReachability:(AWSKSReachability*) reachability - allowWWAN:(BOOL) allowWWAN - onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved; - -/** Access to internal reachability instance. Use this to monitor for errors. */ -@property(nonatomic,readonly,retain) AWSKSReachability* reachability; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/KSReachability/AWSKSReachability.m b/demo/Pods/AWSCore/AWSCore/KSReachability/AWSKSReachability.m deleted file mode 100644 index a63bb4d..0000000 --- a/demo/Pods/AWSCore/AWSCore/KSReachability/AWSKSReachability.m +++ /dev/null @@ -1,461 +0,0 @@ -// -// KSReachability.m -// -// Created by Karl Stenerud on 5/5/12. -// -// Copyright (c) 2012 Karl Stenerud. All rights reserved. -// -// Permission is hereby granted, free of charge, to any person obtaining a copy -// of this software and associated documentation files (the "Software"), to deal -// in the Software without restriction, including without limitation the rights -// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -// copies of the Software, and to permit persons to whom the Software is -// furnished to do so, subject to the following conditions: -// -// The above copyright notice and this permission notice shall remain in place -// in this source code. -// -// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -// THE SOFTWARE. -// - -#import "AWSKSReachability.h" -#import -#import - - -// ---------------------------------------------------------------------- -#pragma mark - ARC-Safe Memory Management - -// ---------------------------------------------------------------------- - -// Full version at https://github.com/kstenerud/ARCSafe-MemManagement -#if __has_feature(objc_arc) - #define aws_as_release(X) - #define aws_as_autorelease(X) (X) - #define aws_as_autorelease_noref(X) - #define aws_as_superdealloc() - #define aws_as_bridge __bridge -#else - #define aws_as_release(X) [(X) release] - #define aws_as_autorelease(X) [(X) autorelease] - #define aws_as_autorelease_noref(X) [(X) autorelease] - #define aws_as_superdealloc() [super dealloc] - #define aws_as_bridge -#endif - - -#define kAWSKVOProperty_Flags @"flags" -#define kAWSKVOProperty_Reachable @"reachable" -#define kAWSKVOProperty_WWANOnly @"WWANOnly" - - -// ---------------------------------------------------------------------- -#pragma mark - KSReachability - -// ---------------------------------------------------------------------- - -@interface AWSKSReachability () - -@property(nonatomic,readwrite,retain) NSString* hostname; -@property(nonatomic,readwrite,assign) SCNetworkReachabilityFlags flags; -@property(nonatomic,readwrite,assign) BOOL reachable; -@property(nonatomic,readwrite,assign) BOOL WWANOnly; -@property(nonatomic,readwrite,assign) SCNetworkReachabilityRef reachabilityRef; -@property(atomic,readwrite,assign) BOOL initialized; - -@end - -static void onReachabilityChanged(SCNetworkReachabilityRef target, - SCNetworkReachabilityFlags flags, - void* info); - - -@implementation AWSKSReachability - -@synthesize onInitializationComplete = _onInitializationComplete; -@synthesize onReachabilityChanged = _onReachabilityChanged; -@synthesize flags = _flags; -@synthesize reachable = _reachable; -@synthesize WWANOnly = _WWANOnly; -@synthesize reachabilityRef = _reachabilityRef; -@synthesize hostname = _hostname; -@synthesize notificationName = _notificationName; -@synthesize initialized = _initialized; - -+ (AWSKSReachability*) reachabilityToHost:(NSString*) hostname -{ - return aws_as_autorelease([[self alloc] initWithHost:hostname]); -} - -+ (AWSKSReachability*) reachabilityToLocalNetwork -{ - struct sockaddr_in address; - bzero(&address, sizeof(address)); - address.sin_len = sizeof(address); - address.sin_family = AF_INET; - address.sin_addr.s_addr = htonl(IN_LINKLOCALNETNUM); - - return aws_as_autorelease([[self alloc] initWithAddress:(const struct sockaddr*)&address]); -} - -+ (AWSKSReachability*) reachabilityToInternet -{ - struct sockaddr_in address; - bzero(&address, sizeof(address)); - address.sin_len = sizeof(address); - address.sin_family = AF_INET; - - return aws_as_autorelease([[self alloc] initWithAddress:(const struct sockaddr*)&address]); -} - -- (id) initWithHost:(NSString*) hostname -{ - hostname = [self extractHostName:hostname]; - const char* name = [hostname UTF8String]; - - struct sockaddr_in6 address; - bzero(&address, sizeof(address)); - address.sin6_len = sizeof(address); - address.sin6_family = AF_INET; - - if([hostname length] > 0) - { - if(inet_pton(address.sin6_family, name, &address.sin6_addr) != 1) - { - address.sin6_family = AF_INET6; - if(inet_pton(address.sin6_family, name, &address.sin6_addr) != 1) - { - return [self initWithReachabilityRef:SCNetworkReachabilityCreateWithName(NULL, name) - hostname:hostname]; - } - } - } - - return [self initWithAddress:(const struct sockaddr*)&address]; -} - -- (id) initWithAddress:(const struct sockaddr*) address -{ - return [self initWithReachabilityRef:SCNetworkReachabilityCreateWithAddress(kCFAllocatorDefault, address) - hostname:nil]; -} - -- (id) initWithReachabilityRef:(SCNetworkReachabilityRef) reachabilityRef - hostname:(NSString*)hostname -{ - if((self = [super init])) - { - if(reachabilityRef == NULL) - { - NSLog(@"KSReachability Error: %s: Could not resolve reachability destination", __PRETTY_FUNCTION__); - goto init_failed; - } - else - { - self.hostname = hostname; - self.reachabilityRef = reachabilityRef; - - SCNetworkReachabilityContext context = {0, (aws_as_bridge void*)self, NULL, NULL, NULL}; - if(!SCNetworkReachabilitySetCallback(self.reachabilityRef, - onReachabilityChanged, - &context)) - { - NSLog(@"KSReachability Error: %s: SCNetworkReachabilitySetCallback failed", __PRETTY_FUNCTION__); - goto init_failed; - } - - if(!SCNetworkReachabilityScheduleWithRunLoop(self.reachabilityRef, - CFRunLoopGetMain(), - kCFRunLoopDefaultMode)) - { - NSLog(@"KSReachability Error: %s: SCNetworkReachabilityScheduleWithRunLoop failed", __PRETTY_FUNCTION__); - goto init_failed; - } - - // If you create a reachability ref using SCNetworkReachabilityCreateWithAddress(), - // it won't trigger from the runloop unless you kick it with SCNetworkReachabilityGetFlags() - if([hostname length] == 0) - { - SCNetworkReachabilityFlags flags; - // Note: This won't block because there's no host to look up. - if(!SCNetworkReachabilityGetFlags(self.reachabilityRef, &flags)) - { - NSLog(@"KSReachability Error: %s: SCNetworkReachabilityGetFlags failed", __PRETTY_FUNCTION__); - goto init_failed; - } - - dispatch_async(dispatch_get_main_queue(), ^ - { - [self onReachabilityFlagsChanged:flags]; - }); - } - } - } - return self; - -init_failed: - aws_as_release(self); - self = nil; - return self; -} - -- (void) dealloc -{ - if(_reachabilityRef != NULL) - { - SCNetworkReachabilityUnscheduleFromRunLoop(_reachabilityRef, - CFRunLoopGetMain(), - kCFRunLoopDefaultMode); - CFRelease(_reachabilityRef); - } - aws_as_release(_hostname); - aws_as_release(_notificationName); - aws_as_release(_onReachabilityChanged); - aws_as_superdealloc(); -} - -- (NSString*) extractHostName:(NSString*) potentialURL -{ - if(potentialURL == nil) - { - return nil; - } - - NSString* host = [[NSURL URLWithString:potentialURL] host]; - if(host != nil) - { - return host; - } - return potentialURL; -} - -- (BOOL) isReachableWithFlags:(SCNetworkReachabilityFlags) flags -{ - if(!(flags & kSCNetworkReachabilityFlagsReachable)) - { - // Not reachable at all. - return NO; - } - - if(!(flags & kSCNetworkReachabilityFlagsConnectionRequired)) - { - // Reachable with no connection required. - return YES; - } - - if((flags & (kSCNetworkReachabilityFlagsConnectionOnDemand | - kSCNetworkReachabilityFlagsConnectionOnTraffic)) && - !(flags & kSCNetworkReachabilityFlagsInterventionRequired)) - { - // Automatic connection with no user intervention required. - return YES; - } - - return NO; -} - -- (BOOL) isReachableWWANOnlyWithFlags:(SCNetworkReachabilityFlags) flags -{ -#if TARGET_OS_IPHONE - BOOL isReachable = [self isReachableWithFlags:flags]; - BOOL isWWANOnly = (flags & kSCNetworkReachabilityFlagsIsWWAN) != 0; - return isReachable && isWWANOnly; -#else -#pragma unused(flags) - return NO; -#endif -} - -- (AWSKSReachabilityCallback) onInitializationComplete -{ - @synchronized(self) - { - return _onInitializationComplete; - } -} - -- (void) setOnInitializationComplete:(AWSKSReachabilityCallback) onInitializationComplete -{ - @synchronized(self) - { - aws_as_autorelease_noref(_onInitializationComplete); - _onInitializationComplete = [onInitializationComplete copy]; - if(_onInitializationComplete != nil && self.initialized) - { - dispatch_async(dispatch_get_main_queue(), ^ - { - [self callInitializationComplete]; - }); - } - } -} - -- (void) callInitializationComplete -{ - // This method expects to be called on the main run loop so that - // all callbacks occur on the main run loop. - @synchronized(self) - { - AWSKSReachabilityCallback callback = self.onInitializationComplete; - self.onInitializationComplete = nil; - if(callback != nil) - { - callback(self); - } - } -} - -- (void) onReachabilityFlagsChanged:(SCNetworkReachabilityFlags) flags -{ - // This method expects to be called on the main run loop so that - // all callbacks occur on the main run loop. - @synchronized(self) - { - BOOL wasInitialized = self.initialized; - - if(_flags != flags || !wasInitialized) - { - BOOL reachable = [self isReachableWithFlags:flags]; - BOOL WWANOnly = [self isReachableWWANOnlyWithFlags:flags]; - BOOL rChanged = (_reachable != reachable) || !wasInitialized; - BOOL wChanged = (_WWANOnly != WWANOnly) || !wasInitialized; - - [self willChangeValueForKey:kAWSKVOProperty_Flags]; - if(rChanged) [self willChangeValueForKey:kAWSKVOProperty_Reachable]; - if(wChanged) [self willChangeValueForKey:kAWSKVOProperty_WWANOnly]; - - _flags = flags; - _reachable = reachable; - _WWANOnly = WWANOnly; - - if(!wasInitialized) - { - self.initialized = YES; - } - - [self didChangeValueForKey:kAWSKVOProperty_Flags]; - if(rChanged) [self didChangeValueForKey:kAWSKVOProperty_Reachable]; - if(wChanged) [self didChangeValueForKey:kAWSKVOProperty_WWANOnly]; - - if(self.onReachabilityChanged != nil) - { - self.onReachabilityChanged(self); - } - - if(self.notificationName != nil) - { - NSNotificationCenter* nCenter = [NSNotificationCenter defaultCenter]; - [nCenter postNotificationName:self.notificationName object:self]; - } - - if(!wasInitialized) - { - [self callInitializationComplete]; - } - } - } -} - - -static void onReachabilityChanged(__unused SCNetworkReachabilityRef target, - SCNetworkReachabilityFlags flags, - void* info) -{ - AWSKSReachability* reachability = (aws_as_bridge AWSKSReachability*) info; - [reachability onReachabilityFlagsChanged:flags]; -} - -@end - - -// ---------------------------------------------------------------------- -#pragma mark - KSReachableOperation - -// ---------------------------------------------------------------------- - -@interface AWSKSReachableOperation () - -@property(nonatomic,readwrite,retain) AWSKSReachability* reachability; - -@end - - -@implementation AWSKSReachableOperation - -@synthesize reachability = _reachability; - -+ (AWSKSReachableOperation*) operationWithHost:(NSString*) host - allowWWAN:(BOOL) allowWWAN - onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved -{ - return aws_as_autorelease([[self alloc] initWithHost:host - allowWWAN:allowWWAN - onReachabilityAchieved:onReachabilityAchieved]); -} - -+ (AWSKSReachableOperation*) operationWithReachability:(AWSKSReachability*) reachability - allowWWAN:(BOOL) allowWWAN - onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved -{ - return aws_as_autorelease([[self alloc] initWithReachability:reachability - allowWWAN:allowWWAN - onReachabilityAchieved:onReachabilityAchieved]); -} - -- (id) initWithHost:(NSString*) host - allowWWAN:(BOOL) allowWWAN -onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved -{ - return [self initWithReachability:[AWSKSReachability reachabilityToHost:host] - allowWWAN:allowWWAN - onReachabilityAchieved:onReachabilityAchieved]; -} - -- (id) initWithReachability:(AWSKSReachability*) reachability - allowWWAN:(BOOL) allowWWAN - onReachabilityAchieved:(dispatch_block_t) onReachabilityAchieved -{ - if((self = [super init])) - { - self.reachability = reachability; - if(self.reachability == nil || onReachabilityAchieved == nil) - { - aws_as_release(self); - self = nil; - } - else - { - onReachabilityAchieved = aws_as_autorelease([onReachabilityAchieved copy]); - AWSKSReachabilityCallback onReachabilityChanged = ^(AWSKSReachability* reachability2) - { - @synchronized(reachability2) - { - if(reachability2.onReachabilityChanged != nil && - reachability2.reachable && - (allowWWAN || !reachability2.WWANOnly)) - { - reachability2.onReachabilityChanged = nil; - onReachabilityAchieved(); - } - } - }; - - self.reachability.onReachabilityChanged = onReachabilityChanged; - - // Check once manually in case the host is already reachable. - onReachabilityChanged(self.reachability); - } - } - return self; -} - -- (void) dealloc -{ - aws_as_release(_reachability); - aws_as_superdealloc(); -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSCocoaLumberjack.h b/demo/Pods/AWSCore/AWSCore/Logging/AWSCocoaLumberjack.h deleted file mode 100644 index 6904772..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSCocoaLumberjack.h +++ /dev/null @@ -1,87 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -/** - * Welcome to CocoaLumberjack! - * - * The project page has a wealth of documentation if you have any questions. - * https://github.com/CocoaLumberjack/CocoaLumberjack - * - * If you're new to the project you may wish to read "Getting Started" at: - * Documentation/GettingStarted.md - * - * Otherwise, here is a quick refresher. - * There are three steps to using the macros: - * - * Step 1: - * Import the header in your implementation or prefix file: - * - * #import - * - * Step 2: - * Define your logging level in your implementation file: - * - * // Log levels: off, error, warn, info, verbose - * static const AWSDDLogLevel ddLogLevel = AWSDDLogLevelVerbose; - * - * Step 2 [3rd party frameworks]: - * - * Define your LOG_LEVEL_DEF to a different variable/function than ddLogLevel: - * - * // #undef LOG_LEVEL_DEF // Undefine first only if needed - * #define LOG_LEVEL_DEF myLibLogLevel - * - * Define your logging level in your implementation file: - * - * // Log levels: off, error, warn, info, verbose - * static const AWSDDLogLevel myLibLogLevel = AWSDDLogLevelVerbose; - * - * Step 3: - * Replace your NSLog statements with AWSDDLog statements according to the severity of the message. - * - * NSLog(@"Fatal error, no dohickey found!"); -> AWSDDLogError(@"Fatal error, no dohickey found!"); - * - * AWSDDLog works exactly the same as NSLog. - * This means you can pass it multiple variables just like NSLog. - **/ - -#import - - -// Disable legacy macros -#ifndef AWSDD_LEGACY_MACROS - #define AWSDD_LEGACY_MACROS 0 -#endif - -// Core -#import "AWSDDLog.h" - -// Main macros -#import "AWSDDLogMacros.h" -#import "AWSDDAssertMacros.h" - -// Capture ASL -#import "AWSDDASLLogCapture.h" - -// Loggers -#import "AWSDDTTYLogger.h" -#import "AWSDDASLLogger.h" -#import "AWSDDFileLogger.h" -#import "AWSDDOSLogger.h" - -// CLI -#if __has_include("CLIColor.h") && TARGET_OS_OSX -#import "CLIColor.h" -#endif diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogCapture.h b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogCapture.h deleted file mode 100644 index 7082583..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogCapture.h +++ /dev/null @@ -1,41 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -#import "AWSDDASLLogger.h" - -@protocol AWSDDLogger; - -/** - * This class provides the ability to capture the ASL (Apple System Logs) - */ -@interface AWSDDASLLogCapture : NSObject - -/** - * Start capturing logs - */ -+ (void)start; - -/** - * Stop capturing logs - */ -+ (void)stop; - -/** - * The current capture level. - * @note Default log level: AWSDDLogLevelVerbose (i.e. capture all ASL messages). - */ -@property (class) AWSDDLogLevel captureLevel; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogCapture.m b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogCapture.m deleted file mode 100644 index 2059dcb..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogCapture.m +++ /dev/null @@ -1,230 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -#import "AWSDDASLLogCapture.h" - -// Disable legacy macros -#ifndef AWSDD_LEGACY_MACROS - #define AWSDD_LEGACY_MACROS 0 -#endif - -#import "AWSDDLog.h" - -#include -#include -#include -#include - -static BOOL _cancel = YES; -static AWSDDLogLevel _captureLevel = AWSDDLogLevelVerbose; - -#ifdef __IPHONE_8_0 - #define AWSDDASL_IOS_PIVOT_VERSION __IPHONE_8_0 -#endif -#ifdef __MAC_10_10 - #define AWSDDASL_OSX_PIVOT_VERSION __MAC_10_10 -#endif - -@implementation AWSDDASLLogCapture - -static aslmsg (*dd_asl_next)(aslresponse obj); -static void (*dd_asl_release)(aslresponse obj); - -+ (void)initialize -{ - #if (defined(AWSDDASL_IOS_PIVOT_VERSION) && __IPHONE_OS_VERSION_MAX_ALLOWED >= AWSDDASL_IOS_PIVOT_VERSION) || (defined(AWSDDASL_OSX_PIVOT_VERSION) && __MAC_OS_X_VERSION_MAX_ALLOWED >= AWSDDASL_OSX_PIVOT_VERSION) - #if __IPHONE_OS_VERSION_MIN_REQUIRED < AWSDDASL_IOS_PIVOT_VERSION || __MAC_OS_X_VERSION_MIN_REQUIRED < AWSDDASL_OSX_PIVOT_VERSION - #pragma GCC diagnostic push - #pragma GCC diagnostic ignored "-Wdeprecated-declarations" - // Building on falsely advertised SDK, targeting deprecated API - dd_asl_next = &aslresponse_next; - dd_asl_release = &aslresponse_free; - #pragma GCC diagnostic pop - #else - // Building on lastest, correct SDK, targeting latest API - dd_asl_next = &asl_next; - dd_asl_release = &asl_release; - #endif - #else - // Building on old SDKs, targeting deprecated API - dd_asl_next = &aslresponse_next; - dd_asl_release = &aslresponse_free; - #endif -} - -+ (void)start { - // Ignore subsequent calls - if (!_cancel) { - return; - } - - _cancel = NO; - - dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^(void) { - [self captureAslLogs]; - }); -} - -+ (void)stop { - _cancel = YES; -} - -+ (AWSDDLogLevel)captureLevel { - return _captureLevel; -} - -+ (void)setCaptureLevel:(AWSDDLogLevel)level { - _captureLevel = level; -} - -#pragma mark - Private methods - -+ (void)configureAslQuery:(aslmsg)query { - const char param[] = "7"; // ASL_LEVEL_DEBUG, which is everything. We'll rely on regular AWSDDlog log level to filter - - asl_set_query(query, ASL_KEY_LEVEL, param, ASL_QUERY_OP_LESS_EQUAL | ASL_QUERY_OP_NUMERIC); - - // Don't retrieve logs from our own AWSDDASLLogger - asl_set_query(query, kAWSDDASLKeyAWSDDLog, kAWSDDASLAWSDDLogValue, ASL_QUERY_OP_NOT_EQUAL); - -#if !TARGET_OS_IPHONE || TARGET_SIMULATOR - int processId = [[NSProcessInfo processInfo] processIdentifier]; - char pid[16]; - sprintf(pid, "%d", processId); - asl_set_query(query, ASL_KEY_PID, pid, ASL_QUERY_OP_EQUAL | ASL_QUERY_OP_NUMERIC); -#endif -} - -+ (void)aslMessageReceived:(aslmsg)msg { - const char* messageCString = asl_get( msg, ASL_KEY_MSG ); - if (messageCString == NULL) - return; - - int flag; - BOOL async; - - const char* levelCString = asl_get(msg, ASL_KEY_LEVEL); - switch (levelCString? atoi(levelCString) : 0) { - // By default all NSLog's with a ASL_LEVEL_WARNING level - case ASL_LEVEL_EMERG : - case ASL_LEVEL_ALERT : - case ASL_LEVEL_CRIT : flag = AWSDDLogFlagError; async = NO; break; - case ASL_LEVEL_ERR : flag = AWSDDLogFlagWarning; async = YES; break; - case ASL_LEVEL_WARNING : flag = AWSDDLogFlagInfo; async = YES; break; - case ASL_LEVEL_NOTICE : flag = AWSDDLogFlagDebug; async = YES; break; - case ASL_LEVEL_INFO : - case ASL_LEVEL_DEBUG : - default : flag = AWSDDLogFlagVerbose; async = YES; break; - } - - if (!(_captureLevel & flag)) { - return; - } - - // NSString * sender = [NSString stringWithCString:asl_get(msg, ASL_KEY_SENDER) encoding:NSUTF8StringEncoding]; - NSString *message = @(messageCString); - - const char* secondsCString = asl_get( msg, ASL_KEY_TIME ); - const char* nanoCString = asl_get( msg, ASL_KEY_TIME_NSEC ); - NSTimeInterval seconds = secondsCString ? strtod(secondsCString, NULL) : [NSDate timeIntervalSinceReferenceDate] - NSTimeIntervalSince1970; - double nanoSeconds = nanoCString? strtod(nanoCString, NULL) : 0; - NSTimeInterval totalSeconds = seconds + (nanoSeconds / 1e9); - - NSDate *timeStamp = [NSDate dateWithTimeIntervalSince1970:totalSeconds]; - - AWSDDLogMessage *logMessage = [[AWSDDLogMessage alloc]initWithMessage:message - level:_captureLevel - flag:flag - context:0 - file:@"AWSDDASLLogCapture" - function:0 - line:0 - tag:nil - options:0 - timestamp:timeStamp]; - - [AWSDDLog log:async message:logMessage]; -} - -+ (void)captureAslLogs { - @autoreleasepool - { - /* - We use ASL_KEY_MSG_ID to see each message once, but there's no - obvious way to get the "next" ID. To bootstrap the process, we'll - search by timestamp until we've seen a message. - */ - - struct timeval timeval = { - .tv_sec = 0 - }; - gettimeofday(&timeval, NULL); - unsigned long long startTime = timeval.tv_sec; - __block unsigned long long lastSeenID = 0; - - /* - syslogd posts kNotifyASLDBUpdate (com.apple.system.logger.message) - through the notify API when it saves messages to the ASL database. - There is some coalescing - currently it is sent at most twice per - second - but there is no documented guarantee about this. In any - case, there may be multiple messages per notification. - - Notify notifications don't carry any payload, so we need to search - for the messages. - */ - int notifyToken = 0; // Can be used to unregister with notify_cancel(). - notify_register_dispatch(kNotifyASLDBUpdate, ¬ifyToken, dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^(int token) - { - // At least one message has been posted; build a search query. - @autoreleasepool - { - aslmsg query = asl_new(ASL_TYPE_QUERY); - char stringValue[64]; - - if (lastSeenID > 0) { - snprintf(stringValue, sizeof stringValue, "%llu", lastSeenID); - asl_set_query(query, ASL_KEY_MSG_ID, stringValue, ASL_QUERY_OP_GREATER | ASL_QUERY_OP_NUMERIC); - } else { - snprintf(stringValue, sizeof stringValue, "%llu", startTime); - asl_set_query(query, ASL_KEY_TIME, stringValue, ASL_QUERY_OP_GREATER_EQUAL | ASL_QUERY_OP_NUMERIC); - } - - [self configureAslQuery:query]; - - // Iterate over new messages. - aslmsg msg; - aslresponse response = asl_search(NULL, query); - - while ((msg = dd_asl_next(response))) - { - [self aslMessageReceived:msg]; - - // Keep track of which messages we've seen. - lastSeenID = atoll(asl_get(msg, ASL_KEY_MSG_ID)); - } - dd_asl_release(response); - asl_free(query); - - if (_cancel) { - notify_cancel(token); - return; - } - - } - }); - } -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogger.h b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogger.h deleted file mode 100644 index 757708d..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogger.h +++ /dev/null @@ -1,58 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -#import - -// Disable legacy macros -#ifndef AWSDD_LEGACY_MACROS - #define AWSDD_LEGACY_MACROS 0 -#endif - -#import "AWSDDLog.h" - -// Custom key set on messages sent to ASL -extern const char* const kAWSDDASLKeyAWSDDLog; - -// Value set for kAWSDDASLKeyAWSDDLog -extern const char* const kAWSDDASLAWSDDLogValue; - -/** - * This class provides a logger for the Apple System Log facility. - * - * As described in the "Getting Started" page, - * the traditional NSLog() function directs its output to two places: - * - * - Apple System Log - * - StdErr (if stderr is a TTY) so log statements show up in Xcode console - * - * To duplicate NSLog() functionality you can simply add this logger and a tty logger. - * However, if you instead choose to use file logging (for faster performance), - * you may choose to use a file logger and a tty logger. - **/ -@interface AWSDDASLLogger : AWSDDAbstractLogger - -/** - * Singleton method - * - * @return the shared instance - */ -@property (class, readonly, strong) AWSDDASLLogger *sharedInstance; - -// Inherited from AWSDDAbstractLogger - -// - (id )logFormatter; -// - (void)setLogFormatter:(id )formatter; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogger.m b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogger.m deleted file mode 100644 index 21a99f0..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDASLLogger.m +++ /dev/null @@ -1,121 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -#import "AWSDDASLLogger.h" -#import - -#if !__has_feature(objc_arc) -#error This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC). -#endif - -const char* const kAWSDDASLKeyAWSDDLog = "AWSDDLog"; - -const char* const kAWSDDASLAWSDDLogValue = "1"; - -@interface AWSDDASLLogger () { - aslclient _client; -} - -@end - - -@implementation AWSDDASLLogger - -static AWSDDASLLogger *sharedInstance; - -+ (instancetype)sharedInstance { - static dispatch_once_t AWSDDASLLoggerOnceToken; - - dispatch_once(&AWSDDASLLoggerOnceToken, ^{ - sharedInstance = [[[self class] alloc] init]; - }); - - return sharedInstance; -} - -- (instancetype)init { - if (sharedInstance != nil) { - return nil; - } - - if ((self = [super init])) { - // A default asl client is provided for the main thread, - // but background threads need to create their own client. - - _client = asl_open(NULL, "com.apple.console", 0); - } - - return self; -} - -- (void)logMessage:(AWSDDLogMessage *)logMessage { - // Skip captured log messages - if ([logMessage->_fileName isEqualToString:@"AWSDDASLLogCapture"]) { - return; - } - - NSString * message = _logFormatter ? [_logFormatter formatLogMessage:logMessage] : logMessage->_message; - - if (message) { - const char *msg = [message UTF8String]; - - size_t aslLogLevel; - switch (logMessage->_flag) { - // Note: By default ASL will filter anything above level 5 (Notice). - // So our mappings shouldn't go above that level. - case AWSDDLogFlagError : aslLogLevel = ASL_LEVEL_CRIT; break; - case AWSDDLogFlagWarning : aslLogLevel = ASL_LEVEL_ERR; break; - case AWSDDLogFlagInfo : aslLogLevel = ASL_LEVEL_WARNING; break; // Regular NSLog's level - case AWSDDLogFlagDebug : - case AWSDDLogFlagVerbose : - default : aslLogLevel = ASL_LEVEL_NOTICE; break; - } - - static char const *const level_strings[] = { "0", "1", "2", "3", "4", "5", "6", "7" }; - - // NSLog uses the current euid to set the ASL_KEY_READ_UID. - uid_t const readUID = geteuid(); - - char readUIDString[16]; -#ifndef NS_BLOCK_ASSERTIONS - size_t l = snprintf(readUIDString, sizeof(readUIDString), "%d", readUID); -#else - snprintf(readUIDString, sizeof(readUIDString), "%d", readUID); -#endif - - NSAssert(l < sizeof(readUIDString), - @"Formatted euid is too long."); - NSAssert(aslLogLevel < (sizeof(level_strings) / sizeof(level_strings[0])), - @"Unhandled ASL log level."); - - aslmsg m = asl_new(ASL_TYPE_MSG); - if (m != NULL) { - if (asl_set(m, ASL_KEY_LEVEL, level_strings[aslLogLevel]) == 0 && - asl_set(m, ASL_KEY_MSG, msg) == 0 && - asl_set(m, ASL_KEY_READ_UID, readUIDString) == 0 && - asl_set(m, kAWSDDASLKeyAWSDDLog, kAWSDDASLAWSDDLogValue) == 0) { - asl_send(_client, m); - } - asl_free(m); - } - //TODO handle asl_* failures non-silently? - } -} - -- (NSString *)loggerName { - return @"cocoa.lumberjack.aslLogger"; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAbstractDatabaseLogger.h b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAbstractDatabaseLogger.h deleted file mode 100644 index 347a7c3..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAbstractDatabaseLogger.h +++ /dev/null @@ -1,123 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -// Disable legacy macros -#ifndef AWSDD_LEGACY_MACROS - #define AWSDD_LEGACY_MACROS 0 -#endif - -#import "AWSDDLog.h" - -/** - * This class provides an abstract implementation of a database logger. - * - * That is, it provides the base implementation for a database logger to build atop of. - * All that is needed for a concrete database logger is to extend this class - * and override the methods in the implementation file that are prefixed with "db_". - **/ -@interface AWSDDAbstractDatabaseLogger : AWSDDAbstractLogger { - -@protected - NSUInteger _saveThreshold; - NSTimeInterval _saveInterval; - NSTimeInterval _maxAge; - NSTimeInterval _deleteInterval; - BOOL _deleteOnEverySave; - - BOOL _saveTimerSuspended; - NSUInteger _unsavedCount; - dispatch_time_t _unsavedTime; - dispatch_source_t _saveTimer; - dispatch_time_t _lastDeleteTime; - dispatch_source_t _deleteTimer; -} - -/** - * Specifies how often to save the data to disk. - * Since saving is an expensive operation (disk io) it is not done after every log statement. - * These properties allow you to configure how/when the logger saves to disk. - * - * A save is done when either (whichever happens first): - * - * - The number of unsaved log entries reaches saveThreshold - * - The amount of time since the oldest unsaved log entry was created reaches saveInterval - * - * You can optionally disable the saveThreshold by setting it to zero. - * If you disable the saveThreshold you are entirely dependent on the saveInterval. - * - * You can optionally disable the saveInterval by setting it to zero (or a negative value). - * If you disable the saveInterval you are entirely dependent on the saveThreshold. - * - * It's not wise to disable both saveThreshold and saveInterval. - * - * The default saveThreshold is 500. - * The default saveInterval is 60 seconds. - **/ -@property (assign, readwrite) NSUInteger saveThreshold; - -/** - * See the description for the `saveThreshold` property - */ -@property (assign, readwrite) NSTimeInterval saveInterval; - -/** - * It is likely you don't want the log entries to persist forever. - * Doing so would allow the database to grow infinitely large over time. - * - * The maxAge property provides a way to specify how old a log statement can get - * before it should get deleted from the database. - * - * The deleteInterval specifies how often to sweep for old log entries. - * Since deleting is an expensive operation (disk io) is is done on a fixed interval. - * - * An alternative to the deleteInterval is the deleteOnEverySave option. - * This specifies that old log entries should be deleted during every save operation. - * - * You can optionally disable the maxAge by setting it to zero (or a negative value). - * If you disable the maxAge then old log statements are not deleted. - * - * You can optionally disable the deleteInterval by setting it to zero (or a negative value). - * - * If you disable both deleteInterval and deleteOnEverySave then old log statements are not deleted. - * - * It's not wise to enable both deleteInterval and deleteOnEverySave. - * - * The default maxAge is 7 days. - * The default deleteInterval is 5 minutes. - * The default deleteOnEverySave is NO. - **/ -@property (assign, readwrite) NSTimeInterval maxAge; - -/** - * See the description for the `maxAge` property - */ -@property (assign, readwrite) NSTimeInterval deleteInterval; - -/** - * See the description for the `maxAge` property - */ -@property (assign, readwrite) BOOL deleteOnEverySave; - -/** - * Forces a save of any pending log entries (flushes log entries to disk). - **/ -- (void)savePendingLogEntries; - -/** - * Removes any log entries that are older than maxAge. - **/ -- (void)deleteOldLogEntries; - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAbstractDatabaseLogger.m b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAbstractDatabaseLogger.m deleted file mode 100644 index 62a2af2..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAbstractDatabaseLogger.m +++ /dev/null @@ -1,660 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -#import "AWSDDAbstractDatabaseLogger.h" -#import - - -#if !__has_feature(objc_arc) -#error This file must be compiled with ARC. Use -fobjc-arc flag (or convert project to ARC). -#endif - -@interface AWSDDAbstractDatabaseLogger () - -- (void)destroySaveTimer; -- (void)destroyDeleteTimer; - -@end - -#pragma mark - - -@implementation AWSDDAbstractDatabaseLogger - -- (instancetype)init { - if ((self = [super init])) { - _saveThreshold = 500; - _saveInterval = 60; // 60 seconds - _maxAge = (60 * 60 * 24 * 7); // 7 days - _deleteInterval = (60 * 5); // 5 minutes - } - - return self; -} - -- (void)dealloc { - [self destroySaveTimer]; - [self destroyDeleteTimer]; -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Override Me -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (BOOL)db_log:(AWSDDLogMessage *)logMessage { - // Override me and add your implementation. - // - // Return YES if an item was added to the buffer. - // Return NO if the logMessage was ignored. - - return NO; -} - -- (void)db_save { - // Override me and add your implementation. -} - -- (void)db_delete { - // Override me and add your implementation. -} - -- (void)db_saveAndDelete { - // Override me and add your implementation. -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Private API -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)performSaveAndSuspendSaveTimer { - if (_unsavedCount > 0) { - if (_deleteOnEverySave) { - [self db_saveAndDelete]; - } else { - [self db_save]; - } - } - - _unsavedCount = 0; - _unsavedTime = 0; - - if (_saveTimer && !_saveTimerSuspended) { - dispatch_suspend(_saveTimer); - _saveTimerSuspended = YES; - } -} - -- (void)performDelete { - if (_maxAge > 0.0) { - [self db_delete]; - - _lastDeleteTime = dispatch_time(DISPATCH_TIME_NOW, 0); - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Timers -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)destroySaveTimer { - if (_saveTimer) { - dispatch_source_cancel(_saveTimer); - - if (_saveTimerSuspended) { - // Must resume a timer before releasing it (or it will crash) - dispatch_resume(_saveTimer); - _saveTimerSuspended = NO; - } - - #if !OS_OBJECT_USE_OBJC - dispatch_release(_saveTimer); - #endif - _saveTimer = NULL; - } -} - -- (void)updateAndResumeSaveTimer { - if ((_saveTimer != NULL) && (_saveInterval > 0.0) && (_unsavedTime > 0.0)) { - uint64_t interval = (uint64_t)(_saveInterval * (NSTimeInterval) NSEC_PER_SEC); - dispatch_time_t startTime = dispatch_time(_unsavedTime, interval); - - dispatch_source_set_timer(_saveTimer, startTime, interval, 1ull * NSEC_PER_SEC); - - if (_saveTimerSuspended) { - dispatch_resume(_saveTimer); - _saveTimerSuspended = NO; - } - } -} - -- (void)createSuspendedSaveTimer { - if ((_saveTimer == NULL) && (_saveInterval > 0.0)) { - _saveTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, self.loggerQueue); - - dispatch_source_set_event_handler(_saveTimer, ^{ @autoreleasepool { - [self performSaveAndSuspendSaveTimer]; - } }); - - _saveTimerSuspended = YES; - } -} - -- (void)destroyDeleteTimer { - if (_deleteTimer) { - dispatch_source_cancel(_deleteTimer); - #if !OS_OBJECT_USE_OBJC - dispatch_release(_deleteTimer); - #endif - _deleteTimer = NULL; - } -} - -- (void)updateDeleteTimer { - if ((_deleteTimer != NULL) && (_deleteInterval > 0.0) && (_maxAge > 0.0)) { - uint64_t interval = (uint64_t)(_deleteInterval * (NSTimeInterval) NSEC_PER_SEC); - dispatch_time_t startTime; - - if (_lastDeleteTime > 0) { - startTime = dispatch_time(_lastDeleteTime, interval); - } else { - startTime = dispatch_time(DISPATCH_TIME_NOW, interval); - } - - dispatch_source_set_timer(_deleteTimer, startTime, interval, 1ull * NSEC_PER_SEC); - } -} - -- (void)createAndStartDeleteTimer { - if ((_deleteTimer == NULL) && (_deleteInterval > 0.0) && (_maxAge > 0.0)) { - _deleteTimer = dispatch_source_create(DISPATCH_SOURCE_TYPE_TIMER, 0, 0, self.loggerQueue); - - if (_deleteTimer != NULL) { - dispatch_source_set_event_handler(_deleteTimer, ^{ @autoreleasepool { - [self performDelete]; - } }); - - [self updateDeleteTimer]; - - if (_deleteTimer != NULL) { - dispatch_resume(_deleteTimer); - } - } - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Configuration -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (NSUInteger)saveThreshold { - // The design of this method is taken from the AWSDDAbstractLogger implementation. - // For extensive documentation please refer to the AWSDDAbstractLogger implementation. - - // Note: The internal implementation MUST access the colorsEnabled variable directly, - // This method is designed explicitly for external access. - // - // Using "self." syntax to go through this method will cause immediate deadlock. - // This is the intended result. Fix it by accessing the ivar directly. - // Great strides have been take to ensure this is safe to do. Plus it's MUCH faster. - - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - NSAssert(![self isOnInternalLoggerQueue], @"MUST access ivar directly, NOT via self.* syntax."); - - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - - __block NSUInteger result; - - dispatch_sync(globalLoggingQueue, ^{ - dispatch_sync(self.loggerQueue, ^{ - result = self->_saveThreshold; - }); - }); - - return result; -} - -- (void)setSaveThreshold:(NSUInteger)threshold { - dispatch_block_t block = ^{ - @autoreleasepool { - if (self->_saveThreshold != threshold) { - self->_saveThreshold = threshold; - - // Since the saveThreshold has changed, - // we check to see if the current unsavedCount has surpassed the new threshold. - // - // If it has, we immediately save the log. - - if ((self->_unsavedCount >= self->_saveThreshold) && (self->_saveThreshold > 0)) { - [self performSaveAndSuspendSaveTimer]; - } - } - } - }; - - // The design of the setter logic below is taken from the AWSDDAbstractLogger implementation. - // For documentation please refer to the AWSDDAbstractLogger implementation. - - if ([self isOnInternalLoggerQueue]) { - block(); - } else { - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - - dispatch_async(globalLoggingQueue, ^{ - dispatch_async(self.loggerQueue, block); - }); - } -} - -- (NSTimeInterval)saveInterval { - // The design of this method is taken from the AWSDDAbstractLogger implementation. - // For extensive documentation please refer to the AWSDDAbstractLogger implementation. - - // Note: The internal implementation MUST access the colorsEnabled variable directly, - // This method is designed explicitly for external access. - // - // Using "self." syntax to go through this method will cause immediate deadlock. - // This is the intended result. Fix it by accessing the ivar directly. - // Great strides have been take to ensure this is safe to do. Plus it's MUCH faster. - - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - NSAssert(![self isOnInternalLoggerQueue], @"MUST access ivar directly, NOT via self.* syntax."); - - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - - __block NSTimeInterval result; - - dispatch_sync(globalLoggingQueue, ^{ - dispatch_sync(self.loggerQueue, ^{ - result = self->_saveInterval; - }); - }); - - return result; -} - -- (void)setSaveInterval:(NSTimeInterval)interval { - dispatch_block_t block = ^{ - @autoreleasepool { - // C99 recommended floating point comparison macro - // Read: isLessThanOrGreaterThan(floatA, floatB) - - if (/* saveInterval != interval */ islessgreater(self->_saveInterval, interval)) { - self->_saveInterval = interval; - - // There are several cases we need to handle here. - // - // 1. If the saveInterval was previously enabled and it just got disabled, - // then we need to stop the saveTimer. (And we might as well release it.) - // - // 2. If the saveInterval was previously disabled and it just got enabled, - // then we need to setup the saveTimer. (Plus we might need to do an immediate save.) - // - // 3. If the saveInterval increased, then we need to reset the timer so that it fires at the later date. - // - // 4. If the saveInterval decreased, then we need to reset the timer so that it fires at an earlier date. - // (Plus we might need to do an immediate save.) - - if (self->_saveInterval > 0.0) { - if (self->_saveTimer == NULL) { - // Handles #2 - // - // Since the saveTimer uses the unsavedTime to calculate it's first fireDate, - // if a save is needed the timer will fire immediately. - - [self createSuspendedSaveTimer]; - [self updateAndResumeSaveTimer]; - } else { - // Handles #3 - // Handles #4 - // - // Since the saveTimer uses the unsavedTime to calculate it's first fireDate, - // if a save is needed the timer will fire immediately. - - [self updateAndResumeSaveTimer]; - } - } else if (self->_saveTimer) { - // Handles #1 - - [self destroySaveTimer]; - } - } - } - }; - - // The design of the setter logic below is taken from the AWSDDAbstractLogger implementation. - // For documentation please refer to the AWSDDAbstractLogger implementation. - - if ([self isOnInternalLoggerQueue]) { - block(); - } else { - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - - dispatch_async(globalLoggingQueue, ^{ - dispatch_async(self.loggerQueue, block); - }); - } -} - -- (NSTimeInterval)maxAge { - // The design of this method is taken from the AWSDDAbstractLogger implementation. - // For extensive documentation please refer to the AWSDDAbstractLogger implementation. - - // Note: The internal implementation MUST access the colorsEnabled variable directly, - // This method is designed explicitly for external access. - // - // Using "self." syntax to go through this method will cause immediate deadlock. - // This is the intended result. Fix it by accessing the ivar directly. - // Great strides have been take to ensure this is safe to do. Plus it's MUCH faster. - - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - NSAssert(![self isOnInternalLoggerQueue], @"MUST access ivar directly, NOT via self.* syntax."); - - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - - __block NSTimeInterval result; - - dispatch_sync(globalLoggingQueue, ^{ - dispatch_sync(self.loggerQueue, ^{ - result = self->_maxAge; - }); - }); - - return result; -} - -- (void)setMaxAge:(NSTimeInterval)interval { - dispatch_block_t block = ^{ - @autoreleasepool { - // C99 recommended floating point comparison macro - // Read: isLessThanOrGreaterThan(floatA, floatB) - - if (/* maxAge != interval */ islessgreater(self->_maxAge, interval)) { - NSTimeInterval oldMaxAge = self->_maxAge; - NSTimeInterval newMaxAge = interval; - - self->_maxAge = interval; - - // There are several cases we need to handle here. - // - // 1. If the maxAge was previously enabled and it just got disabled, - // then we need to stop the deleteTimer. (And we might as well release it.) - // - // 2. If the maxAge was previously disabled and it just got enabled, - // then we need to setup the deleteTimer. (Plus we might need to do an immediate delete.) - // - // 3. If the maxAge was increased, - // then we don't need to do anything. - // - // 4. If the maxAge was decreased, - // then we should do an immediate delete. - - BOOL shouldDeleteNow = NO; - - if (oldMaxAge > 0.0) { - if (newMaxAge <= 0.0) { - // Handles #1 - - [self destroyDeleteTimer]; - } else if (oldMaxAge > newMaxAge) { - // Handles #4 - shouldDeleteNow = YES; - } - } else if (newMaxAge > 0.0) { - // Handles #2 - shouldDeleteNow = YES; - } - - if (shouldDeleteNow) { - [self performDelete]; - - if (self->_deleteTimer) { - [self updateDeleteTimer]; - } else { - [self createAndStartDeleteTimer]; - } - } - } - } - }; - - // The design of the setter logic below is taken from the AWSDDAbstractLogger implementation. - // For documentation please refer to the AWSDDAbstractLogger implementation. - - if ([self isOnInternalLoggerQueue]) { - block(); - } else { - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - - dispatch_async(globalLoggingQueue, ^{ - dispatch_async(self.loggerQueue, block); - }); - } -} - -- (NSTimeInterval)deleteInterval { - // The design of this method is taken from the AWSDDAbstractLogger implementation. - // For extensive documentation please refer to the AWSDDAbstractLogger implementation. - - // Note: The internal implementation MUST access the colorsEnabled variable directly, - // This method is designed explicitly for external access. - // - // Using "self." syntax to go through this method will cause immediate deadlock. - // This is the intended result. Fix it by accessing the ivar directly. - // Great strides have been take to ensure this is safe to do. Plus it's MUCH faster. - - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - NSAssert(![self isOnInternalLoggerQueue], @"MUST access ivar directly, NOT via self.* syntax."); - - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - - __block NSTimeInterval result; - - dispatch_sync(globalLoggingQueue, ^{ - dispatch_sync(self.loggerQueue, ^{ - result = self->_deleteInterval; - }); - }); - - return result; -} - -- (void)setDeleteInterval:(NSTimeInterval)interval { - dispatch_block_t block = ^{ - @autoreleasepool { - // C99 recommended floating point comparison macro - // Read: isLessThanOrGreaterThan(floatA, floatB) - - if (/* deleteInterval != interval */ islessgreater(self->_deleteInterval, interval)) { - self->_deleteInterval = interval; - - // There are several cases we need to handle here. - // - // 1. If the deleteInterval was previously enabled and it just got disabled, - // then we need to stop the deleteTimer. (And we might as well release it.) - // - // 2. If the deleteInterval was previously disabled and it just got enabled, - // then we need to setup the deleteTimer. (Plus we might need to do an immediate delete.) - // - // 3. If the deleteInterval increased, then we need to reset the timer so that it fires at the later date. - // - // 4. If the deleteInterval decreased, then we need to reset the timer so that it fires at an earlier date. - // (Plus we might need to do an immediate delete.) - - if (self->_deleteInterval > 0.0) { - if (self->_deleteTimer == NULL) { - // Handles #2 - // - // Since the deleteTimer uses the lastDeleteTime to calculate it's first fireDate, - // if a delete is needed the timer will fire immediately. - - [self createAndStartDeleteTimer]; - } else { - // Handles #3 - // Handles #4 - // - // Since the deleteTimer uses the lastDeleteTime to calculate it's first fireDate, - // if a save is needed the timer will fire immediately. - - [self updateDeleteTimer]; - } - } else if (self->_deleteTimer) { - // Handles #1 - - [self destroyDeleteTimer]; - } - } - } - }; - - // The design of the setter logic below is taken from the AWSDDAbstractLogger implementation. - // For documentation please refer to the AWSDDAbstractLogger implementation. - - if ([self isOnInternalLoggerQueue]) { - block(); - } else { - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - - dispatch_async(globalLoggingQueue, ^{ - dispatch_async(self.loggerQueue, block); - }); - } -} - -- (BOOL)deleteOnEverySave { - // The design of this method is taken from the AWSDDAbstractLogger implementation. - // For extensive documentation please refer to the AWSDDAbstractLogger implementation. - - // Note: The internal implementation MUST access the colorsEnabled variable directly, - // This method is designed explicitly for external access. - // - // Using "self." syntax to go through this method will cause immediate deadlock. - // This is the intended result. Fix it by accessing the ivar directly. - // Great strides have been take to ensure this is safe to do. Plus it's MUCH faster. - - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - NSAssert(![self isOnInternalLoggerQueue], @"MUST access ivar directly, NOT via self.* syntax."); - - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - - __block BOOL result; - - dispatch_sync(globalLoggingQueue, ^{ - dispatch_sync(self.loggerQueue, ^{ - result = self->_deleteOnEverySave; - }); - }); - - return result; -} - -- (void)setDeleteOnEverySave:(BOOL)flag { - dispatch_block_t block = ^{ - self->_deleteOnEverySave = flag; - }; - - // The design of the setter logic below is taken from the AWSDDAbstractLogger implementation. - // For documentation please refer to the AWSDDAbstractLogger implementation. - - if ([self isOnInternalLoggerQueue]) { - block(); - } else { - dispatch_queue_t globalLoggingQueue = [AWSDDLog loggingQueue]; - NSAssert(![self isOnGlobalLoggingQueue], @"Core architecture requirement failure"); - - dispatch_async(globalLoggingQueue, ^{ - dispatch_async(self.loggerQueue, block); - }); - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark Public API -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)savePendingLogEntries { - dispatch_block_t block = ^{ - @autoreleasepool { - [self performSaveAndSuspendSaveTimer]; - } - }; - - if ([self isOnInternalLoggerQueue]) { - block(); - } else { - dispatch_async(self.loggerQueue, block); - } -} - -- (void)deleteOldLogEntries { - dispatch_block_t block = ^{ - @autoreleasepool { - [self performDelete]; - } - }; - - if ([self isOnInternalLoggerQueue]) { - block(); - } else { - dispatch_async(self.loggerQueue, block); - } -} - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark AWSDDLogger -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -- (void)didAddLogger { - // If you override me be sure to invoke [super didAddLogger]; - - [self createSuspendedSaveTimer]; - - [self createAndStartDeleteTimer]; -} - -- (void)willRemoveLogger { - // If you override me be sure to invoke [super willRemoveLogger]; - - [self performSaveAndSuspendSaveTimer]; - - [self destroySaveTimer]; - [self destroyDeleteTimer]; -} - -- (void)logMessage:(AWSDDLogMessage *)logMessage { - if ([self db_log:logMessage]) { - BOOL firstUnsavedEntry = (++_unsavedCount == 1); - - if ((_unsavedCount >= _saveThreshold) && (_saveThreshold > 0)) { - [self performSaveAndSuspendSaveTimer]; - } else if (firstUnsavedEntry) { - _unsavedTime = dispatch_time(DISPATCH_TIME_NOW, 0); - [self updateAndResumeSaveTimer]; - } - } -} - -- (void)flush { - // This method is invoked by AWSDDLog's flushLog method. - // - // It is called automatically when the application quits, - // or if the developer invokes AWSDDLog's flushLog method prior to crashing or something. - - [self performSaveAndSuspendSaveTimer]; -} - -@end diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAssertMacros.h b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAssertMacros.h deleted file mode 100644 index e38cd75..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDAssertMacros.h +++ /dev/null @@ -1,26 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -/** - * NSAsset replacement that will output a log message even when assertions are disabled. - **/ -#define AWSDDAssert(condition, frmt, ...) \ - if (!(condition)) { \ - NSString *description = [NSString stringWithFormat:frmt, ## __VA_ARGS__]; \ - AWSDDLogError(@"%@", description); \ - NSAssert(NO, description); \ - } -#define AWSDDAssertCondition(condition) AWSDDAssert(condition, @"Condition not satisfied: %s", #condition) - diff --git a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDFileLogger.h b/demo/Pods/AWSCore/AWSCore/Logging/AWSDDFileLogger.h deleted file mode 100644 index d172756..0000000 --- a/demo/Pods/AWSCore/AWSCore/Logging/AWSDDFileLogger.h +++ /dev/null @@ -1,512 +0,0 @@ -// Software License Agreement (BSD License) -// -// Copyright (c) 2010-2016, Deusty, LLC -// All rights reserved. -// -// Redistribution and use of this software in source and binary forms, -// with or without modification, are permitted provided that the following conditions are met: -// -// * Redistributions of source code must retain the above copyright notice, -// this list of conditions and the following disclaimer. -// -// * Neither the name of Deusty nor the names of its contributors may be used -// to endorse or promote products derived from this software without specific -// prior written permission of Deusty, LLC. - -// Disable legacy macros -#ifndef AWSDD_LEGACY_MACROS - #define AWSDD_LEGACY_MACROS 0 -#endif - -#import "AWSDDLog.h" - -@class AWSDDLogFileInfo; - -/** - * This class provides a logger to write log statements to a file. - **/ - - -// Default configuration and safety/sanity values. -// -// maximumFileSize -> kAWSDDDefaultLogMaxFileSize -// rollingFrequency -> kAWSDDDefaultLogRollingFrequency -// maximumNumberOfLogFiles -> kAWSDDDefaultLogMaxNumLogFiles -// logFilesDiskQuota -> kAWSDDDefaultLogFilesDiskQuota -// -// You should carefully consider the proper configuration values for your application. - -extern unsigned long long const kAWSDDDefaultLogMaxFileSize; -extern NSTimeInterval const kAWSDDDefaultLogRollingFrequency; -extern NSUInteger const kAWSDDDefaultLogMaxNumLogFiles; -extern unsigned long long const kAWSDDDefaultLogFilesDiskQuota; - - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * The LogFileManager protocol is designed to allow you to control all aspects of your log files. - * - * The primary purpose of this is to allow you to do something with the log files after they have been rolled. - * Perhaps you want to compress them to save disk space. - * Perhaps you want to upload them to an FTP server. - * Perhaps you want to run some analytics on the file. - * - * A default LogFileManager is, of course, provided. - * The default LogFileManager simply deletes old log files according to the maximumNumberOfLogFiles property. - * - * This protocol provides various methods to fetch the list of log files. - * - * There are two variants: sorted and unsorted. - * If sorting is not necessary, the unsorted variant is obviously faster. - * The sorted variant will return an array sorted by when the log files were created, - * with the most recently created log file at index 0, and the oldest log file at the end of the array. - * - * You can fetch only the log file paths (full path including name), log file names (name only), - * or an array of `AWSDDLogFileInfo` objects. - * The `AWSDDLogFileInfo` class is documented below, and provides a handy wrapper that - * gives you easy access to various file attributes such as the creation date or the file size. - */ -@protocol AWSDDLogFileManager -@required - -// Public properties - -/** - * The maximum number of archived log files to keep on disk. - * For example, if this property is set to 3, - * then the LogFileManager will only keep 3 archived log files (plus the current active log file) on disk. - * Once the active log file is rolled/archived, then the oldest of the existing 3 rolled/archived log files is deleted. - * - * You may optionally disable this option by setting it to zero. - **/ -@property (readwrite, assign, atomic) NSUInteger maximumNumberOfLogFiles; - -/** - * The maximum space that logs can take. On rolling logfile all old logfiles that exceed logFilesDiskQuota will - * be deleted. - * - * You may optionally disable this option by setting it to zero. - **/ -@property (readwrite, assign, atomic) unsigned long long logFilesDiskQuota; - -// Public methods - -/** - * Returns the logs directory (path) - */ -@property (nonatomic, readonly, copy) NSString *logsDirectory; - -/** - * Returns an array of `NSString` objects, - * each of which is the filePath to an existing log file on disk. - **/ -@property (nonatomic, readonly, strong) NSArray *unsortedLogFilePaths; - -/** - * Returns an array of `NSString` objects, - * each of which is the fileName of an existing log file on disk. - **/ -@property (nonatomic, readonly, strong) NSArray *unsortedLogFileNames; - -/** - * Returns an array of `AWSDDLogFileInfo` objects, - * each representing an existing log file on disk, - * and containing important information about the log file such as it's modification date and size. - **/ -@property (nonatomic, readonly, strong) NSArray *unsortedLogFileInfos; - -/** - * Just like the `unsortedLogFilePaths` method, but sorts the array. - * The items in the array are sorted by creation date. - * The first item in the array will be the most recently created log file. - **/ -@property (nonatomic, readonly, strong) NSArray *sortedLogFilePaths; - -/** - * Just like the `unsortedLogFileNames` method, but sorts the array. - * The items in the array are sorted by creation date. - * The first item in the array will be the most recently created log file. - **/ -@property (nonatomic, readonly, strong) NSArray *sortedLogFileNames; - -/** - * Just like the `unsortedLogFileInfos` method, but sorts the array. - * The items in the array are sorted by creation date. - * The first item in the array will be the most recently created log file. - **/ -@property (nonatomic, readonly, strong) NSArray *sortedLogFileInfos; - -// Private methods (only to be used by AWSDDFileLogger) - -/** - * Generates a new unique log file path, and creates the corresponding log file. - **/ -- (NSString *)createNewLogFile; - -@optional - -// Notifications from AWSDDFileLogger - -/** - * Called when a log file was archieved - */ -- (void)didArchiveLogFile:(NSString *)logFilePath NS_SWIFT_NAME(didArchiveLogFile(atPath:)); - -/** - * Called when the roll action was executed and the log was archieved - */ -- (void)didRollAndArchiveLogFile:(NSString *)logFilePath NS_SWIFT_NAME(didRollAndArchiveLogFile(atPath:)); - -@end - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// -#pragma mark - -//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - -/** - * Default log file manager. - * - * All log files are placed inside the logsDirectory. - * If a specific logsDirectory isn't specified, the default directory is used. - * On Mac, this is in `~/Library/Logs/`. - * On iPhone, this is in `~/Library/Caches/Logs`. - * - * Log files are named `"