Class AccessIdController


  • @RestController
    @EnableHypermediaSupport(type=HAL)
    public class AccessIdController
    extends Object
    Controller for Access Id validation.
    • Constructor Detail

      • AccessIdController

        @Autowired
        public AccessIdController​(LdapClient ldapClient,
                                  pro.taskana.common.api.TaskanaEngine taskanaEngine)
    • Method Detail

      • searchUsersAndGroups

        @GetMapping(path="/api/v1/access-ids")
        public org.springframework.http.ResponseEntity<List<AccessIdRepresentationModel>> searchUsersAndGroups​(@RequestParam("search-for")
                                                                                                               String searchFor)
                                                                                                        throws pro.taskana.common.api.exceptions.InvalidArgumentException,
                                                                                                               pro.taskana.common.api.exceptions.NotAuthorizedException
        This endpoint searches a provided access Id in the configured ldap.
        Parameters:
        searchFor - the Access Id which should be searched for.
        Returns:
        a list of all found Access Ids
        Throws:
        pro.taskana.common.api.exceptions.InvalidArgumentException - if the provided search for Access Id is shorter than the configured one.
        pro.taskana.common.api.exceptions.NotAuthorizedException - if the current user is not ADMIN or BUSINESS_ADMIN.
      • getGroupsByAccessId

        @GetMapping(path="/api/v1/access-ids/groups")
        public org.springframework.http.ResponseEntity<List<AccessIdRepresentationModel>> getGroupsByAccessId​(@RequestParam("access-id")
                                                                                                              String accessId)
                                                                                                       throws pro.taskana.common.api.exceptions.InvalidArgumentException,
                                                                                                              pro.taskana.common.api.exceptions.NotAuthorizedException
        This endpoint retrieves all groups a given Access Id belongs to.
        Parameters:
        accessId - the Access Id whose groups should be determined.
        Returns:
        a list of the group Access Ids the requested Access Id belongs to
        Throws:
        pro.taskana.common.api.exceptions.InvalidArgumentException - if the requested Access Id does not exist or is not unique.
        pro.taskana.common.api.exceptions.NotAuthorizedException - if the current user is not ADMIN or BUSINESS_ADMIN.