Class SecurityUtils<T extends Serializable>
java.lang.Object
systems.dennis.shared.utils.ApplicationContext
systems.dennis.shared.auth_client.SecurityUtils<T>
- All Implemented Interfaces:
systems.dennis.shared.annotations.security.ISecurityUtils<T>
@Service
@Primary
public class SecurityUtils<T extends Serializable>
extends systems.dennis.shared.utils.ApplicationContext
implements systems.dennis.shared.annotations.security.ISecurityUtils<T>
-
Field Summary
FieldsFields inherited from interface systems.dennis.shared.annotations.security.ISecurityUtils
USER_ID_FIELD -
Constructor Summary
ConstructorsConstructorDescriptionSecurityUtils(systems.dennis.shared.config.WebContext context, jakarta.servlet.http.HttpServletRequest request) -
Method Summary
Modifier and TypeMethodDescriptionvoidassignUser(systems.dennis.shared.entity.AbstractEntity<T> pojo) voidassignUser(systems.dennis.shared.entity.AbstractEntity<T> pojo, systems.dennis.shared.entity.AbstractEntity<T> pojoOriginal) get()systems.dennis.shared.entity.TokenDatagetToken()booleanbooleanisAdmin()Methods inherited from class systems.dennis.shared.utils.ApplicationContext
canEqual, equals, getBean, getContext, getCurrentUser, getDefaultLogger, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface systems.dennis.shared.annotations.security.ISecurityUtils
belongsToMeQuery, belongsToMeSpecification, isMy
-
Field Details
-
AUTHORIZATION_HEADER
- See Also:
-
-
Constructor Details
-
Method Details
-
getUserDataId
- Specified by:
getUserDataIdin interfacesystems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
-
tokenFromHeader
public UserTokenDTO tokenFromHeader() throws systems.dennis.shared.exceptions.AuthorizationNotFoundException- Throws:
systems.dennis.shared.exceptions.AuthorizationNotFoundException
-
getToken
public systems.dennis.shared.entity.TokenData getToken()- Specified by:
getTokenin interfacesystems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
-
isAdmin
public boolean isAdmin()- Specified by:
isAdminin interfacesystems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
-
hasRole
- Specified by:
hasRolein interfacesystems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
-
getUserLanguage
- Specified by:
getUserLanguagein interfacesystems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
-
get
-