-"""
-Transitional code: bridge between Piston's OAuth implementation
-and DRF views.
-"""
-from piston.authentication import OAuthAuthentication
-from rest_framework.authentication import BaseAuthentication
+# This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
+# Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
+#
+from oauthlib.oauth1 import ResourceEndpoint
+from rest_framework.authentication import BaseAuthentication, TokenAuthentication
+from .request_validator import PistonRequestValidator
+from .utils import oauthlib_request
+from .models import Token