File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -556,19 +556,29 @@ class LdapIdentityProvider(Provider):
556556
557557 def __init__ (
558558 self ,
559+ * ,
559560 sts_endpoint : str ,
560561 ldap_username : str ,
561562 ldap_password : str ,
563+ duration_seconds : Optional [int ] = None ,
564+ policy : Optional [str ] = None ,
565+ token_revoke_type : Optional [str ] = None ,
562566 http_client : Optional [PoolManager ] = None ,
563567 ):
564- self ._sts_endpoint = sts_endpoint + "?" + urlencode (
565- {
566- "Action" : "AssumeRoleWithLDAPIdentity" ,
567- "Version" : "2011-06-15" ,
568- "LDAPUsername" : ldap_username ,
569- "LDAPPassword" : ldap_password ,
570- },
571- )
568+ query_params = {
569+ "Action" : "AssumeRoleWithLDAPIdentity" ,
570+ "Version" : "2011-06-15" ,
571+ "LDAPUsername" : ldap_username ,
572+ "LDAPPassword" : ldap_password ,
573+ }
574+ if duration_seconds :
575+ query_params ["DurationSeconds" ] = str (duration_seconds )
576+ if policy :
577+ query_params ["Policy" ] = policy
578+ if token_revoke_type :
579+ query_params ["TokenRevokeType" ] = token_revoke_type
580+
581+ self ._sts_endpoint = sts_endpoint + "?" + urlencode (query_params )
572582 self ._http_client = http_client or PoolManager (
573583 retries = Retry (
574584 total = 5 ,
You can’t perform that action at this time.
0 commit comments