Changeset View
Changeset View
Standalone View
Standalone View
lib/puppet/type/keycloak_ldap_user_provider.rb
Show First 20 Lines • Show All 197 Lines • ▼ Show 20 Lines | [ | ||||
%r{(.*)}, | %r{(.*)}, | ||||
[ | [ | ||||
[:name], | [:name], | ||||
], | ], | ||||
], | ], | ||||
] | ] | ||||
end | end | ||||
newproperty(:trust_email, boolean: true) do | |||||
desc 'trustEmail' | |||||
newvalues(:true, :false) | |||||
defaultto :false | |||||
end | |||||
newproperty(:full_sync_period, parent: PuppetX::Keycloak::IntegerProperty) do | |||||
desc 'fullSyncPeriod' | |||||
defaultto '-1' | |||||
munge { |v| v.to_s } | |||||
end | |||||
newproperty(:changed_sync_period, parent: PuppetX::Keycloak::IntegerProperty) do | |||||
desc 'changedSyncPeriod' | |||||
defaultto '-1' | |||||
munge { |v| v.to_s } | |||||
end | |||||
validate do | validate do | ||||
if self[:use_kerberos_for_password_authentication] && self[:auth_type] == 'none' | if self[:use_kerberos_for_password_authentication] && self[:auth_type] == 'none' | ||||
raise Puppet::Error, 'use_kerberos_for_password_authentication is not valid for auth_type none' | raise Puppet::Error, 'use_kerberos_for_password_authentication is not valid for auth_type none' | ||||
end | end | ||||
if self[:bind_credential] && self[:auth_type] == 'none' | if self[:bind_credential] && self[:auth_type] == 'none' | ||||
raise Puppet::Error, 'bind_credential is not valid for auth_type none' | raise Puppet::Error, 'bind_credential is not valid for auth_type none' | ||||
end | end | ||||
if self[:bind_dn] && self[:auth_type] == 'none' | if self[:bind_dn] && self[:auth_type] == 'none' | ||||
raise Puppet::Error, 'bind_dn is not valid for auth_type none' | raise Puppet::Error, 'bind_dn is not valid for auth_type none' | ||||
end | end | ||||
end | end | ||||
end | end |