Last active
August 27, 2017 13:11
-
-
Save dularion/663316ac86baefd889b4cec20841e126 to your computer and use it in GitHub Desktop.
located under conf/spring/resources.groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import grails.util.Environment | |
import kcenter.CustomEventListenerMethodProcessor | |
import kcenter.DaoLdapAuthenticationProvider | |
import kcenter.DaoLdapUserDetailsService | |
import kcenter.LdapConnectionService | |
import kcenter.SessionEventListenerBean | |
import kcenter.json.JsonDataBindingListener | |
// Place your Spring DSL code here | |
beans = { | |
customEventListenerMethodProcessor CustomEventListenerMethodProcessor | |
jsonDataBindingListener JsonDataBindingListener | |
ldapConnectionService(LdapConnectionService) { | |
allowLdapFakeLogin = false | |
} | |
userDetailsService(DaoLdapUserDetailsService) { | |
ldapConnectionService = ref('ldapConnectionService') | |
} | |
daoLdapAuthenticationProvider(DaoLdapAuthenticationProvider) { | |
userDetailsService = ref('userDetailsService') | |
ldapConnectionService = ref('ldapConnectionService') | |
} | |
Environment.executeForCurrentEnvironment { | |
// Override bean definition in 'development' mode. | |
development { | |
ldapConnectionService(LdapConnectionService) { | |
allowLdapFakeLogin = true | |
ldapUrl = "ldaps://82.197.134.171:636/" | |
} | |
userDetailsService(DaoLdapUserDetailsService) { | |
ldapConnectionService = ref('ldapConnectionService') | |
} | |
daoLdapAuthenticationProvider(DaoLdapAuthenticationProvider) { | |
userDetailsService = ref('userDetailsService') | |
ldapConnectionService = ref('ldapConnectionService') | |
} | |
} | |
test { | |
ldapConnectionService(LdapConnectionService) { | |
allowLdapFakeLogin = false | |
ldapUrl = "URL here" | |
} | |
userDetailsService(DaoLdapUserDetailsService) { | |
ldapConnectionService = ref('ldapConnectionService') | |
} | |
daoLdapAuthenticationProvider(DaoLdapAuthenticationProvider) { | |
userDetailsService = ref('userDetailsService') | |
ldapConnectionService = ref('ldapConnectionService') | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment