Skip to content

Commit fdb40e2

Browse files
committed
Fix typographical errors in docstring
1 parent dd3b0c3 commit fdb40e2

File tree

9 files changed

+41
-41
lines changed

9 files changed

+41
-41
lines changed

src/onelogin/saml2/auth.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class OneLogin_Saml2_Auth(object):
3030
This class implements the SP SAML instance.
3131
3232
Defines the methods that you can invoke in your application in
33-
order to add SAML support (initiates sso, initiates slo, processes a
33+
order to add SAML support (initiates SSO, initiates SLO, processes a
3434
SAML Response, a Logout Request or a Logout Response).
3535
"""
3636

@@ -82,7 +82,7 @@ def process_response(self, request_id=None):
8282
"""
8383
Process the SAML Response sent by the IdP.
8484
85-
:param request_id: Is an optional argumen. Is the ID of the AuthNRequest sent by this SP to the IdP.
85+
:param request_id: Is an optional argument. Is the ID of the AuthNRequest sent by this SP to the IdP.
8686
:type request_id: string
8787
8888
:raises: OneLogin_Saml2_Error.SAML_RESPONSE_NOT_FOUND, when a POST with a SAMLResponse is not found
@@ -174,14 +174,14 @@ def process_slo(self, keep_local_session=False, request_id=None, delete_session_
174174

175175
def redirect_to(self, url=None, parameters={}):
176176
"""
177-
Redirects the user to the url past by parameter or to the url that we defined in our SSO Request.
177+
Redirects the user to the URL passed by parameter or to the URL that we defined in our SSO Request.
178178
179179
:param url: The target URL to redirect the user
180180
:type url: string
181-
:param parameters: Extra parameters to be passed as part of the url
181+
:param parameters: Extra parameters to be passed as part of the URL
182182
:type parameters: dict
183183
184-
:returns: Redirection url
184+
:returns: Redirection URL
185185
"""
186186
if url is None and 'RelayState' in self.__request_data['get_data']:
187187
url = self.__request_data['get_data']['RelayState']
@@ -268,16 +268,16 @@ def login(self, return_to=None, force_authn=False, is_passive=False, set_nameid_
268268
:param return_to: Optional argument. The target URL the user should be redirected to after login.
269269
:type return_to: string
270270
271-
:param force_authn: Optional argument. When true the AuthNReuqest will set the ForceAuthn='true'.
271+
:param force_authn: Optional argument. When true the AuthNRequest will set the ForceAuthn='true'.
272272
:type force_authn: bool
273273
274-
:param is_passive: Optional argument. When true the AuthNReuqest will set the Ispassive='true'.
274+
:param is_passive: Optional argument. When true the AuthNRequest will set the Ispassive='true'.
275275
:type is_passive: bool
276276
277-
:param set_nameid_policy: Optional argument. When true the AuthNReuqest will set a nameIdPolicy element.
277+
:param set_nameid_policy: Optional argument. When true the AuthNRequest will set a nameIdPolicy element.
278278
:type set_nameid_policy: bool
279279
280-
:returns: Redirection url
280+
:returns: Redirection URL
281281
:rtype: string
282282
"""
283283
authn_request = OneLogin_Saml2_Authn_Request(self.__settings, force_authn, is_passive, set_nameid_policy)
@@ -311,7 +311,7 @@ def logout(self, return_to=None, name_id=None, session_index=None, nq=None):
311311
:param nq: IDP Name Qualifier
312312
:type: string
313313
314-
:returns: Redirection url
314+
:returns: Redirection URL
315315
"""
316316
slo_url = self.get_slo_url()
317317
if slo_url is None:
@@ -343,7 +343,7 @@ def logout(self, return_to=None, name_id=None, session_index=None, nq=None):
343343

344344
def get_sso_url(self):
345345
"""
346-
Gets the SSO url.
346+
Gets the SSO URL.
347347
348348
:returns: An URL, the SSO endpoint of the IdP
349349
:rtype: string
@@ -353,7 +353,7 @@ def get_sso_url(self):
353353

354354
def get_slo_url(self):
355355
"""
356-
Gets the SLO url.
356+
Gets the SLO URL.
357357
358358
:returns: An URL, the SLO endpoint of the IdP
359359
:rtype: string

src/onelogin/saml2/authn_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ def __init__(self, settings, force_authn=False, is_passive=False, set_nameid_pol
2929
:param settings: OSetting data
3030
:type settings: OneLogin_Saml2_Settings
3131
32-
:param force_authn: Optional argument. When true the AuthNReuqest will set the ForceAuthn='true'.
32+
:param force_authn: Optional argument. When true the AuthNRequest will set the ForceAuthn='true'.
3333
:type force_authn: bool
3434
35-
:param is_passive: Optional argument. When true the AuthNReuqest will set the Ispassive='true'.
35+
:param is_passive: Optional argument. When true the AuthNRequest will set the Ispassive='true'.
3636
:type is_passive: bool
3737
38-
:param set_nameid_policy: Optional argument. When true the AuthNReuqest will set a nameIdPolicy element.
38+
:param set_nameid_policy: Optional argument. When true the AuthNRequest will set a nameIdPolicy element.
3939
:type set_nameid_policy: bool
4040
"""
4141
self.__settings = settings

src/onelogin/saml2/idp_metadata_parser.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@
2121

2222
class OneLogin_Saml2_IdPMetadataParser(object):
2323
"""
24-
A class that contains methods to obtain and parse metadata from IdP
24+
A class that contain methods related to obtaining and parsing metadata from IdP
2525
"""
2626

2727
@staticmethod
2828
def get_metadata(url):
2929
"""
30-
Get the metadata XML from the provided URL
30+
Gets the metadata XML from the provided URL
3131
:param url: Url where the XML of the Identity Provider Metadata is published.
3232
:type url: string
3333
:returns: metadata XML
@@ -54,7 +54,7 @@ def get_metadata(url):
5454
@staticmethod
5555
def parse_remote(url, **kwargs):
5656
"""
57-
Get the metadata XML from the provided URL and parse it, returning a dict with extracted data
57+
Gets the metadata XML from the provided URL and parse it, returning a dict with extracted data
5858
:param url: Url where the XML of the Identity Provider Metadata is published.
5959
:type url: string
6060
:returns: settings dict with extracted data
@@ -69,14 +69,14 @@ def parse(
6969
required_sso_binding=OneLogin_Saml2_Constants.BINDING_HTTP_REDIRECT,
7070
required_slo_binding=OneLogin_Saml2_Constants.BINDING_HTTP_REDIRECT):
7171
"""
72-
Parse the Identity Provider metadata and return a dict with extracted data.
72+
Parses the Identity Provider metadata and return a dict with extracted data.
7373
7474
If there are multiple <IDPSSODescriptor> tags, parse only the first.
7575
76-
Parse only those SSO endpoints with the same binding as given by
76+
Parses only those SSO endpoints with the same binding as given by
7777
the `required_sso_binding` parameter.
7878
79-
Parse only those SLO endpoints with the same binding as given by
79+
Parses only those SLO endpoints with the same binding as given by
8080
the `required_slo_binding` parameter.
8181
8282
If the metadata specifies multiple SSO endpoints with the required

src/onelogin/saml2/logout_request.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def __init__(self, settings, request=None, name_id=None, session_index=None, nq=
9999

100100
def get_request(self, deflate=True):
101101
"""
102-
Returns the Logout Request defated, base64encoded
102+
Returns the Logout Request deflated, base64encoded
103103
:param deflate: It makes the deflate process optional
104104
:type: bool
105105
:return: Logout Request maybe deflated and base64 encoded
@@ -214,7 +214,7 @@ def get_session_indexes(request):
214214

215215
def is_valid(self, request_data):
216216
"""
217-
Checks if the Logout Request recieved is valid
217+
Checks if the Logout Request received is valid
218218
:param request_data: Request Data
219219
:type request_data: dict
220220
@@ -278,6 +278,6 @@ def is_valid(self, request_data):
278278

279279
def get_error(self):
280280
"""
281-
After execute a validation process, if fails this method returns the cause
281+
After executing a validation process, if it fails this method returns the cause
282282
"""
283283
return self.__error

src/onelogin/saml2/logout_response.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def is_valid(self, request_data, request_id=None):
8484

8585
security = self.__settings.get_security_data()
8686

87-
# Check if the InResponseTo of the Logout Response matchs the ID of the Logout Request (requestId) if provided
87+
# Check if the InResponseTo of the Logout Response matches the ID of the Logout Request (requestId) if provided
8888
in_response_to = self.document.get('InResponseTo', None)
8989
if request_id is not None and in_response_to and in_response_to != request_id:
9090
raise Exception('The InResponseTo of the Logout Response: %s, does not match the ID of the Logout request sent by the SP: %s' % (in_response_to, request_id))
@@ -163,6 +163,6 @@ def get_response(self, deflate=True):
163163

164164
def get_error(self):
165165
"""
166-
After execute a validation process, if fails this method returns the cause
166+
After executing a validation process, if it fails this method returns the cause
167167
"""
168168
return self.__error

src/onelogin/saml2/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ def __add_x509_key_descriptors(root, cert, signing):
217217
@staticmethod
218218
def add_x509_key_descriptors(metadata, cert=None):
219219
"""
220-
Adds the x509 descriptors (sign/encriptation) to the metadata
220+
Adds the x509 descriptors (sign/encryption) to the metadata
221221
The same cert will be used for sign/encrypt
222222
223223
:param metadata: SAML Metadata XML

src/onelogin/saml2/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,6 @@ def __decrypt_assertion(self, xml):
527527

528528
def get_error(self):
529529
"""
530-
After execute a validation process, if fails this method returns the cause
530+
After executing a validation process, if it fails this method returns the cause
531531
"""
532532
return self.__error

src/onelogin/saml2/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(self, settings=None, custom_base_path=None, sp_validation_only=Fals
122122

123123
def __load_paths(self, base_path=None):
124124
"""
125-
Sets the paths of the different folders
125+
Set the paths of the different folders
126126
"""
127127
if base_path is None:
128128
base_path = dirname(dirname(dirname(__file__)))

src/onelogin/saml2/utils.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def decode_base64_and_inflate(value, ignore_zip=False):
9090
@staticmethod
9191
def deflate_and_base64_encode(value):
9292
"""
93-
Deflates and the base64 encodes a string
93+
Deflates and then base64 encodes a string
9494
:param value: The string to deflate and encode
9595
:type value: string
9696
:returns: The deflated and encoded string
@@ -103,13 +103,13 @@ def format_cert(cert, heads=True):
103103
"""
104104
Returns a x509 cert (adding header & footer if required).
105105
106-
:param cert: A x509 unformated cert
106+
:param cert: A x509 unformatted cert
107107
:type: string
108108
109109
:param heads: True if we want to include head and footer
110110
:type: boolean
111111
112-
:returns: Formated cert
112+
:returns: Formatted cert
113113
:rtype: string
114114
"""
115115
x509_cert = cert.replace('\x0D', '')
@@ -519,16 +519,16 @@ def calculate_x509_fingerprint(x509_cert, alg='sha1'):
519519
@staticmethod
520520
def format_finger_print(fingerprint):
521521
"""
522-
Formates a fingerprint.
522+
Formats a fingerprint.
523523
524524
:param fingerprint: fingerprint
525525
:type: string
526526
527-
:returns: Formated fingerprint
527+
:returns: Formatted fingerprint
528528
:rtype: string
529529
"""
530-
formated_fingerprint = fingerprint.replace(':', '')
531-
return formated_fingerprint.lower()
530+
formatted_fingerprint = fingerprint.replace(':', '')
531+
return formatted_fingerprint.lower()
532532

533533
@staticmethod
534534
def generate_name_id(value, sp_nq, sp_format, cert=None, debug=False, nq=None):
@@ -723,7 +723,7 @@ def validate_sign(xml, cert=None, fingerprint=None, fingerprintalg='sha1', valid
723723
:param xml: The element we should validate
724724
:type: string | Document
725725
726-
:param cert: The pubic cert
726+
:param cert: The public cert
727727
:type: string
728728
729729
:param fingerprint: The fingerprint of the public cert
@@ -772,7 +772,7 @@ def validate_metadata_sign(xml, cert=None, fingerprint=None, fingerprintalg='sha
772772
:param xml: The element we should validate
773773
:type: string | Document
774774
775-
:param cert: The pubic cert
775+
:param cert: The public cert
776776
:type: string
777777
778778
:param fingerprint: The fingerprint of the public cert
@@ -825,7 +825,7 @@ def validate_node_sign(signature_node, elem, cert=None, fingerprint=None, finger
825825
:param xml: The element we should validate
826826
:type: Document
827827
828-
:param cert: The pubic cert
828+
:param cert: The public cert
829829
:type: string
830830
831831
:param fingerprint: The fingerprint of the public cert
@@ -903,7 +903,7 @@ def sign_binary(msg, key, algorithm=xmlsec.Transform.RSA_SHA1, debug=False):
903903
@staticmethod
904904
def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_Saml2_Constants.RSA_SHA1, debug=False):
905905
"""
906-
Validates signed bynary data (Used to validate GET Signature).
906+
Validates signed binary data (Used to validate GET Signature).
907907
908908
:param signed_query: The element we should validate
909909
:type: string
@@ -912,7 +912,7 @@ def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_
912912
:param signature: The signature that will be validate
913913
:type: string
914914
915-
:param cert: The pubic cert
915+
:param cert: The public cert
916916
:type: string
917917
918918
:param algorithm: Signature algorithm

0 commit comments

Comments
 (0)