Skip to content

Commit

Permalink
Use SESSION_COOKIE_NAME in SessionScheme.
Browse files Browse the repository at this point in the history
  • Loading branch information
ngnpope committed Sep 14, 2021
1 parent e6fce04 commit db841ab
Show file tree
Hide file tree
Showing 20 changed files with 21 additions and 20 deletions.
3 changes: 2 additions & 1 deletion drf_spectacular/authentication.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from django.conf import settings
from django.utils.translation import gettext_lazy as _

from drf_spectacular.extensions import OpenApiAuthenticationExtension
Expand All @@ -12,7 +13,7 @@ def get_security_definition(self, auto_schema):
return {
'type': 'apiKey',
'in': 'cookie',
'name': 'Session',
'name': settings.SESSION_COOKIE_NAME,
}


Expand Down
2 changes: 1 addition & 1 deletion tests/contrib/test_django_filters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/contrib/test_djangorestframework_camel_case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/contrib/test_rest_auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -504,4 +504,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/contrib/test_rest_auth_token.yml
Original file line number Diff line number Diff line change
Expand Up @@ -582,4 +582,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/contrib/test_rest_polymorphic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -268,4 +268,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_extend_schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -424,4 +424,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_extend_schema_view.yml
Original file line number Diff line number Diff line change
Expand Up @@ -261,4 +261,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_fields.yml
Original file line number Diff line number Diff line change
Expand Up @@ -372,4 +372,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_i18n.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_polymorphic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_postprocessing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_recursion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_split_request_false.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,4 +113,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_split_request_true.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_versioning_accept_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_versioning_accept_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_versioning_v1.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid
2 changes: 1 addition & 1 deletion tests/test_versioning_v2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,4 +63,4 @@ components:
cookieAuth:
type: apiKey
in: cookie
name: Session
name: sessionid

0 comments on commit db841ab

Please sign in to comment.