Class AccountResource


  • @RestController
    public class AccountResource
    extends Object
    REST controller for managing the current user's account.
    Author:
    Joram Barrez
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected Collection<org.flowable.ui.common.rest.idm.CurrentUserProvider> currentUserProviders  
    • Constructor Summary

      Constructors 
      Constructor Description
      AccountResource​(org.springframework.beans.factory.ObjectProvider<org.flowable.ui.common.rest.idm.CurrentUserProvider> currentUserProviders)  
    • Field Detail

      • currentUserProviders

        protected final Collection<org.flowable.ui.common.rest.idm.CurrentUserProvider> currentUserProviders
    • Constructor Detail

      • AccountResource

        public AccountResource​(org.springframework.beans.factory.ObjectProvider<org.flowable.ui.common.rest.idm.CurrentUserProvider> currentUserProviders)
    • Method Detail

      • isAuthenticated

        @GetMapping(value="/rest/authenticate",
                    produces="application/json")
        public com.fasterxml.jackson.databind.node.ObjectNode isAuthenticated​(javax.servlet.http.HttpServletRequest request)
        GET /rest/authenticate -> check if the user is authenticated, and return its full name.
      • getAccount

        @GetMapping(value="/rest/account",
                    produces="application/json")
        public org.flowable.ui.common.model.UserRepresentation getAccount​(org.springframework.security.core.Authentication authentication)
        GET /rest/account -> get the current user.
      • getCurrentUserRepresentation

        protected org.flowable.ui.common.model.UserRepresentation getCurrentUserRepresentation​(String currentUserId)