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 public class SecurityUtils<T extends Serializable> extends systems.dennis.shared.utils.ApplicationContext implements systems.dennis.shared.annotations.security.ISecurityUtils<T>
  • Field Details

    • AUTHORIZATION_HEADER

      public static final String AUTHORIZATION_HEADER
      See Also:
    • AUTH_TYPE_HEADER

      public static String AUTH_TYPE_HEADER
    • AUTH_SCOPE_HEADER

      public static String AUTH_SCOPE_HEADER
  • Constructor Details

    • SecurityUtils

      public SecurityUtils(systems.dennis.shared.config.WebContext context, jakarta.servlet.http.HttpServletRequest request)
  • 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()