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
<script type="text/javascript"> | |
$(document).ready(function() { | |
//collapsible management | |
$('.collapsible').collapsible({ | |
defaultOpen: 'section1,section3' | |
}); | |
}); | |
</script> |
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.grails.plugin.resource.mapper.MapperPhase | |
class WoffResourceMapper { | |
static phase = MapperPhase.ALTERNATEREPRESENTATION | |
static defaultIncludes = [ '**/*.woff' ] | |
def map(resource, config) { | |
resource.requestProcessors << { req, resp -> | |
resp.setHeader('Content-Type', 'font/opentype') |
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
protected HttpSession proxySession(final boolean create, final HttpServletRequest request, | |
final HttpServletResponse response) { | |
if (log.isDebugEnabled()) { | |
log.debug("Proxying request for {}", request.getRequestURL()); | |
} | |
String sessionId = getCookieValue(request); | |
if (sessionId == null) { | |
if (!create) { |
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") | |
} |
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
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
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
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 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; |
OlderNewer