public PasswordPolicies GetPasswordPolicies()
        {
            _client.Executor.CheckApiServerVersion(ApiConfig.ApiGetPasswordPoliciesMinimumVersion);
            IRestRequest        request             = _client.Builder.GetPasswordPolicies();
            ApiPasswordSettings apiPasswordPolicies =
                _client.Executor.DoSyncApiCall <ApiPasswordSettings>(request, DracoonRequestExecutor.RequestType.GetPasswordPolicies);

            return(SettingsMapper.FromApiPasswordPolicies(apiPasswordPolicies));
        }
Esempio n. 2
0
        internal static PasswordPolicies FromApiPasswordPolicies(ApiPasswordSettings apiPolicies)
        {
            if (apiPolicies == null)
            {
                return(null);
            }

            PasswordPolicies policies = new PasswordPolicies {
                EncryptionPolicies = FromApiPasswordEncryptionPolicies(apiPolicies.EncryptionPasswordSettings),
                LoginPolicies      = FromApiPasswordLoginPolicies(apiPolicies.LoginPasswordSettings),
                SharePolicies      = FromApiPasswordSharePolicies(apiPolicies.SharePasswordSettings)
            };

            return(policies);
        }