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

    Fields
    Modifier and Type
    Field
    Description
    static final String
     

    Fields inherited from class systems.dennis.shared.utils.ApplicationContext

    CREATED_FIELDS_MAP
  • Constructor Summary

    Constructors
    Constructor
    Description
    SecurityUtils(systems.dennis.shared.config.WebContext context, jakarta.servlet.http.HttpServletRequest request, systems.dennis.shared.beans.IdToAuthorizationIdBean id2id)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
     
     
    systems.dennis.shared.entity.TokenData
     
     
     
    boolean
     
    boolean
     
     

    Methods inherited from class systems.dennis.shared.utils.ApplicationContext

    canEqual, equals, getBean, getContext, getCurrentUser, getDefaultLogger, hashCode, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait

    Methods inherited from interface systems.dennis.shared.annotations.security.ISecurityUtils

    belongsToMeQuery, belongsToMeSpecification, isMy
  • Field Details

  • Constructor Details

    • SecurityUtils

      public SecurityUtils(systems.dennis.shared.config.WebContext context, jakarta.servlet.http.HttpServletRequest request, systems.dennis.shared.beans.IdToAuthorizationIdBean id2id)
  • Method Details

    • getUserDataId

      public T getUserDataId()
      Specified by:
      getUserDataId in interface systems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
    • tokenFromHeader

      public UserTokenDTO tokenFromHeader() throws systems.dennis.shared.exceptions.AuthorizationNotFoundException
      Throws:
      systems.dennis.shared.exceptions.AuthorizationNotFoundException
    • getScope

      public String getScope()
      Specified by:
      getScope in interface systems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
    • getToken

      public systems.dennis.shared.entity.TokenData getToken()
      Specified by:
      getToken in interface systems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
    • isAdmin

      public boolean isAdmin()
      Specified by:
      isAdmin in interface systems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
    • hasRole

      public boolean hasRole(String role)
      Specified by:
      hasRole in interface systems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
    • getUserLanguage

      public String getUserLanguage()
      Specified by:
      getUserLanguage in interface systems.dennis.shared.annotations.security.ISecurityUtils<T extends Serializable>
    • get

      public UserTokenDTO get()