def __init__(self, params_dict):
        super().__init__()

        self.client_id = model_helper.read_obligatory(params_dict, 'client_id',
                                                      ' for Google OAuth')

        secret_value = model_helper.read_obligatory(params_dict, 'secret',
                                                    ' for Google OAuth')
        self.secret = model_helper.unwrap_conf_value(secret_value)

        self.states = {}

        self._client_visible_config['client_id'] = self.client_id
        self._client_visible_config[
            'oauth_url'] = tornado.auth.GoogleOAuth2Mixin._OAUTH_AUTHORIZE_URL
        self._client_visible_config['oauth_scope'] = 'email'
Beispiel #2
0
    def read_password(params_dict):
        password = params_dict.get('password')
        password = model_helper.unwrap_conf_value(password)

        return password