async def auth(self):
credentials = await self.atv.airplay.generate_credentials()<EOL>await self.atv.airplay.load_credentials(credentials)<EOL>try:<EOL><INDENT>await self.atv.airplay.start_authentication()<EOL>pin = await _read_input(self.loop, '<STR_LIT>')<EOL>await self.atv.airplay.finish_authentication(pin)<EOL>print('<STR_LIT>')<EOL>print(credentials)<EOL>return <NUM_LIT:0><EOL><DEDENT>except exceptions.DeviceAuthenticationError:<EOL><INDENT>logging.exception('<STR_LIT>')<EOL>return <NUM_LIT:1><EOL><DEDENT>
Perform AirPlay device authentication.