This file contains 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
delete_branches = [ | |
'branch_a', | |
'branch_b', | |
'branch_c', | |
] | |
delete_branches.each do |branch| | |
system "git branch -D #{branch}" | |
system "git push origin --delete #{branch}" | |
end |
This file contains 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
module Elasticsearcher | |
module QuerybuilderAdapter | |
def self.included base | |
base.extend ClassMethods | |
end | |
module ClassMethods | |
QUERYBUILDER_TO_ELASTIC_RANGES = { | |
'before' => 'lt', |
This file contains 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
grails.plugins.springsecurity.providerNames = [ | |
'samlAuthenticationProvider', | |
'daoAuthenticationProvider', | |
'anonymousAuthenticationProvider', | |
'rememberMeAuthenticationProvider'] |
This file contains 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 org.springframework.security.authentication.dao.DaoAuthenticationProvider | |
import org.springframework.security.core.Authentication | |
import sonicg.authentication.SAMLAuthenticationService | |
class SamlAuthenticationProvider extends DaoAuthenticationProvider { | |
@Override | |
Authentication authenticate(Authentication authentication) { | |
def token = (SamlAuthenticationToken) authentication |
This file contains 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 org.springframework.security.authentication.UsernamePasswordAuthenticationToken | |
import org.springframework.security.core.userdetails.UserDetails | |
class SamlAuthenticationToken extends UsernamePasswordAuthenticationToken { | |
String token | |
public SamlAuthenticationToken(String token) { | |
super(null, null); | |
this.token = token; |
This file contains 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 org.codehaus.groovy.grails.plugins.springsecurity.SecurityFilterPosition | |
import org.codehaus.groovy.grails.plugins.springsecurity.SpringSecurityUtils | |
class BootStrap { | |
def init = { servletContext -> | |
SpringSecurityUtils.clientRegisterFilter('samlAuthenticationFilter', SecurityFilterPosition.SECURITY_CONTEXT_FILTER.order + 10) | |
} | |
def destroy = { |
This file contains 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 SamlAuthenticationFilter | |
import SamlAuthenticationProvider | |
beans = { | |
samlAuthenticationFilter(SamlAuthenticationFilter) { | |
authenticationManager = ref('authenticationManager') | |
sessionAuthenticationStrategy = ref('sessionAuthenticationStrategy') | |
authenticationSuccessHandler = ref('authenticationSuccessHandler') | |
authenticationFailureHandler = ref('authenticationFailureHandler') | |
rememberMeServices = ref('rememberMeServices') |
This file contains 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
class SamlAuthenticationFilter extends AbstractAuthenticationProcessingFilter { | |
public SamlAuthenticationFilter() { | |
super("/somecustomauth") | |
} | |
@Override | |
Authentication attemptAuthentication(HttpServletRequest request, HttpServletResponse response) { | |
if (!request.getMethod().equals("POST")) { | |
throw new AuthenticationServiceException("Authentication method not supported: " + request.getMethod()) |
This file contains 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
column(name: "serialized", type: "bytea(20000)") { | |
constraints(nullable: "false") | |
} |
This file contains 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
column(autoIncrement: "true", name: "id", type: "int8") { | |
constraints(nullable: "false", primaryKey: "true", primaryKeyName: "persistent_sePK") | |
} |