'Finish OAuth callback request.'

@callback
def get(self, request):

    from aiohttp import web
    hass = request.app['hass']
    data = request.GET
    response_message = 'Wink    has    been    successfully    authorized!\n                                    You    can    close    this    window    now!    For    the    best    results    you    should    reboot\n                                    HomeAssistant'
    html_response = '<html><head><title>Wink    Auth</title></head>\n                                                                <body><h1>{}</h1></body></html>'
    if (data.get('code') is not None):
        response = self.request_token(data.get('code'), self.config_file['client_secret'])
        config_contents = {ATTR_ACCESS_TOKEN: response['access_token'], ATTR_REFRESH_TOKEN: response['refresh_token'], ATTR_CLIENT_ID: self.config_file['client_id'], ATTR_CLIENT_SECRET: self.config_file['client_secret']}
        _write_config_file(hass.config.path(WINK_CONFIG_FILE), config_contents)
        hass.async_add_job(setup, hass, self.config)
        return web.Response(text=html_response.format(response_message), content_type='text/html')
    error_msg = 'No    code    returned    from    Wink    API'
    _LOGGER.error(error_msg)
    return web.Response(text=html_response.format(error_msg), content_type='text/html')
