def _openid_init(self, provider='openid', identity=None):
        identity_url = identity or self.request.get('identity_url', None)
        callback_url = self._callback_uri_for(provider)

        if identity_url and callback_url:
            target_url = users.create_login_url(
              dest_url=callback_url,
              federated_identity=identity_url
            )
            logging.debug('Redirecting user to %s' % target_url)
            self.redirect(target_url)

        else:
            logging.error('Either identity or callback were not specified (%s, %s)' % (identity_url, callback_url))
            self._provider_not_supported(provider)
Initiates OpenID dance using App Engine users module API.
dataset/ETHPy150Open ibagrak/algae/gae/libs/simpleauth/handler.py/SimpleAuthHandler._openid_init