This guide assumes using Raspbian release 2014-12-24.
If you have not yet installed wpa_supplicant, install it by running the following command.
sudo apt-get install wpasupplicant
Add the following lines to the end of /etc/wpa_supplicant/wpa_supplicant.conf.
Restart your wireless network interface by running the following commands.
sudo ifdown wlan0
sudo ifup wlan0