io.naraway.drama.prologue.spacekeeper.security.PublicResourceMatcher Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of drama-prologue Show documentation
Show all versions of drama-prologue Show documentation
Basic and shared logic for drama application on Nara Way.
The newest version!
/*
COPYRIGHT (c) NEXTREE Inc. 2014
This software is the proprietary of NEXTREE Inc.
@since 2014. 6. 10.
*/
package io.naraway.drama.prologue.spacekeeper.security;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.security.web.util.matcher.RequestMatcher;
import javax.servlet.http.HttpServletRequest;
@RequiredArgsConstructor
@Slf4j
public class PublicResourceMatcher implements RequestMatcher {
//
private final PublicResourceEndPointHolder endPointHolder;
@Override
public boolean matches(HttpServletRequest request) {
//
String requestUri = request.getRequestURI();
if (endPointHolder.isPublic(requestUri)) {
log.trace("Permit all using AuthorizedRole(isPublic=true), uri = {}", requestUri);
return true;
}
return false;
}
}