Skip to content
This repository was archived by the owner on Nov 3, 2021. It is now read-only.

Commit 8649822

Browse files
committed
Various spelling/grammar tweaks and typo fixes.
Usually just a word or punctuation; occasionally I rewrote a sentence if I had a hard time determining what was meant by the original. (N.B. if I misunderstood something, then my re-wording will be wrong!) Also added eol to many files that were missing it, which throws off 'cat somefile' at a shell prompt (but did not yet touch anything under src/, which also has many files without eol). I did not re-line-wrap the text I changed, so that the diffs are minimized and meaningful changes are easier to spot.
1 parent 148aa09 commit 8649822

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+102
-108
lines changed

.idea/libraries/sass_stdlib.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

TODO

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
1. Write documentations.
2-
2. Write unittests for signature related utility methods.
1+
1. Write documentation.
2+
2. Write unit tests for signature related utility methods.
33
3. Complete saml2 message class.

doc/examples/sp.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ instance, the friendly name is used as the key.
2828
Setup
2929
-----
3030

31-
I you look in the example/sp directory of the distribution you will see
31+
If you look in the example/sp directory of the distribution you will see
3232
the necessary files:
3333

3434
application.py
@@ -64,7 +64,7 @@ it line by line::
6464

6565
"service": ["sp"],
6666

67-
Tells the software what type of services the software are suppost to
67+
Tells the software what type of services the software is supposed to
6868
supply. It is used to check for the
6969
completeness of the configuration and also when constructing metadata from
7070
the configuration. More about that later. Allowed values are: "sp"
@@ -119,13 +119,13 @@ building metadata. ::
119119
#telephone_number
120120
}]
121121

122-
Another piece of information that only is matters if you build and distribute
122+
Another piece of information that only matters if you build and distribute
123123
metadata.
124124

125125
So, now to that part. In order to allow the IdP to talk to you you may have
126126
to provide the one running the IdP with a metadata file.
127127
If you have a SP configuration file similar to the one I've walked you
128-
through here, but with your information. You can make the metadata file
128+
through here, but with your information, you can make the metadata file
129129
by running the make_metadata script you can find in the tools directory.
130130

131131
Change directory to where you have the configuration file and do ::
@@ -138,7 +138,7 @@ Repoze configuration
138138
--------------------
139139

140140
I'm not going through the INI file format here. You should read
141-
`Middleware Responsibilities <http://static.repoze.org/whodocs/narr.html>`_
141+
`Middleware Responsibilities <http://docs.repoze.org/who/2.0/middleware.html>`_
142142
to get a good introduction to the concept.
143143

144144
The configuration of the pysaml2 part in the applications middleware are
@@ -178,16 +178,16 @@ Which means that the plugin is used in all phases.
178178
The application
179179
---------------
180180

181-
Is as said before extremly simple. The only thing that is connected to
182-
the PySaml2 configuration are at the bottom, namely where the server are.
181+
The app is, as said before, extremely simple. The only thing that is connected to
182+
the PySaml2 configuration is at the bottom, namely where the server is.
183183
You have to ascertain that this coincides with what is specified in the
184-
PySaml2 configuration. Apart from that there really are no thing in
184+
PySaml2 configuration. Apart from that there really is nothing in
185185
application.py that demands that you use PySaml2 as middleware. If you
186186
switched to using the LDAP or CAS plugins nothing would change in the
187187
application. In the application configuration yes! But not in the application.
188188
And that is really how it should be done.
189189

190-
There is one assumption and that is that the middleware plugin that gathers
191-
information about the user places the extra information in as value on the
190+
There is one assumption, and that is that the middleware plugin that gathers
191+
information about the user places the extra information in as a value on the
192192
"user" property in the dictionary found under the key "repoze.who.identity"
193193
in the environment.

doc/howto/config.rst

Lines changed: 31 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
Configuration of pySAML2 entities
44
=================================
55

6-
Whether you plan to run a pySAML2 Service Provider, Identity provider or an
6+
Whether you plan to run a pySAML2 Service Provider, Identity Provider or an
77
attribute authority you have to configure it. The format of the configuration
8-
file is the same disregarding which type of service you plan to run.
9-
What differs is some of the directives.
10-
Below you will find a list of all the used directives in alphabetic order.
8+
file is the same regardless of which type of service you plan to run.
9+
What differs are some of the directives.
10+
Below you will find a list of all the used directives in alphabetical order.
1111
The configuration is written as a python module which contains a named
1212
dictionary ("CONFIG") that contains the configuration directives.
1313

14-
The basic structure of the configuration file is therefor like this::
14+
The basic structure of the configuration file is therefore like this::
1515

1616
from saml2 import BINDING_HTTP_REDIRECT
1717

@@ -90,9 +90,9 @@ The attribute map module contains a MAP dictionary with three items. The
9090
The *to* and *fro* sub-dictionaries then contain the mapping between the names.
9191

9292
As you see the format is again a python dictionary where the key is the
93-
name to convert from and the value is the name to convert to.
93+
name to convert from, and the value is the name to convert to.
9494

95-
Since *to* in most cases are the inverse of the *fro* file, the
95+
Since *to* in most cases is the inverse of the *fro* file, the
9696
software allowes you to only specify one of them and it will
9797
automatically create the other.
9898

@@ -111,7 +111,7 @@ contact_person
111111

112112
This is only used by *make_metadata.py* when it constructs the metadata for
113113
the service described by the configuration file.
114-
This is where you described who can be contacted if questions arises
114+
This is where you describe who can be contacted if questions arise
115115
about the service or if support is needed. The possible types are according to
116116
the standard **technical**, **support**, **administrative**, **billing**
117117
and **other**.::
@@ -148,7 +148,7 @@ Format::
148148

149149
The globally unique identifier of the entity.
150150

151-
.. note:: There is a recommendation that the entityid should point to a real
151+
.. note:: It is recommended that the entityid should point to a real
152152
webpage where the metadata for the entity can be found.
153153

154154
key_file
@@ -160,13 +160,13 @@ Format::
160160

161161
*key_file* is the name of a PEM formatted file that contains the private key
162162
of the service. This is presently used both to encrypt/sign assertions and as
163-
client key in a HTTPS session.
163+
the client key in an HTTPS session.
164164

165165
metadata
166166
^^^^^^^^
167167

168168
Contains a list of places where metadata can be found. This can be either
169-
a file accessible on the server the service runs on or somewhere on the net.::
169+
a file accessible on the server the service runs on, or somewhere on the net.::
170170

171171
"metadata" : {
172172
"local": [
@@ -180,8 +180,8 @@ a file accessible on the server the service runs on or somewhere on the net.::
180180
},
181181

182182
The above configuration means that the service should read two local
183-
metadata files and on top of that load one from the net. To verify the
184-
authenticity of the file downloaded from the net the local copy of the
183+
metadata files, and on top of that load one from the net. To verify the
184+
authenticity of the file downloaded from the net, the local copy of the
185185
public key should be used.
186186
This public key must be acquired by some out-of-band method.
187187

@@ -205,7 +205,7 @@ Where you describe the organization responsible for the service.::
205205
service
206206
^^^^^^^
207207

208-
Which services the server will provide, those are combinations of "idp","sp"
208+
Which services the server will provide; those are combinations of "idp", "sp"
209209
and "aa".
210210
So if a server is a Service Provider (SP) then the configuration
211211
could look something like this::
@@ -228,13 +228,13 @@ could look something like this::
228228
229229
There are two options common to all services: 'name' and 'endpoints'.
230230
The remaining options are specific to one or the other of the service types.
231-
Which one is specified along side the name of the option
231+
Which one is specified along side the name of the option.
232232

233233
timeslack
234234
^^^^^^^^^
235235

236236
If your computer and another computer that you are communicating with are not
237-
in synch regarding the computer clock. Then you here can state how big a
237+
in synch regarding the computer clock, then here you can state how big a
238238
difference you are prepared to accept.
239239

240240
.. note:: This will indiscriminately effect all time comparisons.
@@ -275,7 +275,7 @@ policy
275275

276276
If the server is an IdP and/or an AA then there might be reasons to do things
277277
differently depending on who is asking; this is where that is specified.
278-
The keys are 'default' and SP entity identifiers, default is used whenever
278+
The keys are 'default' and SP entity identifiers. Default is used whenever
279279
there is no entry for a specific SP. The reasoning is also that if there is
280280
no default and only SP entity identifiers as keys, then the server will only
281281
except connections from the specified SPs.
@@ -301,12 +301,12 @@ An example might be::
301301
}
302302
303303
*lifetime*
304-
is the maximum amount of time before the information should be
304+
This is the maximum amount of time before the information should be
305305
regarded as stale. In an Assertion this is represented in the NotOnOrAfter
306306
attribute.
307307
*attribute_restrictions*
308308
By default there is no restrictions as to which attributes should be
309-
return. Instead all the attributes and values that is gathered by the
309+
return. Instead all the attributes and values that are gathered by the
310310
database backends will be returned if nothing else is stated.
311311
In the example above the SP with the entity identifier
312312
"urn:mace:umu.se:saml:roland:sp"
@@ -332,7 +332,7 @@ regular expressions.::
332332
}
333333
}
334334

335-
Here only mail addresses that ends with ".umu.se" will be returned.
335+
Here only mail addresses that end with ".umu.se" will be returned.
336336

337337
sp
338338
^^
@@ -345,7 +345,7 @@ authn_requests_signed
345345
Indicates if the Authentication Requests sent by this SP should be signed
346346
by default. This can be overriden by application code for a specific call.
347347

348-
This set the AuthnRequestsSigned attribute of the SPSSODescriptor node.
348+
This sets the AuthnRequestsSigned attribute of the SPSSODescriptor node
349349
of the metadata so the IdP will know this SP preference.
350350

351351
Valid values are "true" or "false". Default value is "false".
@@ -362,9 +362,9 @@ Example::
362362
idp
363363
"""
364364

365-
Defines the set of IdPs that this SP is allowed to use. If not all the IdPs in
366-
the metadata is allowed, then the value is expected to be a list with entity
367-
identifiers for the allowed IdPs.
365+
Defines the set of IdPs that this SP is allowed to use; if unset, all listed
366+
IdPs may be used. If set, then the value is expected to be a list with entity
367+
identifiers for the allowed IdPs.
368368
A typical configuration, when the allowed set of IdPs are limited, would look
369369
something like this::
370370

@@ -376,8 +376,6 @@ something like this::
376376

377377
In this case the SP has only one IdP it can use.
378378

379-
If all IdPs present in the metadata loaded this directive must be left out.
380-
381379
optional_attributes
382380
"""""""""""""""""""
383381

@@ -415,7 +413,7 @@ want_assertions_signed
415413
""""""""""""""""""""""
416414

417415
Indicates if this SP wants the IdP to send the assertions signed. This
418-
set the WantAssertionsSigned attribute of the SPSSODescriptor node.
416+
sets the WantAssertionsSigned attribute of the SPSSODescriptor node
419417
of the metadata so the IdP will know this SP preference.
420418

421419
Valid values are "true" or "false". Default value is "true".
@@ -440,7 +438,7 @@ endpoints
440438
"""""""""
441439

442440
Where the endpoints for the services provided are.
443-
This directive has as value a dictionary with one of the following keys:
441+
This directive has as value a dictionary with one or more of the following keys:
444442

445443
* artifact_resolution_service (aa, idp and sp)
446444
* assertion_consumer_service (sp)
@@ -474,7 +472,7 @@ Indicates if this entity will sign the Logout Requests originated from it.
474472

475473
This can be overriden by application code for a specific call.
476474

477-
Valid values are "true" or "false". Default value is "false"
475+
Valid values are "true" or "false". Default value is "false".
478476

479477
Example::
480478

@@ -491,7 +489,7 @@ The name of a database where the map between a local identifier and
491489
a distributed identifier is kept. By default this is a shelve database.
492490
So if you just specify name, then a shelve database with that name
493491
is created. On the other hand if you specify a tuple then the first
494-
element in the tuple specifise which type of database you want to use
492+
element in the tuple specifies which type of database you want to use
495493
and the second element is the address of the database.
496494

497495
Example::
@@ -519,7 +517,7 @@ Gives information about common identifiers for virtual_organizations::
519517
},
520518

521519
Keys in this dictionary are the identifiers for the virtual organizations.
522-
The arguments per organization is 'nameid_format' and 'common_identifier'.
520+
The arguments per organization are 'nameid_format' and 'common_identifier'.
523521
Useful if all the IdPs and AAs that are involved in a virtual organization
524522
have common attribute values for users that are part of the VO.
525523

@@ -562,8 +560,8 @@ We start with a simple but fairly complete Service provider configuration::
562560
}
563561

564562
This is the typical setup for a SP.
565-
A metadata file to load is *always* needed, but it can of course be
566-
containing anything from 1 up to many entity descriptions.
563+
A metadata file to load is *always* needed, but it can of course
564+
contain anything from 1 up to many entity descriptions.
567565

568566
------
569567

doc/howto/index.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ If you have not done it yet, read the :ref:`install`
1212
Well, now you have it installed and you want to do something.
1313

1414
And I'm sorry to tell you this; but there isn't really a lot you can do with
15-
this code on it's own.
15+
this code on its own.
1616

1717
Sure you can send a AuthenticationRequest to an IdentityProvider or a
18-
AttributeQuery to an AttributeAuthority but in order to get what they
18+
AttributeQuery to an AttributeAuthority, but in order to get what they
1919
return you have to sit behind a Web server. Well that is not really true since
2020
the AttributeQuery would be over SOAP and you would get the result over the
2121
connection you have to the AttributeAuthority.
@@ -29,7 +29,7 @@ But it can be used in a non-WSGI environment too.
2929

3030
So you will find descriptions of both cases here.
3131

32-
The configuration is the same disregarding whether you are using PySAML2 in a
32+
The configuration is the same regardless of whether you are using PySAML2 in a
3333
WSGI or non-WSGI environment.
3434

3535
.. toctree::

doc/index.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ pysaml2
1313

1414
PySAML2 is a pure python implementation of SAML2. It contains all necessary pieces for building a SAML2 service
1515
provider or an identity provider. The distribution contains examples of both. Originally written to work in a WSGI
16-
environment there are extensions that allow you to use it with other frameworks.
16+
environment, there are extensions that allow you to use it with other frameworks.
1717

1818
Contents:
1919

@@ -39,4 +39,4 @@ Indices and tables
3939

4040
<a href="https://github.com/rohe/pysaml2" class="github" target="_blank">
4141
<img style="position: absolute; top: 0; right: 0; border: 0;" src="_static/ViewmeonGitHub.png" alt="View me on GitHub" class="github"/>
42-
</a>
42+
</a>

doc/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,5 +53,5 @@ The tests are based on the pypy test environment, so::
5353
py.test
5454

5555
is what you should use. If you don't have py.test, get it it's part of pypy!
56-
It's really good !
56+
It's really good!
5757

doc/make.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
rm -f ./code/*
33
sphinx-apidoc -F -o ../doc/code ../src
44
make clean
5-
make html
5+
make html

example/README

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ To run the setup do
2323

2424
./all.sh start
2525

26-
and then use your favourit webbrowser to look at "http://localhost:8087/whoami"
26+
and then use your favourite webbrowser to look at "http://localhost:8087/whoami"
2727

28-
./all stop
28+
./all.sh stop
2929

30-
will of course stop your IdP and SP.
30+
will of course stop your IdP and SP.

example/idp2/idp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ def application(environ, start_response):
871871
captures in the WSGI environment as `myapp.url_args` so that
872872
the functions from above can access the url placeholders.
873873
874-
If nothing matches call the `not_found` function.
874+
If nothing matches, call the `not_found` function.
875875
876876
:param environ: The HTTP application environment
877877
:param start_response: The application to run when the handling of the

0 commit comments

Comments
 (0)