Search in sources :

Example 6 with ResourceType

use of org.gluu.oxtrust.model.scim2.provider.ResourceType in project oxTrust by GluuFederation.

the class ResourceTypeWS method getResourceTypeGroup.

@Path("Group")
@GET
@Produces(Constants.MEDIA_TYPE_SCIM_JSON + "; charset=utf-8")
@HeaderParam("Accept")
@DefaultValue(Constants.MEDIA_TYPE_SCIM_JSON)
public Response getResourceTypeGroup(@HeaderParam("Authorization") String authorization) throws Exception {
    ResourceType groupResourceType = new ResourceType();
    groupResourceType.setDescription(Constants.GROUP_CORE_SCHEMA_DESCRIPTION);
    groupResourceType.setEndpoint("/v2/Groups");
    groupResourceType.setName(Constants.GROUP_CORE_SCHEMA_NAME);
    groupResourceType.setId(Constants.GROUP_CORE_SCHEMA_NAME);
    groupResourceType.setSchema(Constants.GROUP_CORE_SCHEMA_ID);
    Meta groupMeta = new Meta();
    groupMeta.setLocation(appConfiguration.getBaseEndpoint() + "/scim/v2/ResourceTypes/Group");
    groupMeta.setResourceType("ResourceType");
    groupResourceType.setMeta(groupMeta);
    // ResourceType[] resourceTypes = new ResourceType[]{groupResourceType};
    URI location = new URI(appConfiguration.getBaseEndpoint() + "/scim/v2/ResourceTypes/Group");
    // return Response.ok(resourceTypes).location(location).build();
    return Response.ok(groupResourceType).location(location).build();
}
Also used : Meta(org.gluu.oxtrust.model.scim2.Meta) ResourceType(org.gluu.oxtrust.model.scim2.provider.ResourceType) URI(java.net.URI) Path(javax.ws.rs.Path) DefaultValue(javax.ws.rs.DefaultValue) HeaderParam(javax.ws.rs.HeaderParam) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 7 with ResourceType

use of org.gluu.oxtrust.model.scim2.provider.ResourceType in project oxTrust by GluuFederation.

the class ResourceTypeWS method getResourceTypeFidoDevice.

@Path("FidoDevice")
@GET
@Produces(Constants.MEDIA_TYPE_SCIM_JSON + "; charset=utf-8")
@HeaderParam("Accept")
@DefaultValue(Constants.MEDIA_TYPE_SCIM_JSON)
public Response getResourceTypeFidoDevice(@HeaderParam("Authorization") String authorization) throws Exception {
    ResourceType fidoDeviceResourceType = new ResourceType();
    fidoDeviceResourceType.setDescription(Constants.FIDO_DEVICES_CORE_SCHEMA_DESCRIPTION);
    fidoDeviceResourceType.setEndpoint("/v2/FidoDevices");
    fidoDeviceResourceType.setName(Constants.FIDO_DEVICES_CORE_SCHEMA_NAME);
    fidoDeviceResourceType.setId(Constants.FIDO_DEVICES_CORE_SCHEMA_NAME);
    fidoDeviceResourceType.setSchema(Constants.FIDO_DEVICES_CORE_SCHEMA_ID);
    Meta fidoDeviceMeta = new Meta();
    fidoDeviceMeta.setLocation(appConfiguration.getBaseEndpoint() + "/scim/v2/ResourceTypes/FidoDevice");
    fidoDeviceMeta.setResourceType("ResourceType");
    fidoDeviceResourceType.setMeta(fidoDeviceMeta);
    URI location = new URI(appConfiguration.getBaseEndpoint() + "/scim/v2/ResourceTypes/FidoDevice");
    return Response.ok(fidoDeviceResourceType).location(location).build();
}
Also used : Meta(org.gluu.oxtrust.model.scim2.Meta) ResourceType(org.gluu.oxtrust.model.scim2.provider.ResourceType) URI(java.net.URI) Path(javax.ws.rs.Path) DefaultValue(javax.ws.rs.DefaultValue) HeaderParam(javax.ws.rs.HeaderParam) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET)

Example 8 with ResourceType

use of org.gluu.oxtrust.model.scim2.provider.ResourceType in project oxTrust by GluuFederation.

the class ResourceTypeWS method getFidoDeviceResourceType.

private ResourceType getFidoDeviceResourceType() {
    ResourceType fidoRT = new ResourceType();
    fillResourceType(fidoRT, ScimResourceUtil.getSchemaAnnotation(FidoDeviceResource.class), fidoService.getEndpointUrl(), getResourceLocation(FIDO_SUFFIX), null);
    return fidoRT;
}
Also used : FidoDeviceResource(org.gluu.oxtrust.model.scim2.fido.FidoDeviceResource) ResourceType(org.gluu.oxtrust.model.scim2.provider.resourcetypes.ResourceType)

Aggregations

Meta (org.gluu.oxtrust.model.scim2.Meta)5 URI (java.net.URI)4 DefaultValue (javax.ws.rs.DefaultValue)4 GET (javax.ws.rs.GET)4 HeaderParam (javax.ws.rs.HeaderParam)4 Produces (javax.ws.rs.Produces)4 ResourceType (org.gluu.oxtrust.model.scim2.provider.ResourceType)4 ArrayList (java.util.ArrayList)3 Path (javax.ws.rs.Path)3 ResourceType (org.gluu.oxtrust.model.scim2.provider.resourcetypes.ResourceType)3 SchemaExtensionHolder (org.gluu.oxtrust.model.scim2.schema.SchemaExtensionHolder)2 ListResponse (org.gluu.oxtrust.model.scim2.ListResponse)1 Resource (org.gluu.oxtrust.model.scim2.Resource)1 Extension (org.gluu.oxtrust.model.scim2.extensions.Extension)1 FidoDeviceResource (org.gluu.oxtrust.model.scim2.fido.FidoDeviceResource)1 GroupResource (org.gluu.oxtrust.model.scim2.group.GroupResource)1 SchemaExtensionHolder (org.gluu.oxtrust.model.scim2.provider.resourcetypes.SchemaExtensionHolder)1 UserResource (org.gluu.oxtrust.model.scim2.user.UserResource)1