AWSCognitoIdentityUser Class Reference
Inherits from | NSObject |
---|---|
Declared in | AWSCognitoIdentityUser.h AWSCognitoIdentityUser.m |
Other Methods
– confirmSignUp:
Confirm a users' sign up with the confirmation code
- (AWSTask<AWSCognitoIdentityUserConfirmSignUpResponse*> *)confirmSignUp:(NSString *)confirmationCode
Declared In
AWSCognitoIdentityUser.h
– confirmSignUp:forceAliasCreation:
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<AWSCognitoIdentityUserConfirmSignUpResponse*> *)confirmSignUp:(NSString *)confirmationCode forceAliasCreation:(BOOL)forceAliasCreation
Declared In
AWSCognitoIdentityUser.h
– forgotPassword
Send a code to this user to initiate the forgot password flow
- (AWSTask<AWSCognitoIdentityUserForgotPasswordResponse*> *)forgotPassword
Declared In
AWSCognitoIdentityUser.h
– confirmForgotPassword:password:
Conclude the forgot password flow by providing the forgot password code and new password.
- (AWSTask<AWSCognitoIdentityUserConfirmForgotPasswordResponse*> *)confirmForgotPassword:(NSString *)confirmationCode password:(NSString *)password
Declared In
AWSCognitoIdentityUser.h
– resendConfirmationCode
Resend the confirmation code sent during sign up
- (AWSTask<AWSCognitoIdentityUserResendConfirmationCodeResponse*> *)resendConfirmationCode
Declared In
AWSCognitoIdentityUser.h
– changePassword:proposedPassword:
Change this user’s password
- (AWSTask<AWSCognitoIdentityUserChangePasswordResponse*> *)changePassword:(NSString *)currentPassword proposedPassword:(NSString *)proposedPassword
Declared In
AWSCognitoIdentityUser.h
– getDetails
Get details about this user, including user attributes
- (AWSTask<AWSCognitoIdentityUserGetDetailsResponse*> *)getDetails
Declared In
AWSCognitoIdentityUser.h
– getSession
Get a session
- (AWSTask<AWSCognitoIdentityUserSession*> *)getSession
Declared In
AWSCognitoIdentityUser.m
– getSession:password:validationData:isInitialCustomChallenge:
Check to see if refreshToken is received in the response. If not, load it from the keychain.
- (AWSTask<AWSCognitoIdentityUserSession*> *)getSession:(NSString *)username password:(NSString *)password validationData:(NSArray<AWSCognitoIdentityUserAttributeType*> *)validationData isInitialCustomChallenge:(BOOL)isInitialCustomChallenge
Declared In
AWSCognitoIdentityUser.m
– getSession:password:validationData:
Explicitly get a session without using any cached tokens/refresh tokens.
- (AWSTask<AWSCognitoIdentityUserSession*> *)getSession:(NSString *)username password:(NSString *)password validationData:(NSArray<AWSCognitoIdentityUserAttributeType*> *)validationData
Declared In
AWSCognitoIdentityUser.m
– confirmDeviceInternal:
Generates a device password, calls service to exchange the password verifier and prompts user to remember the device as required.
- (AWSTask *)confirmDeviceInternal:(AWSCognitoIdentityProviderAuthenticationResultType *)authResult
Declared In
AWSCognitoIdentityUser.m
– interactiveAuth
Kick off interactive auth to prompt developer to challenge end user for credentials
- (AWSTask<AWSCognitoIdentityUserSession*> *)interactiveAuth
Declared In
AWSCognitoIdentityUser.m
– passwordAuthInternal:lastChallenge:isInitialCustomChallenge:
Prompt developer to obtain username/password and do SRP auth
- (AWSTask<AWSCognitoIdentityUserSession*> *)passwordAuthInternal:(id<AWSCognitoIdentityPasswordAuthentication>)authenticationDelegate lastChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse *)lastChallenge isInitialCustomChallenge:(BOOL)isInitialCustomChallenge
Declared In
AWSCognitoIdentityUser.m
– migrationAuth:password:validationData:lastChallenge:
Pass username and password in plaintext so developer can validate login and migrate as appropriate.
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)migrationAuth:(NSString *)username password:(NSString *)password validationData:(NSArray<AWSCognitoIdentityUserAttributeType*> *)validationData lastChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse *)lastChallenge
Declared In
AWSCognitoIdentityUser.m
– customAuthInternal:
Prompt developer to obtain custom challenge details
- (AWSTask<AWSCognitoIdentityUserSession*> *)customAuthInternal:(id<AWSCognitoIdentityCustomAuthentication>)authenticationDelegate
Declared In
AWSCognitoIdentityUser.m
– performInitiateCustomAuthChallenge:
Run initiate auth on challenge responses from end user for custom auth
- (AWSTask<AWSCognitoIdentityProviderInitiateAuthResponse*> *)performInitiateCustomAuthChallenge:(AWSCognitoIdentityCustomChallengeDetails *)challengeDetails
Declared In
AWSCognitoIdentityUser.m
– performRespondCustomAuthChallenge:session:
Run respond to auth challenges on challenge responses from end user for custom auth
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)performRespondCustomAuthChallenge:(AWSCognitoIdentityCustomChallengeDetails *)challengeDetails session:(NSString *)session
Declared In
AWSCognitoIdentityUser.m
– performRespondToNewPasswordChallenge:session:
Run respond to auth challenges on new password required responses from end user
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)performRespondToNewPasswordChallenge:(AWSCognitoIdentityNewPasswordRequiredDetails *)details session:(NSString *)session
Declared In
AWSCognitoIdentityUser.m
– performRespondToSelectMfaChallenge:session:
Run respond to auth challenges on select mfa responses from end user
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)performRespondToSelectMfaChallenge:(AWSCognitoIdentitySelectMfaDetails *)details session:(NSString *)session
Declared In
AWSCognitoIdentityUser.m
– performRespondToAuthChallenge:challengeName:session:
Run respond to auth challenges
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)performRespondToAuthChallenge:(NSMutableDictionary *)challengeResponses challengeName:(AWSCognitoIdentityProviderChallengeNameType)challengeName session:(NSString *)session
Declared In
AWSCognitoIdentityUser.m
– srpAuthInternal:password:validationData:lastChallenge:isInitialCustomChallenge:
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<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)srpAuthInternal:(NSString *)username password:(NSString *)password validationData:(NSArray<AWSCognitoIdentityUserAttributeType*> *)validationData lastChallenge:(AWSCognitoIdentityProviderRespondToAuthChallengeResponse *)lastChallenge isInitialCustomChallenge:(BOOL)isInitialCustomChallenge
Declared In
AWSCognitoIdentityUser.m
– deviceAuthInternal:
Perform SRP based authentication (initiateAuth(SRP_AUTH) and respondToAuthChallenge) given a username and password
- (AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)deviceAuthInternal:(AWSTask<AWSCognitoIdentityProviderRespondToAuthChallengeResponse*> *)deviceChallengeResponse
Declared In
AWSCognitoIdentityUser.m
– addDeviceKey:
Adds a device key to the authParameters dictionary if it is known for this username
- (void)addDeviceKey:(NSMutableDictionary<NSString*,NSString*> *)authParameters
Declared In
AWSCognitoIdentityUser.m
– addSecretHashDeviceKeyAndUsername:
Adds a SECRET_HASH and USERNAME and DEVICE_KEY to the authParameters dictionary.
- (void)addSecretHashDeviceKeyAndUsername:(NSMutableDictionary<NSString*,NSString*> *)authParameters
Declared In
AWSCognitoIdentityUser.m
– mfaAuthInternal:destination:authState:challengeName:authenticationDelegate:
Invoke developer’s ui to prompt user for mfa code and call enhanceAuth
- (AWSTask<AWSCognitoIdentityUserSession*> *)mfaAuthInternal:(NSString *)deliveryMedium destination:(NSString *)destination authState:(NSString *)authState challengeName:(AWSCognitoIdentityProviderChallengeNameType)challengeName authenticationDelegate:(id<AWSCognitoIdentityMultiFactorAuthentication>)authenticationDelegate
Declared In
AWSCognitoIdentityUser.m
– updateAttributes:
Update this user’s attributes
- (AWSTask<AWSCognitoIdentityUserUpdateAttributesResponse*> *)updateAttributes:(NSArray<AWSCognitoIdentityUserAttributeType*> *)attributes
Declared In
AWSCognitoIdentityUser.m
– deleteAttributes:
Delete the attributes specified by attributeNames
- (AWSTask<AWSCognitoIdentityUserDeleteAttributesResponse*> *)deleteAttributes:(NSArray<NSString*> *)attributeNames
Declared In
AWSCognitoIdentityUser.m
– verifyAttribute:code:
Verify a user attribute upon receiving the verification code.
- (AWSTask<AWSCognitoIdentityUserVerifyAttributeResponse*> *)verifyAttribute:(NSString *)attributeName code:(NSString *)code
Declared In
AWSCognitoIdentityUser.m
– getAttributeVerificationCode:
Request a verification code to verify an attribute.
- (AWSTask<AWSCognitoIdentityUserGetAttributeVerificationCodeResponse*> *)getAttributeVerificationCode:(NSString *)attributeName
Declared In
AWSCognitoIdentityUser.m
– setUserSettings:
Set the user settings for this user such as MFA
- (AWSTask<AWSCognitoIdentityUserSetUserSettingsResponse*> *)setUserSettings:(AWSCognitoIdentityUserSettings *)settings
Declared In
AWSCognitoIdentityUser.m
– setUserMfaPreference:
Set the user settings for this user such as MFA
- (AWSTask<AWSCognitoIdentityUserSetUserSettingsResponse*> *)setUserMfaPreference:(AWSCognitoIdentityUserMfaPreferences *)settings
Declared In
AWSCognitoIdentityUser.m
– associateSoftwareToken
Start the process of associating a software token
- (AWSTask<AWSCognitoIdentityUserAssociateSoftwareTokenResponse*> *)associateSoftwareToken
Declared In
AWSCognitoIdentityUser.m
– verifySoftwareToken:friendlyDeviceName:
Complete the process of associating a software token by verifying the code and setting device friendly name
- (AWSTask<AWSCognitoIdentityUserVerifySoftwareTokenResponse*> *)verifySoftwareToken:(NSString *)userCode friendlyDeviceName:(NSString *_Nullable)friendlyDeviceName
Declared In
AWSCognitoIdentityUser.m
– signOut
Remove all sessions from the keychain for this user. Last known user remains.
- (void)signOut
Declared In
AWSCognitoIdentityUser.h
– signOutAndClearLastKnownUser
Remove all sessions from the keychain for this user and clear last known user.
- (void)signOutAndClearLastKnownUser
Declared In
AWSCognitoIdentityUser.h
– clearSession
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
Declared In
AWSCognitoIdentityUser.h
– globalSignOut
Invalidate any active sessions with the service. Last known user remains.
- (AWSTask<AWSCognitoIdentityUserGlobalSignOutResponse*> *)globalSignOut
Declared In
AWSCognitoIdentityUser.h
– listDevices:paginationToken:
List devices for this user
- (AWSTask<AWSCognitoIdentityUserListDevicesResponse*> *)listDevices:(int)limit paginationToken:(NSString *_Nullable)paginationToken
Declared In
AWSCognitoIdentityUser.h
– updateDeviceStatus:remembered:
Update device remembered status for a specific device id.
- (AWSTask<AWSCognitoIdentityUserUpdateDeviceStatusResponse*> *)updateDeviceStatus:(NSString *)deviceId remembered:(BOOL)remembered
Declared In
AWSCognitoIdentityUser.h
– updateDeviceStatus:
Convenience method to update device remembered status for this device.
- (AWSTask<AWSCognitoIdentityUserUpdateDeviceStatusResponse*> *)updateDeviceStatus:(BOOL)remembered
Declared In
AWSCognitoIdentityUser.h
– getDevice:
Get device details for a specific deviceId.
- (AWSTask<AWSCognitoIdentityUserGetDeviceResponse*> *)getDevice:(NSString *)deviceId
Declared In
AWSCognitoIdentityUser.h
– getDevice
Convenience method to get device details for this device.
- (AWSTask<AWSCognitoIdentityUserGetDeviceResponse*> *)getDevice
Declared In
AWSCognitoIdentityUser.h
– forgetDevice
Forget (stop tracking) this device.
- (AWSTask *)forgetDevice
Declared In
AWSCognitoIdentityUser.h
– forgetDevice:
Forget (stop tracking) a specific deviceId.
- (AWSTask *)forgetDevice:(NSString *)deviceId
Declared In
AWSCognitoIdentityUser.h
– keyChainKey:key:
Get a namespaced keychain key given a namespace and key
- (NSString *)keyChainKey:(NSString *)namespace key:(const NSString *)key
Declared In
AWSCognitoIdentityUser.m
Other Methods
username
The username of this user
@property (nonatomic, readonly, nullable) NSString *username
Declared In
AWSCognitoIdentityUser.h
confirmedStatus
If this user is a result of a signup, this has the confirmation status
@property (nonatomic, readonly) AWSCognitoIdentityUserStatus confirmedStatus
Declared In
AWSCognitoIdentityUser.h
signedIn
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
Declared In
AWSCognitoIdentityUser.h