hudson.plugins.script_realm_extended
Class ExtendedScriptSecurityRealm

java.lang.Object
  extended by hudson.security.SecurityRealm
      extended by hudson.security.AbstractPasswordBasedSecurityRealm
          extended by hudson.plugins.script_realm_extended.ExtendedScriptSecurityRealm
All Implemented Interfaces:
hudson.ExtensionPoint, hudson.model.Describable<hudson.security.SecurityRealm>, org.acegisecurity.userdetails.UserDetailsService

public class ExtendedScriptSecurityRealm
extends hudson.security.AbstractPasswordBasedSecurityRealm

This realm is a fork of the original ScriptSecurityRealm, the extension would have fit in to the original class easily - but as I did not get any feedback if I can merge my changes, I just created a new plugin.

Author:
Kohsuke Kawaguchi (origin), Dominik Bartholdi

Nested Class Summary
static class ExtendedScriptSecurityRealm.DescriptorImpl
           
 
Nested classes/interfaces inherited from class hudson.security.SecurityRealm
hudson.security.SecurityRealm.SecurityComponents
 
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
hudson.ExtensionPoint.LegacyInstancesAreScopedToHudson
 
Field Summary
 java.lang.String commandLine
           
 java.lang.String groupsCommandLine
           
 java.lang.String groupsDelimiter
           
 
Fields inherited from class hudson.security.SecurityRealm
AUTHENTICATED_AUTHORITY, LIST, NO_AUTHENTICATION
 
Constructor Summary
ExtendedScriptSecurityRealm(java.lang.String commandLine, java.lang.String groupsCommandLine, java.lang.String groupsDelimiter)
           
 
Method Summary
protected  org.acegisecurity.userdetails.UserDetails authenticate(java.lang.String username, java.lang.String password)
           
 hudson.security.GroupDetails loadGroupByGroupname(java.lang.String groupname)
           
protected  org.acegisecurity.GrantedAuthority[] loadGroups(java.lang.String username)
           
 org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username)
           
 
Methods inherited from class hudson.security.AbstractPasswordBasedSecurityRealm
createSecurityComponents
 
Methods inherited from class hudson.security.SecurityRealm
all, allowsSignup, canLogOut, createFilter, doCaptcha, doLogout, findBean, getAuthenticationGatewayUrl, getDescriptor, getLoginUrl, getPostLogOutUrl, getSecurityComponents, validateCaptcha
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandLine

public final java.lang.String commandLine

groupsCommandLine

public final java.lang.String groupsCommandLine

groupsDelimiter

public final java.lang.String groupsDelimiter
Constructor Detail

ExtendedScriptSecurityRealm

@DataBoundConstructor
public ExtendedScriptSecurityRealm(java.lang.String commandLine,
                                                        java.lang.String groupsCommandLine,
                                                        java.lang.String groupsDelimiter)
Method Detail

authenticate

protected org.acegisecurity.userdetails.UserDetails authenticate(java.lang.String username,
                                                                 java.lang.String password)
                                                          throws org.acegisecurity.AuthenticationException
Specified by:
authenticate in class hudson.security.AbstractPasswordBasedSecurityRealm
Throws:
org.acegisecurity.AuthenticationException

loadUserByUsername

public org.acegisecurity.userdetails.UserDetails loadUserByUsername(java.lang.String username)
                                                             throws org.acegisecurity.userdetails.UsernameNotFoundException,
                                                                    org.springframework.dao.DataAccessException
Specified by:
loadUserByUsername in interface org.acegisecurity.userdetails.UserDetailsService
Specified by:
loadUserByUsername in class hudson.security.AbstractPasswordBasedSecurityRealm
Throws:
org.acegisecurity.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException

loadGroupByGroupname

public hudson.security.GroupDetails loadGroupByGroupname(java.lang.String groupname)
                                                  throws org.acegisecurity.userdetails.UsernameNotFoundException,
                                                         org.springframework.dao.DataAccessException
Specified by:
loadGroupByGroupname in class hudson.security.AbstractPasswordBasedSecurityRealm
Throws:
org.acegisecurity.userdetails.UsernameNotFoundException
org.springframework.dao.DataAccessException

loadGroups

protected org.acegisecurity.GrantedAuthority[] loadGroups(java.lang.String username)
                                                   throws org.acegisecurity.AuthenticationException
Throws:
org.acegisecurity.AuthenticationException


Copyright © 2010. All Rights Reserved.