@@ -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
0 commit comments