Skip to content

Commit 232ebd8

Browse files
committed
Updated doc
1 parent ff7b32d commit 232ebd8

File tree

3 files changed

+22
-18
lines changed

3 files changed

+22
-18
lines changed

doc/conf.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
master_doc = 'index'
4747

4848
# General information about the project.
49-
project = 'idpyoidc'
49+
project = 'IdPyOIDC'
5050
copyright = '2017, Roland Hedberg'
5151
author = 'Roland Hedberg'
5252

@@ -127,7 +127,7 @@
127127
# (source start file, target name, title,
128128
# author, documentclass [howto, manual, or own class]).
129129
latex_documents = [
130-
(master_doc, 'idpyoidc.tex', 'idpyoidc Documentation',
130+
(master_doc, 'idpyoidc.tex', 'IdPyOIDC Documentation',
131131
'Roland Hedberg', 'manual'),
132132
]
133133

@@ -137,7 +137,7 @@
137137
# One entry per manual page. List of tuples
138138
# (source start file, name, description, authors, manual section).
139139
man_pages = [
140-
(master_doc, 'idpyoidc', 'idpyoidc Documentation',
140+
(master_doc, 'idpyoidc', 'IdPyOIDC Documentation',
141141
[author], 1)
142142
]
143143

@@ -148,7 +148,7 @@
148148
# (source start file, target name, title, author,
149149
# dir menu entry, description, category)
150150
texinfo_documents = [
151-
(master_doc, 'idpyoidc', 'idpyoidc Documentation',
151+
(master_doc, 'idpyoidc', 'IdPyOIDC Documentation',
152152
author, 'idpyoidc', 'One line description of project.',
153153
'Miscellaneous'),
154154
]

doc/intro.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ Introduction to IdPy-OIDC
55
*************************
66

77
This package will try to implement all things OAuth2 and OIDC.
8-
Not just the basic standards but also as soon as we can all extensions.
8+
Not just the basic standards but also as soon as we can the
9+
extensions that appear on the horizon.
910

1011
IdpyOIDC implements the following standards:
1112

doc/message/intro.rst

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ Introduction to message
55
***********************
66

77
The OpenID Connect and OAuth2 standards both defines lots of messages.
8-
Requests that are sent from clients to servers and responses from servers
9-
to clients.
8+
Requests that are sent from clients to servers and responses returned from
9+
servers to clients.
1010

1111
For each of these messages a number of parameters (claims) are listed, some
1212
of them required and some optional. Each parameter are also assigned a data type.
@@ -23,6 +23,7 @@ Using this class you should be able to:
2323
- verify that a message's parameters are correct, that all that are marked as required are present and all (required and optional) are of the right type
2424
- serialize the message into the correct on-the-wire representation
2525
- deserialize a received message from the on-the-wire representation into a :py:class:`idpyoidc.message.Message` instance.
26+
- gracefully handle extra claims.
2627

2728
I will try to walk you through these steps below using example from RFC6749 (section
2829
4.1 and 4.2).
@@ -38,7 +39,7 @@ Entity sending a message
3839
------------------------
3940

4041
Going from a set of attributes with values how would you go about creating an
41-
authorization request ? You would do something like this::
42+
authorization request ? You could do something like this::
4243

4344
from idpyoidc.message.oauth2 import AuthorizationRequest
4445

@@ -90,8 +91,8 @@ The pattern is:
9091

9192
Now, I have given examples on how a client would construct a request but of course
9293
there is not difference between this and a server constructing a response.
93-
The set of parameters is different and the message sub class to be used is
94-
different but the process is the same.
94+
The set of parameters might differ and the message sub class to be used is
95+
definitely different but the process is the same.
9596

9697
Entity receiving a message
9798
--------------------------
@@ -110,7 +111,7 @@ On the client it would get hold of the query part and then go from there::
110111

111112
from idpyoidc.message.oauth2 import AuthorizationResponse
112113

113-
query_conponent = 'code=SplxlOBeZQQYbYS6WxSbIA&state=xyz'
114+
query_component = 'code=SplxlOBeZQQYbYS6WxSbIA&state=xyz'
114115

115116
response = AuthorizationResponse().from_urlencoded(query_conponent)
116117

@@ -127,9 +128,9 @@ Similar when it comes to the response from the token endpoint::
127128
from idpyoidc.message.oauth2 import AccessTokenResponse
128129

129130
http_response_body = '{"access_token":"2YotnFZFEjr1zCsicMWpAA",' \
130-
'"token_type":"example","expires_in":3600,' \
131-
'"refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA",' \
132-
'"example_parameter":"example_value"}'
131+
'"token_type":"example","expires_in":3600,' \
132+
'"refresh_token":"tGzv3JOkF0XG5Qx2TlKWIA",' \
133+
'"example_parameter":"example_value"}'
133134

134135
response = AccessTokenResponse().from_json(http_response_body)
135136

@@ -145,15 +146,15 @@ The processing pattern on the receiving end is:
145146

146147
1. Pick out the protocol message part of the response
147148
2. Initiate the correct message subclass and run the appropriate
148-
deserializer method.
149+
deserializer method.
149150
3. Verify the correctness of the response
150151

151152

152153
What if the response received was an error message ?
153154
----------------------------------------------------
154155

155156
All the response subclasses are subclasses of
156-
:py:class:`idpyoidc.oauth2.ResponseMessage` and that class provides you with one
157+
:py:class:`idpyoidc.message.oauth2.ResponseMessage` and that class provides you with one
157158
method that is useful in this case::
158159

159160
>>> from idpyoidc.message.oauth2 import AccessTokenResponse
@@ -174,7 +175,7 @@ Serialization methods
174175
JavaScript Object Notation is a lightweight data-interchange format
175176
(https://www.json.org/)
176177
jwt
177-
Json Web Token specified in RFC 7519
178+
Json Web Token specified in `RFC7519`__
178179

179180
There is a forth but that is just for internal use and that is to/from
180181
a python dictionary.
@@ -303,4 +304,6 @@ Let's assume that Eve wanted to listen in and had access to the key::
303304
raise NotForMe('Not among intended audience')
304305
idpyoidc.exception.NotForMe: Not among intended audience
305306

306-
Now Eve probably wouldn't care but there you are.
307+
Now Eve probably wouldn't care but there you are.
308+
309+
__ https://www.rfc-editor.org/rfc/rfc7519.txt

0 commit comments

Comments
 (0)