org.defendev.common.domain.iam.IDefendevUserDetails Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of common-jdk Show documentation
Show all versions of common-jdk Show documentation
Common utils purely based on JDK and no other dependencies. Only exception being for org.jetbrains:annotations for building stratgic Kotlin language compatibility.Another only-exception is Apache Commons Lang3.
The newest version!
package org.defendev.common.domain.iam;
import java.util.Map;
import java.util.Set;
/**
* Intended to be implemented by classes used in Spring Security extension points:
*
* - returned by org.springframework.security.core.userdetails.UserDetailsService.loadUserByUsername()
* - returned by org.springframework.security.oauth2.client.oidc.userinfo.OidcUserService.loadUser()
* - stored in security context - accessible by SecurityContextHolder.getContext().getAuthentication().getPrincipal()
*
*
* In contrast to {@link org.defendev.common.domain.iam.service.dto.IUserDetailsDto}, objects implementing this
* interface are intended for internal use and not for disclosure to web clients.
*
*/
public interface IDefendevUserDetails {
String getUsername();
Set getRoles();
Map> getPrivilegeToOwnershipUnit();
}