Package org.duracloud.security.impl
Class DuracloudAuthProvider
- java.lang.Object
-
- org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
-
- org.springframework.security.authentication.dao.DaoAuthenticationProvider
-
- org.duracloud.security.impl.DuracloudAuthProvider
-
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.beans.factory.InitializingBean,org.springframework.context.MessageSourceAware,org.springframework.security.authentication.AuthenticationProvider
public class DuracloudAuthProvider extends org.springframework.security.authentication.dao.DaoAuthenticationProviderAuthentication provider which allows default authentication behavior of the spring DaoAuthenticationProvider, but adds a check to see if the user's request originated from an IP address which is within the defined valid IP ranges. If a user has no defined valid IP ranges, any IP is accepted.- Author:
- Bill Branan Date: 4/22/2015
-
-
Constructor Summary
Constructors Constructor Description DuracloudAuthProvider(DuracloudUserDetailsService userDetailsService, Object passwordEncoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidadditionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication)protected booleanipInRange(String ipAddress, String range)Determines if a given IP address is in the given IP range.-
Methods inherited from class org.springframework.security.authentication.dao.DaoAuthenticationProvider
doAfterPropertiesSet, getPasswordEncoder, getSaltSource, getUserDetailsService, retrieveUser, setPasswordEncoder, setSaltSource, setUserDetailsService
-
Methods inherited from class org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider
afterPropertiesSet, authenticate, createSuccessAuthentication, getPostAuthenticationChecks, getPreAuthenticationChecks, getUserCache, isForcePrincipalAsString, isHideUserNotFoundExceptions, setAuthoritiesMapper, setForcePrincipalAsString, setHideUserNotFoundExceptions, setMessageSource, setPostAuthenticationChecks, setPreAuthenticationChecks, setUserCache, supports
-
-
-
-
Constructor Detail
-
DuracloudAuthProvider
public DuracloudAuthProvider(DuracloudUserDetailsService userDetailsService, Object passwordEncoder)
-
-
Method Detail
-
additionalAuthenticationChecks
protected void additionalAuthenticationChecks(org.springframework.security.core.userdetails.UserDetails userDetails, org.springframework.security.authentication.UsernamePasswordAuthenticationToken authentication) throws org.springframework.security.core.AuthenticationException- Overrides:
additionalAuthenticationChecksin classorg.springframework.security.authentication.dao.DaoAuthenticationProvider- Throws:
org.springframework.security.core.AuthenticationException
-
-