Class UserProfileServiceImpl
- java.lang.Object
-
- com.evolveum.midpoint.model.impl.security.UserProfileServiceImpl
-
- All Implemented Interfaces:
UserProfileService
,MidPointPrincipalManager
,OwnerResolver
,org.springframework.beans.factory.Aware
,org.springframework.context.MessageSourceAware
,org.springframework.security.core.userdetails.UserDetailsService
,org.springframework.security.ldap.userdetails.UserDetailsContextMapper
@Service("userDetailsService") public class UserProfileServiceImpl extends Object implements UserProfileService, org.springframework.security.core.userdetails.UserDetailsService, org.springframework.security.ldap.userdetails.UserDetailsContextMapper, org.springframework.context.MessageSourceAware
- Author:
- lazyman, semancik
-
-
Field Summary
-
Fields inherited from interface com.evolveum.midpoint.security.api.MidPointPrincipalManager
DOT_CLASS, OPERATION_GET_PRINCIPAL, OPERATION_UPDATE_USER
-
Fields inherited from interface com.evolveum.midpoint.model.api.authentication.UserProfileService
EVENT_LIST_USER_SESSION
-
-
Constructor Summary
Constructors Constructor Description UserProfileServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<UserSessionManagementType>
getLocalLoggedInPrincipals()
MidPointUserProfilePrincipal
getPrincipal(PrismObject<UserType> user)
MidPointUserProfilePrincipal
getPrincipal(PrismObject<UserType> user, AuthorizationTransformer authorizationTransformer, OperationResult result)
MidPointUserProfilePrincipal
getPrincipal(String username)
MidPointUserProfilePrincipal
getPrincipalByOid(String oid)
org.springframework.security.core.userdetails.UserDetails
loadUserByUsername(String username)
org.springframework.security.core.userdetails.UserDetails
mapUserFromContext(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
void
mapUserToContext(org.springframework.security.core.userdetails.UserDetails user, org.springframework.ldap.core.DirContextAdapter ctx)
<F extends FocusType,O extends ObjectType>
PrismObject<F>resolveOwner(PrismObject<O> object)
void
setMessageSource(org.springframework.context.MessageSource messageSource)
void
terminateLocalSessions(TerminateSessionEvent terminateSessionEvent)
void
updateUser(MidPointPrincipal principal, Collection<? extends ItemDelta<?,?>> itemDeltas)
-
-
-
Method Detail
-
setMessageSource
public void setMessageSource(org.springframework.context.MessageSource messageSource)
- Specified by:
setMessageSource
in interfaceorg.springframework.context.MessageSourceAware
-
getPrincipal
public MidPointUserProfilePrincipal getPrincipal(String username) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipal
in interfaceMidPointPrincipalManager
- Specified by:
getPrincipal
in interfaceUserProfileService
- Throws:
ObjectNotFoundException
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getPrincipalByOid
public MidPointUserProfilePrincipal getPrincipalByOid(String oid) throws ObjectNotFoundException, SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipalByOid
in interfaceMidPointPrincipalManager
- Specified by:
getPrincipalByOid
in interfaceUserProfileService
- Throws:
ObjectNotFoundException
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getPrincipal
public MidPointUserProfilePrincipal getPrincipal(PrismObject<UserType> user) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipal
in interfaceMidPointPrincipalManager
- Specified by:
getPrincipal
in interfaceUserProfileService
- Throws:
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getPrincipal
public MidPointUserProfilePrincipal getPrincipal(PrismObject<UserType> user, AuthorizationTransformer authorizationTransformer, OperationResult result) throws SchemaException, CommunicationException, ConfigurationException, SecurityViolationException, ExpressionEvaluationException
- Specified by:
getPrincipal
in interfaceMidPointPrincipalManager
- Specified by:
getPrincipal
in interfaceUserProfileService
- Throws:
SchemaException
CommunicationException
ConfigurationException
SecurityViolationException
ExpressionEvaluationException
-
getLocalLoggedInPrincipals
public List<UserSessionManagementType> getLocalLoggedInPrincipals()
- Specified by:
getLocalLoggedInPrincipals
in interfaceUserProfileService
-
terminateLocalSessions
public void terminateLocalSessions(TerminateSessionEvent terminateSessionEvent)
- Specified by:
terminateLocalSessions
in interfaceUserProfileService
-
updateUser
public void updateUser(MidPointPrincipal principal, Collection<? extends ItemDelta<?,?>> itemDeltas)
- Specified by:
updateUser
in interfaceMidPointPrincipalManager
- Specified by:
updateUser
in interfaceUserProfileService
-
resolveOwner
public <F extends FocusType,O extends ObjectType> PrismObject<F> resolveOwner(PrismObject<O> object)
- Specified by:
resolveOwner
in interfaceOwnerResolver
-
loadUserByUsername
public org.springframework.security.core.userdetails.UserDetails loadUserByUsername(String username) throws org.springframework.security.core.userdetails.UsernameNotFoundException
- Specified by:
loadUserByUsername
in interfaceorg.springframework.security.core.userdetails.UserDetailsService
- Throws:
org.springframework.security.core.userdetails.UsernameNotFoundException
-
mapUserFromContext
public org.springframework.security.core.userdetails.UserDetails mapUserFromContext(org.springframework.ldap.core.DirContextOperations ctx, String username, Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
- Specified by:
mapUserFromContext
in interfaceorg.springframework.security.ldap.userdetails.UserDetailsContextMapper
-
mapUserToContext
public void mapUserToContext(org.springframework.security.core.userdetails.UserDetails user, org.springframework.ldap.core.DirContextAdapter ctx)
- Specified by:
mapUserToContext
in interfaceorg.springframework.security.ldap.userdetails.UserDetailsContextMapper
-
-