Skip to content

Commit 393f015

Browse files
committed
Fix typographical errors in docstring
1 parent b1d20e7 commit 393f015

9 files changed

Lines changed: 38 additions & 38 deletions

File tree

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

@@ -80,7 +80,7 @@ def process_response(self, request_id=None):
8080
"""
8181
Process the SAML Response sent by the IdP.
8282
83-
:param request_id: Is an optional argumen. Is the ID of the AuthNRequest sent by this SP to the IdP.
83+
:param request_id: Is an optional argument. Is the ID of the AuthNRequest sent by this SP to the IdP.
8484
:type request_id: string
8585
8686
:raises: OneLogin_Saml2_Error.SAML_RESPONSE_NOT_FOUND, when a POST with a SAMLResponse is not found
@@ -119,7 +119,7 @@ def process_slo(self, keep_local_session=False, request_id=None, delete_session_
119119
:param request_id: The ID of the LogoutRequest sent by this SP to the IdP
120120
:type request_id: string
121121
122-
:returns: Redirection url
122+
:returns: Redirection URL
123123
"""
124124
self.__errors = []
125125

@@ -168,14 +168,14 @@ def process_slo(self, keep_local_session=False, request_id=None, delete_session_
168168

169169
def redirect_to(self, url=None, parameters={}):
170170
"""
171-
Redirects the user to the url past by parameter or to the url that we defined in our SSO Request.
171+
Redirects the user to the URL passed by parameter or to the URL that we defined in our SSO Request.
172172
173173
:param url: The target URL to redirect the user
174174
:type url: string
175-
:param parameters: Extra parameters to be passed as part of the url
175+
:param parameters: Extra parameters to be passed as part of the URL
176176
:type parameters: dict
177177
178-
:returns: Redirection url
178+
:returns: Redirection URL
179179
"""
180180
if url is None and 'RelayState' in self.__request_data['get_data']:
181181
url = self.__request_data['get_data']['RelayState']
@@ -272,16 +272,16 @@ def login(self, return_to=None, force_authn=False, is_passive=False, set_nameid_
272272
:param return_to: Optional argument. The target URL the user should be redirected to after login.
273273
:type return_to: string
274274
275-
:param force_authn: Optional argument. When true the AuthNReuqest will set the ForceAuthn='true'.
275+
:param force_authn: Optional argument. When true the AuthNRequest will set the ForceAuthn='true'.
276276
:type force_authn: bool
277277
278-
:param is_passive: Optional argument. When true the AuthNReuqest will set the Ispassive='true'.
278+
:param is_passive: Optional argument. When true the AuthNRequest will set the Ispassive='true'.
279279
:type is_passive: bool
280280
281-
:param set_nameid_policy: Optional argument. When true the AuthNReuqest will set a nameIdPolicy element.
281+
:param set_nameid_policy: Optional argument. When true the AuthNRequest will set a nameIdPolicy element.
282282
:type set_nameid_policy: bool
283283
284-
:returns: Redirection url
284+
:returns: Redirection URL
285285
:rtype: string
286286
"""
287287
authn_request = OneLogin_Saml2_Authn_Request(self.__settings, force_authn, is_passive, set_nameid_policy)
@@ -355,7 +355,7 @@ def logout(self, return_to=None, name_id=None, session_index=None, nq=None):
355355

356356
def get_sso_url(self):
357357
"""
358-
Gets the SSO url.
358+
Gets the SSO URL.
359359
360360
:returns: An URL, the SSO endpoint of the IdP
361361
:rtype: string
@@ -365,7 +365,7 @@ def get_sso_url(self):
365365

366366
def get_slo_url(self):
367367
"""
368-
Gets the SLO url.
368+
Gets the SLO URL.
369369
370370
:returns: An URL, the SLO endpoint of the IdP
371371
: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 return_to: 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: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@
2020

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

2626
@staticmethod
2727
def get_metadata(url):
2828
"""
29-
Get the metadata XML from the provided URL
29+
Gets the metadata XML from the provided URL
3030
3131
:param url: Url where the XML of the Identity Provider Metadata is published.
3232
:type url: string
@@ -55,7 +55,7 @@ def get_metadata(url):
5555
@staticmethod
5656
def parse_remote(url, **kwargs):
5757
"""
58-
Get the metadata XML from the provided URL and parse it, returning a dict with extracted data
58+
Gets the metadata XML from the provided URL and parse it, returning a dict with extracted data
5959
6060
:param url: Url where the XML of the Identity Provider Metadata is published.
6161
:type url: string

src/onelogin/saml2/logout_request.py

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

119119
def get_request(self, deflate=True):
120120
"""
121-
Returns the Logout Request defated, base64encoded
121+
Returns the Logout Request deflated, base64encoded
122122
:param deflate: It makes the deflate process optional
123123
:type: bool
124124
:return: Logout Request maybe deflated and base64 encoded
@@ -253,7 +253,7 @@ def get_session_indexes(request):
253253

254254
def is_valid(self, request_data):
255255
"""
256-
Checks if the Logout Request recieved is valid
256+
Checks if the Logout Request received is valid
257257
:param request_data: Request Data
258258
:type request_data: dict
259259
@@ -343,6 +343,6 @@ def is_valid(self, request_data):
343343

344344
def get_error(self):
345345
"""
346-
After execute a validation process, if fails this method returns the cause
346+
After executing a validation process, if it fails this method returns the cause
347347
"""
348348
return self.__error

src/onelogin/saml2/logout_response.py

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

9494
security = self.__settings.get_security_data()
9595

96-
# Check if the InResponseTo of the Logout Response matchs the ID of the Logout Request (requestId) if provided
96+
# Check if the InResponseTo of the Logout Response matches the ID of the Logout Request (requestId) if provided
9797
if request_id is not None and self.document.documentElement.hasAttribute('InResponseTo'):
9898
in_response_to = self.document.documentElement.getAttribute('InResponseTo')
9999
if request_id != in_response_to:
@@ -207,6 +207,6 @@ def get_response(self, deflate=True):
207207

208208
def get_error(self):
209209
"""
210-
After execute a validation process, if fails this method returns the cause
210+
After executing a validation process, if it fails this method returns the cause
211211
"""
212212
return self.__error

src/onelogin/saml2/metadata.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ def sign_metadata(metadata, key, cert, sign_algorithm=OneLogin_Saml2_Constants.R
220220
@staticmethod
221221
def add_x509_key_descriptors(metadata, cert=None):
222222
"""
223-
Adds the x509 descriptors (sign/encriptation) to the metadata
223+
Adds the x509 descriptors (sign/encryption) to the metadata
224224
The same cert will be used for sign/encrypt
225225
226226
:param metadata: SAML Metadata XML

src/onelogin/saml2/response.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,6 @@ def __decrypt_assertion(self, dom):
546546

547547
def get_error(self):
548548
"""
549-
After execute a validation process, if fails this method returns the cause
549+
After executing a validation process, if it fails this method returns the cause
550550
"""
551551
return self.__error

src/onelogin/saml2/settings.py

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

113113
def __load_paths(self, base_path=None):
114114
"""
115-
Sets the paths of the different folders
115+
Set the paths of the different folders
116116
"""
117117
if base_path is None:
118118
base_path = dirname(dirname(dirname(abspath(__file__))))

src/onelogin/saml2/utils.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141

4242
def print_xmlsec_errors(filename, line, func, error_object, error_subject, reason, msg):
4343
"""
44-
Auxiliary method. It override the default xmlsec debug message.
44+
Auxiliary method. It overrides the default xmlsec debug message.
4545
"""
4646

4747
info = []
@@ -80,7 +80,7 @@ def decode_base64_and_inflate(value):
8080
@staticmethod
8181
def deflate_and_base64_encode(value):
8282
"""
83-
Deflates and the base64 encodes a string
83+
Deflates and then base64 encodes a string
8484
:param value: The string to deflate and encode
8585
:type value: string
8686
:returns: The deflated and encoded string
@@ -137,13 +137,13 @@ def format_cert(cert, heads=True):
137137
"""
138138
Returns a x509 cert (adding header & footer if required).
139139
140-
:param cert: A x509 unformated cert
140+
:param cert: A x509 unformatted cert
141141
:type: string
142142
143143
:param heads: True if we want to include head and footer
144144
:type: boolean
145145
146-
:returns: Formated cert
146+
:returns: Formatted cert
147147
:rtype: string
148148
"""
149149
x509_cert = cert.replace('\x0D', '')
@@ -170,7 +170,7 @@ def format_private_key(key, heads=True):
170170
:param heads: True if we want to include head and footer
171171
:type: boolean
172172
173-
:returns: Formated private key
173+
:returns: Formatted private key
174174
:rtype: string
175175
"""
176176
private_key = key.replace('\x0D', '')
@@ -576,12 +576,12 @@ def calculate_x509_fingerprint(x509_cert, alg='sha1'):
576576
@staticmethod
577577
def format_finger_print(fingerprint):
578578
"""
579-
Formates a fingerprint.
579+
Formats a fingerprint.
580580
581581
:param fingerprint: fingerprint
582582
:type: string
583583
584-
:returns: Formated fingerprint
584+
:returns: Formatted fingerprint
585585
:rtype: string
586586
"""
587587
formated_fingerprint = fingerprint.replace(':', '')
@@ -1012,7 +1012,7 @@ def validate_node_sign(signature_node, elem, cert=None, fingerprint=None, finger
10121012
:param xml: The element we should validate
10131013
:type: Document
10141014
1015-
:param cert: The pubic cert
1015+
:param cert: The public cert
10161016
:type: string
10171017
10181018
:param fingerprint: The fingerprint of the public cert
@@ -1072,7 +1072,7 @@ def validate_node_sign(signature_node, elem, cert=None, fingerprint=None, finger
10721072
@staticmethod
10731073
def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_Saml2_Constants.RSA_SHA1, debug=False):
10741074
"""
1075-
Validates signed bynary data (Used to validate GET Signature).
1075+
Validates signed binary data (Used to validate GET Signature).
10761076
10771077
:param signed_query: The element we should validate
10781078
:type: string
@@ -1081,7 +1081,7 @@ def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_
10811081
:param signature: The signature that will be validate
10821082
:type: string
10831083
1084-
:param cert: The pubic cert
1084+
:param cert: The public cert
10851085
:type: string
10861086
10871087
:param algorithm: Signature algorithm
@@ -1117,8 +1117,8 @@ def validate_binary_sign(signed_query, signature, cert=None, algorithm=OneLogin_
11171117

11181118
@staticmethod
11191119
def get_encoded_parameter(get_data, name, default=None, lowercase_urlencoding=False):
1120-
"""Return an url encoded get parameter value
1121-
Prefer to extract the original encoded value directly from query_string since url
1120+
"""Return a URL encoded get parameter value
1121+
Prefer to extract the original encoded value directly from query_string since URL
11221122
encoding is not canonical. The encoding used by ADFS 3.0 is not compatible with
11231123
python's quote_plus (ADFS produces lower case hex numbers and quote_plus produces
11241124
upper case hex numbers)

0 commit comments

Comments
 (0)