Package pro.taskana.common.rest
Class AccessIdController
- java.lang.Object
-
- pro.taskana.common.rest.AccessIdController
-
@RestController @EnableHypermediaSupport(type=HAL) public class AccessIdController extends Object
Controller for Access Id validation.
-
-
Constructor Summary
Constructors Constructor Description AccessIdController(LdapClient ldapClient, pro.taskana.common.api.TaskanaEngine taskanaEngine)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<List<AccessIdRepresentationModel>>getGroupsByAccessId(String accessId)This endpoint retrieves all groups a given Access Id belongs to.org.springframework.http.ResponseEntity<List<AccessIdRepresentationModel>>searchUsersAndGroups(String searchFor)This endpoint searches a provided access Id in the configured ldap.
-
-
-
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.
-
-