List of usage examples for org.springframework.security.web.authentication DelegatingAuthenticationEntryPoint setDefaultEntryPoint
public void setDefaultEntryPoint(AuthenticationEntryPoint defaultEntryPoint)
From source file:io.pivotal.cla.config.SecurityConfig.java
private AuthenticationEntryPoint entryPoint() { LinkedHashMap<RequestMatcher, AuthenticationEntryPoint> entryPoints = new LinkedHashMap<>(); entryPoints.put(new AntPathRequestMatcher("/github/hooks/**"), new HttpStatusEntryPoint(HttpStatus.UNAUTHORIZED)); entryPoints.put(new AntPathRequestMatcher("/admin/**"), new GitHubAuthenticationEntryPoint( oauthConfig.getMain(), "user:email,repo:status,admin:repo_hook,admin:org_hook,read:org")); BasicAuthenticationEntryPoint basicEntryPoint = new BasicAuthenticationEntryPoint(); basicEntryPoint.setRealmName("Pivotal CLA"); entryPoints.put(new AntPathRequestMatcher("/manage/**"), basicEntryPoint); DelegatingAuthenticationEntryPoint entryPoint = new DelegatingAuthenticationEntryPoint(entryPoints); entryPoint.setDefaultEntryPoint(new GitHubAuthenticationEntryPoint(oauthConfig.getMain(), "user:email")); return entryPoint; }
From source file:architecture.user.spring.config.SecurityConfig.java
@Bean(name = "authenticationEntryPoint") public DelegatingAuthenticationEntryPoint authenticationEntryPoint() { LinkedHashMap<RequestMatcher, AuthenticationEntryPoint> entryPoints = new LinkedHashMap<RequestMatcher, AuthenticationEntryPoint>(); entryPoints.put(nonAjaxRequestMatcher(), loginUrlAuthenticationEntryPoint()); DelegatingAuthenticationEntryPoint authenticationEntryPoint = new DelegatingAuthenticationEntryPoint( entryPoints);/*w w w.ja va 2s.c om*/ authenticationEntryPoint.setDefaultEntryPoint(new Http403ForbiddenEntryPoint()); return authenticationEntryPoint; }
From source file:org.opendatakit.configuration.SecurityConfiguration.java
@Bean
DelegatingAuthenticationEntryPoint delegatingAuthenticationEntryPoint()
throws ODKEntityNotFoundException, ODKOverQuotaException, ODKDatastoreException, PropertyVetoException {
LinkedHashMap<RequestMatcher, AuthenticationEntryPoint> entryPoints = new LinkedHashMap<RequestMatcher, AuthenticationEntryPoint>();
entryPoints.put(new RequestHeaderRequestMatcher("X-OpenRosa-Version", "1.0"), digestEntryPoint());
entryPoints.put(new RequestHeaderRequestMatcher("X-OpenDataKit-Version", "2.0"), digestEntryPoint());
DelegatingAuthenticationEntryPoint delegatingAuthenticationEntryPoint = new DelegatingAuthenticationEntryPoint(
entryPoints);//from w w w. j a v a2 s .com
delegatingAuthenticationEntryPoint.setDefaultEntryPoint(digestEntryPoint());
return delegatingAuthenticationEntryPoint;
}
From source file:org.apache.atlas.web.security.AtlasSecurityConfig.java
public DelegatingAuthenticationEntryPoint getDelegatingAuthenticationEntryPoint() { LinkedHashMap<RequestMatcher, AuthenticationEntryPoint> entryPointMap = new LinkedHashMap<>(); entryPointMap.put(new RequestHeaderRequestMatcher("User-Agent", "Mozilla"), atlasAuthenticationEntryPoint); DelegatingAuthenticationEntryPoint entryPoint = new DelegatingAuthenticationEntryPoint(entryPointMap); entryPoint.setDefaultEntryPoint(getAuthenticationEntryPoint()); return entryPoint; }