Skip to content

Commit e92f5d9

Browse files
committed
Merge branch 'master' of github.com:namespace-ee/django-rest-framework-sso
2 parents 29e30e0 + b800c09 commit e92f5d9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

README.rst

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ the ObtainAuthorizationTokenView and AuthorizationTokenSerializer::
4848
serializer_class = AuthorizationTokenSerializer
4949

5050

51-
class AuthorizationTokenSerializer(QuerySetReadableMixin, serializers.Serializer):
51+
class AuthorizationTokenSerializer(serializers.Serializer):
5252
account = serializers.HyperlinkedRelatedField(
5353
queryset=Account.objects.all(),
5454
required=True,
@@ -151,22 +151,22 @@ Example settings for project that both issues and validates tokens for `myapp` a
151151
'AUTHORIZATION_AUDIENCE': ['myapp', 'otherapp'],
152152
'ACCEPTED_ISSUERS': ['myapp'],
153153
'PUBLIC_KEYS': {
154-
'myapp': 'keys/myapp_public_key.pem',
154+
'myapp': 'keys/myapp-20180101.pem', # both private/public key in same file
155155
},
156156
'PRIVATE_KEYS': {
157-
'myapp': 'keys/myapp_private_key.pem',
157+
'myapp': 'keys/myapp-20180101.pem', # both private/public key in same file
158158
},
159159
}
160160
161-
Example settings for project that only accepts tokens signed by `myapp` for `otherapp`::
161+
Example settings for project that only accepts tokens signed by `myapp` public key for `otherapp`::
162162

163163
REST_FRAMEWORK_SSO = {
164164
'AUTHENTICATE_PAYLOAD': 'otherapp.authentication.authenticate_payload',
165165
'VERIFY_SESSION_TOKEN': False,
166166
'IDENTITY': 'otherapp',
167167
'ACCEPTED_ISSUERS': ['myapp'],
168168
'PUBLIC_KEYS': {
169-
'myapp': 'keys/myapp_public_key.pem',
169+
'myapp': 'keys/myapp-20180101.pem', # only public key in this file
170170
},
171171
}
172172

@@ -205,4 +205,5 @@ You can use openssl to generate your public/private key pairs::
205205

206206
$ openssl genpkey -algorithm RSA -out private_key.pem -pkeyopt rsa_keygen_bits:2048
207207
$ openssl rsa -pubout -in private_key.pem -out public_key.pem
208+
$ cat private_key.pem public_key.pem > keys/myapp-20180101.pem
208209

requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Django>=1.8
22
djangorestframework>=3.2,<4.0
33
PyJWT>=1.4.0,<2.0.0
4-
cryptography>=2.0,<3.0
4+
cryptography>=2.1.0,<4.0

0 commit comments

Comments
 (0)