NewLDAPIdentityWithSessionPolicy returns new credentials object that uses LDAP Identity with a specified session policy. The `policy` parameter must be a JSON string specifying the policy document. Deprecated: Use the `LDAPIdentityPolicyOpt` with `NewLDAPIdentity` instead.
(stsEndpoint, ldapUsername, ldapPassword, policy string)
| 126 | // |
| 127 | // Deprecated: Use the `LDAPIdentityPolicyOpt` with `NewLDAPIdentity` instead. |
| 128 | func NewLDAPIdentityWithSessionPolicy(stsEndpoint, ldapUsername, ldapPassword, policy string) (*Credentials, error) { |
| 129 | return New(&LDAPIdentity{ |
| 130 | STSEndpoint: stsEndpoint, |
| 131 | LDAPUsername: ldapUsername, |
| 132 | LDAPPassword: ldapPassword, |
| 133 | Policy: policy, |
| 134 | }), nil |
| 135 | } |
| 136 | |
| 137 | // RetrieveWithCredContext gets the credential by calling the MinIO STS API for |
| 138 | // LDAP on the configured stsEndpoint. |