From 01e6a2a41e533873ef7bd26f3f07865e18a71c45 Mon Sep 17 00:00:00 2001 From: kohsuke Date: Wed, 5 Dec 2007 07:09:29 +0000 Subject: [PATCH] making progress on the security realm configuration. Started hooking up GUI. git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@6205 71c3de6d-444a-0410-be80-ed276b4c234a Originally-Committed-As: 806e33d67dea946a6a745074ae847bf4c302990a --- .../hudson/security/LDAPSecurityRealm.java | 31 +++++++++++++++++++ .../security/LDAPSecurityRealm/config.jelly | 5 +++ 2 files changed, 36 insertions(+) create mode 100644 core/src/main/java/hudson/security/LDAPSecurityRealm.java create mode 100644 core/src/main/resources/hudson/security/LDAPSecurityRealm/config.jelly diff --git a/core/src/main/java/hudson/security/LDAPSecurityRealm.java b/core/src/main/java/hudson/security/LDAPSecurityRealm.java new file mode 100644 index 0000000..1d154fc --- /dev/null +++ b/core/src/main/java/hudson/security/LDAPSecurityRealm.java @@ -0,0 +1,31 @@ +package hudson.security; + +import org.acegisecurity.AuthenticationManager; +import hudson.model.Descriptor; + +/** + * {@link SecurityRealm} implementation that uses LDAP for authentication. + * + * @author Kohsuke Kawaguchi + */ +public class LDAPSecurityRealm extends SecurityRealm { + public AuthenticationManager createAuthenticationManager() { + throw new UnsupportedOperationException(); + } + + public DescriptorImpl getDescriptor() { + return DESCRIPTOR; + } + + public static final DescriptorImpl DESCRIPTOR = new DescriptorImpl(); + + private static final class DescriptorImpl extends Descriptor { + private DescriptorImpl() { + super(LDAPSecurityRealm.class); + } + + public String getDisplayName() { + return "LDAP"; + } + } +} diff --git a/core/src/main/resources/hudson/security/LDAPSecurityRealm/config.jelly b/core/src/main/resources/hudson/security/LDAPSecurityRealm/config.jelly new file mode 100644 index 0000000..2255b50 --- /dev/null +++ b/core/src/main/resources/hudson/security/LDAPSecurityRealm/config.jelly @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file