Interface IFidoDeviceWebService

  • All Known Subinterfaces:
    ClientSideFidoDeviceService, ClientSideService

    public interface IFidoDeviceWebService
    SCIM service interface with available methods to manipulate Fido devices.

    Notes:

    The parameters attrsList and excludedAttrsList found in methods of this interface are aimed at specifying the "attributes" and "excludedAttributes" query params regarded in section 3.9 of SCIM spec protocol document (RFC 7644).

    Every SCIM service operation that returns resources (e.g Users, Groups, etc.) offers the possibility to specify which attributes can be included for every resource part of the response. The default behavior is returning those attributes that according to the resource Schema have returnability = "always" in addition to those with returnability = "default".

    attrsList is used to override the default attribute set, so when supplying a not-null or not empty String, the attributes included in the resource(s) of the response will be those with returnability = "always" as well as those specified by attrsList.

    This parameter consists of a comma-separated list of attribute names. An example of a valid value for attrsList when the resource of interest is User, could be: userName, active, name.familyName, addresses, emails.value, emails.type, urn:ietf:params:scim:schemas:extension:gluu:2.0:User:myCustomAttribute

    Note that attributes marked with returnability = "never" (such as a User password) will always be filtered out from the output, so including such attributes in attrsList has no effect.

    excludedAttrsList is used to specify the set of attributes that should be excluded from the default attribute set. In this sense, the resources found in the response will include the attributes whose returnability = "always" in addition to those with returnability = "default" except for those included in excludedAttrsList. As with attrsList, this parameter must be in the form of a comma-separated list of attribute names.

    attrsList and excludedAttrsList are mutually exclusive: if both are provided only attrsList will be taken into account to compute the output attribute set.

    • Method Detail

      • getDeviceById

        @Path("/scim/v2/FidoDevices/{id}")
        @GET
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        jakarta.ws.rs.core.Response getDeviceById​(@PathParam("id")
                                                  String id,
                                                  @QueryParam("userId")
                                                  String userId,
                                                  @QueryParam("attributes")
                                                  String attrsList,
                                                  @QueryParam("excludedAttributes")
                                                  String excludedAttrsList)
        Service method that retrieves a Fido device resource using GET (as per section 3.4.1 of RFC 7644).
        Parameters:
        id - The "id" attribute of the resource to retrieve
        userId - The identifier of the user that owns the device ("id" attribute, not "userName" attribute)
        attrsList - See notes about attributes query param
        excludedAttrsList - See notes about excludedAttributes query param
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 200 and a FidoDeviceResource in the entity body (the resource retrieved)
      • updateDevice

        @Path("/scim/v2/FidoDevices/{id}")
        @PUT
        @Consumes({"application/scim+json","application/json"})
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        jakarta.ws.rs.core.Response updateDevice​(FidoDeviceResource fidoDeviceResource,
                                                 @PathParam("id")
                                                 String id,
                                                 @QueryParam("attributes")
                                                 String attrsList,
                                                 @QueryParam("excludedAttributes")
                                                 String excludedAttrsList)
        Service method that allows updating a Fido device resource via PUT (as per section 3.5.1 of RFC 7644).

        This operation is not suitable to delete/remove/nullify attributes. For this purpose you can use the PATCH operation instead. PUT is intended to do replacements using the (not-null) values supplied in fidoDeviceResource parameter.

        To learn more about how the update works, read the replacement rules found at ScimResourceUtil#transferToResourceReplace.

        Parameters:
        fidoDeviceResource - An object that contains the data to update on a destination resource. There is no need to supply a full resource, just provide one with the attributes which are intended to be replaced in the destination
        id - The "id" attribute of the resource to update (destination)
        attrsList - See notes about attributes query param
        excludedAttrsList - See notes about excludedAttributes query param
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 200 and a FidoDeviceResource in the entity body (the resource after the update took place)
      • deleteDevice

        @Path("/scim/v2/FidoDevices/{id}")
        @DELETE
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        jakarta.ws.rs.core.Response deleteDevice​(@PathParam("id")
                                                 String id)
        Removes a Fido device via DELETE HTTP method (see section 3.6 of RFC 7644).
        Parameters:
        id - The "id" attribute of the resource to be removed
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 204 (no content)
      • searchDevices

        @Path("/scim/v2/FidoDevices")
        @GET
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        jakarta.ws.rs.core.Response searchDevices​(@QueryParam("userId")
                                                  String userId,
                                                  @QueryParam("filter")
                                                  String filter,
                                                  @QueryParam("startIndex")
                                                  Integer startIndex,
                                                  @QueryParam("count")
                                                  Integer count,
                                                  @QueryParam("sortBy")
                                                  String sortBy,
                                                  @QueryParam("sortOrder")
                                                  String sortOrder,
                                                  @QueryParam("attributes")
                                                  String attrsList,
                                                  @QueryParam("excludedAttributes")
                                                  String excludedAttrsList)
        Sends a search query for Fido devices using GET (see section 3.4.2 of RFC 7644).
        Parameters:
        userId - An (optional) user identifier in order to focus the search on a specific person.
        filter - A filter expression so that the search will return only those resources matching the expression. To learn more about SCIM filter expressions and operators, see section 3.4.2.2 of RFC 7644.
        startIndex - The 1-based index of the first query result. If a negative integer or null is provided, the search is performed as if 1 was provided as value.
        count - Specifies the desired maximum number of query results per page the response must include. If null is provided, the maximum supported by the server is used. If count is zero, this is interpreted as no results should be included (only the total amount is). If a negative number is supplied, the search is performed as if zero was provided as value.
        sortBy - Specifies the attribute whose value will be used to order the returned resources. If sortBy is null the results will be sorted by userName attribute.
        sortOrder - The order in which the sortBy parameter is applied. Allowed values are "ascending" or "descending", being "ascending" the default if null or an unknown value is passed.
        attrsList - See notes about attributes query param
        excludedAttrsList - See notes about excludedAttributes query param
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 200 and a ListResponse in the entity body (holding a collection of SCIM resources)
      • searchDevicesPost

        @Path("/scim/v2/FidoDevices/.search")
        @POST
        @Consumes({"application/scim+json","application/json"})
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        jakarta.ws.rs.core.Response searchDevicesPost​(SearchRequest searchRequest,
                                                      @QueryParam("userId")
                                                      String userId)
        Sends a search query for Fido devices using POST (see section 3.4.3 of RFC 7644).
        Parameters:
        searchRequest - An object containing the parameters for the query to execute. These are the same parameters passed in the URL for searches, for example in searchDevices
        userId - An (optional) user identifier in order to focus the search on a specific person.
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this request should contain a status code of 200 and a ListResponse in the entity body (holding a collection of SCIM resources)
      • patchDevice

        @Path("/scim/v2/FidoDevices/{id}")
        @PATCH
        @Consumes({"application/scim+json","application/json"})
        @Produces({"application/scim+json; charset=utf-8","application/json; charset=utf-8"})
        @HeaderParam("Accept")
        @DefaultValue("application/scim+json")
        jakarta.ws.rs.core.Response patchDevice​(PatchRequest request,
                                                @PathParam("id")
                                                String id,
                                                @QueryParam("attributes")
                                                String attrsList,
                                                @QueryParam("excludedAttributes")
                                                String excludedAttrsList)
        Service method that allows to modify a Fido device resource via PATCH (see section 3.5.2 of RFC 7644).

        Note that patching offers a fine-grained control over the attributes to modify. While PUT is more intended to replace attribute values, PATCH allows to perform localized updates, removals and additions in certain portions of the target resource.

        Parameters:
        request - A PatchRequest that contains the operations to apply upon the resource being updated
        id - The id of the resource to update
        attrsList - See notes about attributes query param
        excludedAttrsList - See notes about excludedAttributes query param
        Returns:
        An object abstracting the response obtained from the server to this request. A succesful response for this operation should contain a status code of 200 and a FidoDeviceResource in the entity body (the resource after modifications took place)