Esempio n. 1
0
    def test_revoke(self):
        user_id = '1'
        access_token = AccessToken(self.access_token_store, user_id=user_id)
        access_token.save()

        assert access_token.revoke()

        failed_user_id = self.access_token_store.get_session(
            access_token.access_token, 'user_id')

        assert failed_user_id is None
Esempio n. 2
0
    def post(self):
        refresh_token = self.get_argument("refresh_token")
        access_token = AccessToken(self.application.access_token_store).refresh(refresh_token)
        access_token.revoke()

        self.write('')