Skip to content

Commit 9095d00

Browse files
committed
Add get_id to AuthNRequest
1 parent 602f113 commit 9095d00

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/onelogin/saml2/authn_request.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def __init__(self, settings):
3838
security = self.__settings.get_security_data()
3939

4040
uid = OneLogin_Saml2_Utils.generate_unique_id()
41+
self.__id = uid
4142
issue_instant = OneLogin_Saml2_Utils.parse_time_to_SAML(OneLogin_Saml2_Utils.now())
4243

4344
destination = idp_data['singleSignOnService']['url']
@@ -95,3 +96,11 @@ def get_request(self):
9596
"""
9697
deflated_request = compress(self.__authn_request)[2:-4]
9798
return b64encode(deflated_request)
99+
100+
def get_id(self):
101+
"""
102+
Returns the AuthNRequest ID.
103+
:return: AuthNRequest ID
104+
:rtype: string
105+
"""
106+
return self.__id

0 commit comments

Comments
 (0)