Class BaseServiceSecurity

    • Constructor Detail

      • BaseServiceSecurity

        public BaseServiceSecurity()
    • Method Detail

      • initialize

        @PostConstruct
        public final void initialize()
      • checkGuest

        protected void checkGuest()
        Makes sure that a guest is invoking the method
      • checkId

        protected void checkId​(Class<? extends SimpleEntity> entityType,
                               Long id)
        Makes sure that the entity with the given id is valid, ignoring if id is null
      • checkIds

        protected void checkIds​(Class<? extends SimpleEntity> entityType,
                                Collection<Long> ids)
        Makes sure that all entities with the given ids are valid, ignoring nulls / empty collections
      • checkInternalName

        protected void checkInternalName​(Class<? extends SimpleEntity> entityType,
                                         String internalName)
        Makes sure that the entity with the given internal name is valid, ignoring if internal name is null
      • checkLoggedIn

        protected void checkLoggedIn()
        Makes sure that a logged user is invoking the method
      • checkManagesUser

        protected BasicUser checkManagesUser​(IUser user)
      • checkRelatesToUser

        protected BasicUser checkRelatesToUser​(IUser user)
      • checkScope

        protected OidcAccessToken checkScope​(Scope... scopes)
        Checks that, if authenticated via OAuth, at least one of the given scopes are granted. No-op when not authenticated with an access token.
      • checkVO

        protected void checkVO​(Class<? extends SimpleEntity> entityType,
                               EntityVO vo)
        Makes sure that the given vo is valid, either attempting to load the entity by id or internal name
      • checkVOs

        protected void checkVOs​(Class<? extends SimpleEntity> entityType,
                                Collection<? extends EntityVO> vos)
        Makes sure that all entities with the given ids are valid, ignoring nulls / empty collections
      • doInitialize

        protected void doInitialize()
      • resolveEntityCheck

        protected abstract EntityCheck<?> resolveEntityCheck()
        Must be implemented in order to return the EntityCheck managed by this security component, or null if none