Two-Step Authentication for iCloud
Two Step verification
Apple introduced new security features to iCloud, including Two-Step Authentication and App-specific passwords. App-Specific passwords are generated per app and and can be used instead of your Apple-ID credentials. This guide will help you to set them up for our apps. (see also: http://support.apple.com/kb/HT6186)
Important: Starting on October 1, 2014, app-specific passwords will be mandatory to login at iCloud using third party apps. For reference, have a look at this official page:
Update: Apparently Apple is finally going to enforce this as of June 15, 2017
Enable the app-specific password
Note: The following instructions are only necessary if you have Two-Step Authentication enabled for your account.
Revoke an app specific password
Note: The following is quoted from the site mentioned above
You can have up to 25 active app-specific passwords at any given time. If you need to, you can revoke passwords individually or all at once.
To revoke app-specific passwords:
Go to My Apple ID. Select Manage your Apple ID and sign in. Select Password and Security. Select View History. Select Revoke next to a password, or select Revoke All.
After you revoke a password, the app using that password will be signed out of iCloud until you generate a new password and sign in again.
Any time you change or reset your primary Apple ID password, all of your app-specific passwords will be revoked automatically to protect the security of your account. You'll need to generate new app-specific passwords for any third party apps you would like to continue using with iCloud.