This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"index": 0, | |
"name": "Aurelia Gonzales", | |
"isActive": false, | |
"registered": "2015-02-11T04:22:39+0000", | |
"age": 20, | |
"gender": "female", | |
"eyeColor": "green", | |
"favoriteFruit": "banana", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ProfileImageLabelTVCell: UITableViewCell { | |
let cellTextLabel : UILabel = { | |
let label = UILabel() | |
label.text = "Name" | |
return label | |
}() | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(userExists){ | |
// SIGNIN THE USER | |
guard let usernameValue = loginDetails["userName"] as? String else{ return } | |
let authDetails = AWSCognitoIdentityPasswordAuthenticationDetails(username: usernameValue, password: passwordValue) | |
self.passwordAuthenticationCompletion?.set(result: authDetails) | |
self.user = self.pool?.currentUser() | |
self.pool?.currentUser()?.getSession(usernameValue, password: passwordValue, validationData: nil).continueOnSuccessWith(executor: AWSExecutor.mainThread(), block: { (task) -> Any? in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Using iOS SDK AWSCognitoIdentityProvider 2.6.7 | |
let mySession = self.pool.currentUser()?.getSession() | |
guard let accessToken = mySession?.result?.accessToken?.tokenString as? String else { | |
print("Unable to obtain access token") | |
self.handleSignOut() // Signing out the user if there is no access token | |
return | |
} |