Class RejectUserPreAuthenticationChecks
java.lang.Object
org.springframework.security.authentication.AccountStatusUserDetailsChecker
de.hybris.platform.spring.security.RejectUserPreAuthenticationChecks
- All Implemented Interfaces:
org.springframework.beans.factory.Aware,org.springframework.context.MessageSourceAware,org.springframework.security.core.userdetails.UserDetailsChecker
public class RejectUserPreAuthenticationChecks
extends org.springframework.security.authentication.AccountStatusUserDetailsChecker
Used by
CoreAuthenticationProvider.
The setup below rejects login attempts of user 'foo' (UID based restriction) and of customers in general (type based restriction).
See: /ext/cockpit/resources/cockpit/cockpit-spring-security.xml
foo
Customer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.springframework.context.support.MessageSourceAccessor -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcheck(org.springframework.security.core.userdetails.UserDetails userDetails) protected voidcheckForAllowedGroups(User user) protected voidcheckUserType(User user) protected ComposedTypegetComposedType(String code) protected PKgetPKFromUserDetails(org.springframework.security.core.userdetails.UserDetails userDetails) protected UsergetUserByLogin(String login) protected UsergetUserByPK(PK userPK) voidsetAllowedUserGroups(Collection<String> allowedUserGroups) voidsetAllowedUserTypes(Collection<String> allowedUserTypes) Methods inherited from class org.springframework.security.authentication.AccountStatusUserDetailsChecker
setMessageSource
-
Field Details
-
messages
protected org.springframework.context.support.MessageSourceAccessor messages
-
-
Constructor Details
-
RejectUserPreAuthenticationChecks
public RejectUserPreAuthenticationChecks()
-
-
Method Details
-
setAllowedUserTypes
-
setAllowedUserGroups
-
check
public void check(org.springframework.security.core.userdetails.UserDetails userDetails) - Specified by:
checkin interfaceorg.springframework.security.core.userdetails.UserDetailsChecker- Overrides:
checkin classorg.springframework.security.authentication.AccountStatusUserDetailsChecker
-
getPKFromUserDetails
protected PK getPKFromUserDetails(org.springframework.security.core.userdetails.UserDetails userDetails) -
getUserByPK
-
getUserByLogin
-
checkForAllowedGroups
-
checkUserType
-
getComposedType
-