iOSKit 1.0
iOS Developer Convenience Toolkit
Public Member Functions | Static Public Member Functions
IOSKitAccount Class Reference

#import </Users/Matthew/iOSDev/iOSKit/Framework/trunk/iOSKit/AccountManagement/Account.h>

List of all members.

Public Member Functions

(id) - initWithEmailUsername:andPassword:andKeyCode:
(NSString *) - emailUserNameWithAuthToken:
(BOOL) - isPassword:correctWithAuthToken:
(NSString *) - passwordWithAuthToken:andKeyCode:
(BOOL) - isKeyCode:correctWithAuthToken:
(void) - resetPasswordWithAuthToken:fromOldPassword:toNewPassword:
(void) - resetKeyCodeWithAuthToken:withPassword:toNewKeyCode:

Static Public Member Functions

(void) + deleteAccount:withAuthToken:

Detailed Description

Provides a way to store a user account for use with iOSKit AccountManagent component


Member Function Documentation

+ (void) deleteAccount: (IOSKitAccount *)  acc
withAuthToken: (NSString *)  authToken 

Delets a passed account from the store and keychain

Parameters:
accThe account that is to be deleterd
authTokenA valid authToken
- (NSString *) emailUserNameWithAuthToken: (NSString *)  authToken

Gets the username when you have a valid authToken

Parameters:
authTokenA valid auth token
Returns:
The email address / user name from the account
- (id) initWithEmailUsername: (NSString *)  aEmailUsername
andPassword: (NSString *)  aPassword
andKeyCode: (NSString *)  aKeyCode 

Creates an IOSKitAccount with the specified details

Parameters:
aEmailUsernameThe username to store (possibly an email address)
aPasswordThe password to save for the user
aKeyCodeThe key code to store the username and password under for easy access
Returns:
An Instantiated IOSKitAccount object with relavent data set
- (BOOL) isKeyCode: (NSString *)  enteredKeyCode
correctWithAuthToken: (NSString *)  authToken 

Check to see if the entered key code is correct, only returning an answer if a valid authToken is presented

Parameters:
authTokenA valid auth token
enteredKeyCodeThe entered key code that is to be checked
Returns:
The boolean answer on checking the entered key code against the stored key code
- (BOOL) isPassword: (NSString *)  enteredPassword
correctWithAuthToken: (NSString *)  authToken 

Checks to see if the entered password is correct, only returning an answer if a valid authToken is presented

Parameters:
enteredPassword
authTokenA valid auth token
Returns:
The boolean answer on checking the entered password against the stored password
- (NSString *) passwordWithAuthToken: (NSString *)  authToken
andKeyCode: (NSString *)  keyCode 

Returns the stored password when both a valid authToken is presented and the correct keyCode is presented

Parameters:
authTokenA valid auth token
keyCodeThe correct keyCode
Returns:
The stored password
- (void) resetKeyCodeWithAuthToken: (NSString *)  authToken
withPassword: (NSString *)  password
toNewKeyCode: (NSString *)  newKC 

Resets the accounts key code to a new one if the password is known

Parameters:
authTokenA valid auth token
passwordThe account password
newKCThe new key code that is to be stored
- (void) resetPasswordWithAuthToken: (NSString *)  authToken
fromOldPassword: (NSString *)  oldP
toNewPassword: (NSString *)  newP 

Resets the accounts password to a new one if the old one is known

Parameters:
authTokenA valid auth token
oldPThe old password that is to be reset
newPThe new password that is to be stored