def login(self):
log.debug('<STR_LIT>')<EOL>login_data = {<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': self.refresh_token,<EOL>}<EOL>response = self._request('<STR_LIT>', self.oauth_path, data=login_data)<EOL>raw_token = response.json()<EOL>auth_token = "<STR_LIT>" % raw_token['<STR_LIT>']<EOL>self.s.headers['<STR_LIT>'] = auth_token<EOL>log.debug('<STR_LIT>' % raw_token['<STR_LIT>'])<EOL>self.auth_expires_at = time.time() + int(raw_token['<STR_LIT>']) - <NUM_LIT><EOL>
Gets and stores an OAUTH token from Rightscale.