Пример #1
0
    def get(self, request):
        state = b64encode(anyjson.serialize({
            'token': generate_token(settings.SECRET_KEY, request.user.pk),
        }))
        authorize_url = FLOW.step1_get_authorize_url(state=state)

        return HttpResponseRedirect(authorize_url)
Пример #2
0
    def get(self, request):
        state = b64encode(
            anyjson.serialize({
                'token':
                generate_token(settings.SECRET_KEY, request.user.pk),
            }))
        authorize_url = FLOW.step1_get_authorize_url(state=state)

        return HttpResponseRedirect(authorize_url)
Пример #3
0
    def get(self, request):
        public = request.GET.get('public', 0)
        only_new = request.GET.get('only_new', 0)

        state = b64encode(anyjson.serialize({
            'token': generate_token(settings.SECRET_KEY, request.user.pk),
            'public': public,
            'only_new': only_new,
        }))

        authorize_url = FLOW.step1_get_authorize_url(state=state)

        return HttpResponseRedirect(authorize_url)
Пример #4
0
    def get(self, request):
        public = request.GET.get('public', 0)
        only_new = request.GET.get('only_new', 0)

        state = b64encode(
            anyjson.serialize({
                'token':
                generate_token(settings.SECRET_KEY, request.user.pk),
                'public':
                public,
                'only_new':
                only_new,
            }))

        authorize_url = FLOW.step1_get_authorize_url(state=state)

        return HttpResponseRedirect(authorize_url)
Пример #5
0
    def get(self, request):
        FLOW.params['state'] = generate_token(settings.SECRET_KEY, request.user.pk)
        authorize_url = FLOW.step1_get_authorize_url()

        return HttpResponseRedirect(authorize_url)
Пример #6
0
    def get(self, request):
        FLOW.params['state'] = generate_token(settings.SECRET_KEY,
                                              request.user.pk)
        authorize_url = FLOW.step1_get_authorize_url()

        return HttpResponseRedirect(authorize_url)