Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9e34105
commit 4c85c49
Showing
10 changed files
with
131 additions
and
64 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
from oauth2_provider import views | ||
|
||
|
||
class AuthorizationView(views.AuthorizationView): | ||
... | ||
|
||
|
||
class TokenView(views.TokenView): | ||
... | ||
|
||
|
||
class RevokeTokenView(views.RevokeTokenView): | ||
... | ||
|
||
|
||
class IntrospectTokenView(views.IntrospectTokenView): | ||
... | ||
|
||
|
||
class AuthorizedTokenDeleteView(views.AuthorizedTokenDeleteView): | ||
... | ||
|
||
|
||
class AuthorizedTokensListView(views.AuthorizedTokensListView): | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from oauth2_provider import views | ||
from rest_framework.schemas import AutoSchema | ||
from rest_framework.views import APIView | ||
from django.utils.decorators import method_decorator | ||
from drf_yasg.utils import swagger_auto_schema | ||
|
||
|
||
class AuthorizationView(views.AuthorizationView): | ||
... | ||
|
||
|
||
@method_decorator(name="post", decorator=swagger_auto_schema(tags=["tokens"])) | ||
class TokenView(APIView, views.TokenView): | ||
... | ||
|
||
|
||
@method_decorator(name="post", decorator=swagger_auto_schema(tags=["tokens"])) | ||
class RevokeTokenView(APIView, views.RevokeTokenView): | ||
... | ||
|
||
|
||
@method_decorator(name="get", decorator=swagger_auto_schema(tags=["tokens"])) | ||
@method_decorator(name="post", decorator=swagger_auto_schema(tags=["tokens"])) | ||
class IntrospectTokenView(APIView, views.IntrospectTokenView): | ||
... | ||
|
||
|
||
@method_decorator(name="delete", decorator=swagger_auto_schema(tags=["tokens"])) | ||
class AuthorizedTokenDeleteView(APIView, views.AuthorizedTokenDeleteView): | ||
... | ||
|
||
|
||
@method_decorator(name="get", decorator=swagger_auto_schema(tags=["tokens"])) | ||
class AuthorizedTokensListView(APIView, views.AuthorizedTokensListView): | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
[ | ||
{ | ||
"model": "oauth2_provider.application", | ||
"pk": 1, | ||
"fields": { | ||
"client_id": "CLIENT_ID", | ||
"user": null, | ||
"redirect_uris": "http://localhost:8000/static/drf-yasg/swagger-ui-dist/oauth2-redirect.html", | ||
"client_type": "confidential", | ||
"authorization_grant_type": "authorization-code", | ||
"client_secret": "CLIENT_SECRET", | ||
"name": "aseb.bo", | ||
"skip_authorization": true, | ||
"created": "2021-09-12T02:14:57.377Z", | ||
"updated": "2021-09-12T02:19:14.020Z", | ||
"algorithm": "" | ||
} | ||
} | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters