/forgerock/openam-v13/openam-oauth2/src/main/java/org/forgerock/openam/oauth2/extensions/ |
H A D | ResourceRegistrationFilter.java | 34 * <p>Changes made to the {@literal resourceSet} object will be 37 * @param resourceSet The resource set that will be registered. 39 void beforeResourceRegistration(ResourceSetDescription resourceSet); argument 44 * <p>Changes made to the {@literal resourceSet} object will 47 * @param resourceSet The resource set that was registered. 49 void afterResourceRegistration(ResourceSetDescription resourceSet); argument
|
/forgerock/openam-v13/openam-oauth2-common/oauth2-restlet/src/main/java/org/forgerock/oauth2/restlet/resources/ |
H A D | ResourceSetRegistrationHook.java | 36 * @param resourceSet The Resource Set description. 38 void resourceSetCreated(String realm, ResourceSetDescription resourceSet) throws ServerException; argument 43 * @param resourceSet The Resource Set description. 45 void resourceSetDeleted(String realm, ResourceSetDescription resourceSet) throws ServerException; argument
|
/forgerock/openam/openam-oauth2/src/main/java/org/forgerock/oauth2/restlet/resources/ |
H A D | ResourceSetRegistrationHook.java | 33 * @param resourceSet The Resource Set description. 35 void resourceSetCreated(String realm, ResourceSetDescription resourceSet) throws ServerException; argument 40 * @param resourceSet The Resource Set description. 42 void resourceSetDeleted(String realm, ResourceSetDescription resourceSet) throws ServerException; argument
|
/forgerock/openam/openam-oauth2/src/main/java/org/forgerock/openam/oauth2/extensions/ |
H A D | ResourceRegistrationFilter.java | 34 * <p>Changes made to the {@literal resourceSet} object will be 37 * @param resourceSet The resource set that will be registered. 39 void beforeResourceRegistration(ResourceSetDescription resourceSet); argument 44 * <p>Changes made to the {@literal resourceSet} object will 47 * @param resourceSet The resource set that was registered. 49 void afterResourceRegistration(ResourceSetDescription resourceSet); argument
|
/forgerock/openam-v13/openam-oauth2/src/main/java/org/forgerock/openam/oauth2/resources/ |
H A D | ResourceSetLabelRegistration.java | 60 * @param resourceSet The new resource set. 62 void updateLabelsForNewResourceSet(ResourceSetDescription resourceSet) { argument 63 JsonValue labels = resourceSet.getDescription().get(OAuth2Constants.ResourceSets.LABELS); 65 updateLabels(resourceSet, labels.asSet(String.class), Collections.<String>emptySet()); 73 * @param resourceSet The updated resource set. 75 void updateLabelsForExistingResourceSet(ResourceSetDescription resourceSet) { argument 76 JsonValue newLabels = resourceSet.getDescription().get(OAuth2Constants.ResourceSets.LABELS); 82 Set<ResourceSetLabel> labels = labelsStore.forResourceSet(resourceSet.getRealm(), 83 resourceSet.getResourceOwnerId(), resourceSet 103 updateLabelsForDeletedResourceSet(ResourceSetDescription resourceSet) argument 110 updateLabels(ResourceSetDescription resourceSet, Collection<String> addedLabels, Collection<String> removedLabels) argument [all...] |
/forgerock/openam-v13/openam-uma/src/main/java/org/forgerock/openam/uma/rest/ |
H A D | UmaResourceSetRegistrationHook.java | 90 * @param resourceSet {@inheritDoc} 93 public void resourceSetCreated(String realm, ResourceSetDescription resourceSet) argument 97 for (String umaScope : resourceSet.getScopes()) { 101 .setName(resourceSet.getName() + " - " + resourceSet.getId()) 102 .setUUID(resourceSet.getId()) 111 logger.error("Failed to create resource type for resource set, {}", resourceSet, e); 116 resourceSet.getClientId().toLowerCase()); 121 + resourceSet.getClientId(), e); 131 * @param resourceSet { 134 resourceSetDeleted(String realm, ResourceSetDescription resourceSet) argument [all...] |
H A D | ResourceSetService.java | 113 public void handleResult(ResourceSetDescription resourceSet) { 115 augmentWithPolicy(context, resourceSetId, resourceSet); 172 * @param resourceSet The resource set to check. 177 public boolean isSharedWith(ResourceSetDescription resourceSet, String resourceUserId, String realm) argument 182 resourceSet.getClientId().toLowerCase()); 183 String sharedResourceName = "uma://" + resourceSet.getId(); 255 for (ResourceSetDescription resourceSet : filteredResourceSets) { 256 promises.add(augmentWithPolicy(context, resourceSet.getId(), resourceSet)); 312 for (ResourceSetDescription resourceSet 342 augmentWithPolicy(Context context, final String resourceSetId, final ResourceSetDescription resourceSet) argument [all...] |
H A D | PolicyGraph.java | 69 private final ResourceSetDescription resourceSet; field in class:PolicyGraph 78 * @param resourceSet The resource set being evaluated. 81 public PolicyGraph(ResourceSetDescription resourceSet) { argument 82 this.resourceOwner = resourceSet.getResourceOwnerId(); 83 this.resourceSet = resourceSet; 221 JsonValue newPolicy = UmaPolicy.valueOf(resourceSet, json(object( 222 field(POLICY_ID_KEY, resourceSet.getId()),
|
H A D | ResourceSetResource.java | 199 for (ResourceSetDescription resourceSet : resourceSets) { 200 resources.add(newResource(resourceSet.getId(), 201 getResourceSetJson(resourceSet, userId))); 240 private JsonValue getResourceSetJson(ResourceSetDescription resourceSet, String userId) throws ResourceException { argument 241 HashMap<String, Object> content = new HashMap<String, Object>(resourceSet.asMap()); 242 content.put(ID, resourceSet.getId()); 243 content.put("resourceServer", resourceSet.getClientId()); 244 content.put("resourceOwnerId", resourceSet.getResourceOwnerId()); 247 Set<ResourceSetLabel> labels = umaLabelsStore.forResourceSet(resourceSet.getRealm(), resourceSet [all...] |
H A D | UmaPolicyServiceImpl.java | 236 final ResourceSetDescription resourceSet; 241 resourceSet = getResourceSet(realm, policyId); 242 umaPolicy = UmaPolicy.valueOf(resourceSet, resolveUsernameToUID(context, policy)); 243 boolean canShare = canUserShareResourceSet(resourceSet.getResourceOwnerId(), 244 userId, resourceSet.getClientId(), realm, resourceSet.getId(), 249 validateScopes(resourceSet, umaPolicy.getScopes()); 250 verifyPolicyDoesNotAlreadyExist(context, resourceSet); 262 .thenAsync(new UpdatePolicyGraphStatesFunction<List<ResourceResponse>>(resourceSet, context)) 263 .thenAsync(new AuditAndProduceUmaPolicyFunction(resourceSet, contex 317 private final ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImpl.UpdatePolicyGraphStatesFunction 320 UpdatePolicyGraphStatesFunction(ResourceSetDescription resourceSet, Context context) argument 355 private final ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImpl.AuditAndProduceUmaPolicyFunction 358 AuditAndProduceUmaPolicyFunction(ResourceSetDescription resourceSet, Context context) argument 377 verifyPolicyDoesNotAlreadyExist(Context context, ResourceSetDescription resourceSet) argument 508 private final ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImpl.UpdateUmaPolicyFunction 510 UpdateUmaPolicyFunction(Context context, UmaPolicy updatedUmaPolicy, String resourceSetId, ResourceSetDescription resourceSet) argument 878 validateScopes(ResourceSetDescription resourceSet, Set<String> requestedScopes) argument [all...] |
/forgerock/openam/openam-oauth2/src/main/java/org/forgerock/openam/oauth2/resources/ |
H A D | ResourceSetLabelRegistration.java | 60 * @param resourceSet The new resource set. 62 void updateLabelsForNewResourceSet(ResourceSetDescription resourceSet) { argument 63 JsonValue labels = resourceSet.getDescription().get(OAuth2Constants.ResourceSets.LABELS); 65 updateLabels(resourceSet, labels.asCollection(String.class), Collections.<String>emptySet()); 73 * @param resourceSet The updated resource set. 75 void updateLabelsForExistingResourceSet(ResourceSetDescription resourceSet) { argument 76 JsonValue newLabels = resourceSet.getDescription().get(OAuth2Constants.ResourceSets.LABELS); 82 Set<ResourceSetLabel> labels = labelsStore.forResourceSet(resourceSet.getRealm(), 83 resourceSet.getResourceOwnerId(), resourceSet 103 updateLabelsForDeletedResourceSet(ResourceSetDescription resourceSet) argument 110 updateLabels(ResourceSetDescription resourceSet, Collection<String> addedLabels, Collection<String> removedLabels) argument [all...] |
/forgerock/openam/openam-uma/src/main/java/org/forgerock/openam/uma/rest/ |
H A D | UmaResourceSetRegistrationHook.java | 83 * @param resourceSet {@inheritDoc} 86 public void resourceSetCreated(String realm, ResourceSetDescription resourceSet) argument 90 for (String umaScope : resourceSet.getScopes()) { 94 .setName(resourceSet.getName() + " - " + resourceSet.getId()) 95 .setUUID(resourceSet.getId()) 104 logger.error("Failed to create resource type for resource set, {}", resourceSet, e); 109 Application application = appService.getApplication(resourceSet.getClientId().toLowerCase()); 114 + resourceSet.getClientId(), e); 124 * @param resourceSet { 127 resourceSetDeleted(String realm, ResourceSetDescription resourceSet) argument [all...] |
H A D | ResourceSetService.java | 113 public void handleResult(ResourceSetDescription resourceSet) { 115 augmentWithPolicy(context, resourceSetId, resourceSet); 172 * @param resourceSet The resource set to check. 177 public boolean isSharedWith(ResourceSetDescription resourceSet, String resourceUserId, String realm) argument 182 resourceSet.getClientId().toLowerCase()); 183 String sharedResourceName = "uma://" + resourceSet.getId(); 255 for (ResourceSetDescription resourceSet : filteredResourceSets) { 256 promises.add(augmentWithPolicy(context, resourceSet.getId(), resourceSet)); 312 for (ResourceSetDescription resourceSet 342 augmentWithPolicy(Context context, final String resourceSetId, final ResourceSetDescription resourceSet) argument [all...] |
H A D | PolicyGraph.java | 69 private final ResourceSetDescription resourceSet; field in class:PolicyGraph 78 * @param resourceSet The resource set being evaluated. 81 public PolicyGraph(ResourceSetDescription resourceSet) { argument 82 this.resourceOwner = resourceSet.getResourceOwnerId(); 83 this.resourceSet = resourceSet; 221 JsonValue newPolicy = UmaPolicy.valueOf(resourceSet, json(object( 222 field(POLICY_ID_KEY, resourceSet.getId()),
|
H A D | ResourceSetResource.java | 254 for (ResourceSetDescription resourceSet : resourceSets) { 255 resources.add(newResource(resourceSet.getId(), 256 getResourceSetJson(resourceSet, userId))); 295 private JsonValue getResourceSetJson(ResourceSetDescription resourceSet, String userId) throws ResourceException { argument 296 HashMap<String, Object> content = new HashMap<String, Object>(resourceSet.asMap()); 297 content.put(ID, resourceSet.getId()); 298 content.put("resourceServer", resourceSet.getClientId()); 299 content.put("resourceOwnerId", resourceSet.getResourceOwnerId()); 302 Set<ResourceSetLabel> labels = umaLabelsStore.forResourceSet(resourceSet.getRealm(), resourceSet [all...] |
H A D | UmaPolicyServiceImpl.java | 236 final ResourceSetDescription resourceSet; 241 resourceSet = getResourceSet(realm, policyId); 242 umaPolicy = UmaPolicy.valueOf(resourceSet, resolveUsernameToUID(context, policy)); 243 boolean canShare = canUserShareResourceSet(resourceSet.getResourceOwnerId(), 244 userId, resourceSet.getClientId(), realm, resourceSet.getId(), 249 validateScopes(resourceSet, umaPolicy.getScopes()); 250 verifyPolicyDoesNotAlreadyExist(context, resourceSet); 262 .thenAsync(new UpdatePolicyGraphStatesFunction<List<ResourceResponse>>(resourceSet, context)) 263 .thenAsync(new AuditAndProduceUmaPolicyFunction(resourceSet, contex 317 private final ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImpl.UpdatePolicyGraphStatesFunction 320 UpdatePolicyGraphStatesFunction(ResourceSetDescription resourceSet, Context context) argument 355 private final ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImpl.AuditAndProduceUmaPolicyFunction 358 AuditAndProduceUmaPolicyFunction(ResourceSetDescription resourceSet, Context context) argument 377 verifyPolicyDoesNotAlreadyExist(Context context, ResourceSetDescription resourceSet) argument 508 private final ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImpl.UpdateUmaPolicyFunction 510 UpdateUmaPolicyFunction(Context context, UmaPolicy updatedUmaPolicy, String resourceSetId, ResourceSetDescription resourceSet) argument 878 validateScopes(ResourceSetDescription resourceSet, Set<String> requestedScopes) argument [all...] |
/forgerock/openam-v13/openam-uma/src/test/java/org/forgerock/openam/uma/ |
H A D | UmaPolicyTest.java | 37 private ResourceSetDescription resourceSet; field in class:UmaPolicyTest 41 resourceSet = new ResourceSetDescription("RESOURCE_SET_ID", "CLIENT_ID", 43 resourceSet.setDescription(json(object(field("name", "NAME")))); 150 UmaPolicy.valueOf(resourceSet, policy); 176 UmaPolicy.valueOf(resourceSet, policy); 194 UmaPolicy.valueOf(resourceSet, policy); 213 UmaPolicy.valueOf(resourceSet, policy); 238 UmaPolicy.valueOf(resourceSet, policy); 264 UmaPolicy.valueOf(resourceSet, policy); 289 UmaPolicy.valueOf(resourceSet, polic [all...] |
/forgerock/openam/openam-uma/src/test/java/org/forgerock/openam/uma/ |
H A D | UmaPolicyTest.java | 37 private ResourceSetDescription resourceSet; field in class:UmaPolicyTest 41 resourceSet = new ResourceSetDescription("RESOURCE_SET_ID", "CLIENT_ID", 43 resourceSet.setDescription(json(object(field("name", "NAME")))); 150 UmaPolicy.valueOf(resourceSet, policy); 176 UmaPolicy.valueOf(resourceSet, policy); 194 UmaPolicy.valueOf(resourceSet, policy); 213 UmaPolicy.valueOf(resourceSet, policy); 238 UmaPolicy.valueOf(resourceSet, policy); 264 UmaPolicy.valueOf(resourceSet, policy); 289 UmaPolicy.valueOf(resourceSet, polic [all...] |
/forgerock/openam-v13/openam-uma/src/main/java/org/forgerock/openam/uma/ |
H A D | UmaPolicy.java | 62 * @param resourceSet The resource set the policy relates to. 67 public static UmaPolicy valueOf(ResourceSetDescription resourceSet, JsonValue policy) throws BadRequestException { argument 69 return new UmaPolicy(resourceSet, policy, null); 127 * @param resourceSet The resource set the policy relates to. 132 public static UmaPolicy fromUnderlyingPolicies(ResourceSetDescription resourceSet, Collection<ResourceResponse> policies) argument 145 field(POLICY_ID_KEY, resourceSet.getId()), 146 field(POLICY_NAME, resourceSet.getName()), 153 return new UmaPolicy(resourceSet, umaPolicy, underlyingPolicyIds); 156 private final ResourceSetDescription resourceSet; field in class:UmaPolicy 162 private UmaPolicy(ResourceSetDescription resourceSet, JsonValu argument [all...] |
/forgerock/openam/openam-uma/src/main/java/org/forgerock/openam/uma/ |
H A D | UmaPolicy.java | 64 * @param resourceSet The resource set the policy relates to. 69 public static UmaPolicy valueOf(ResourceSetDescription resourceSet, JsonValue policy) throws BadRequestException { argument 71 return new UmaPolicy(resourceSet, policy, null); 129 * @param resourceSet The resource set the policy relates to. 134 public static UmaPolicy fromUnderlyingPolicies(ResourceSetDescription resourceSet, Collection<ResourceResponse> policies) argument 147 field(POLICY_ID_KEY, resourceSet.getId()), 148 field(POLICY_NAME, resourceSet.getName()), 155 return new UmaPolicy(resourceSet, umaPolicy, underlyingPolicyIds); 158 private final ResourceSetDescription resourceSet; field in class:UmaPolicy 164 private UmaPolicy(ResourceSetDescription resourceSet, JsonValu argument [all...] |
/forgerock/openam-v13/openam-uma/src/test/java/org/forgerock/openam/uma/rest/ |
H A D | UmaPolicyServiceImplTest.java | 101 private ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImplTest 140 resourceSet = new ResourceSetDescription("RESOURCE_SET_ID", 142 resourceSet.setDescription(json(object(field("name", "NAME"), field("scopes", array("SCOPE_A", "SCOPE_B", "SCOPE_C"))))); 145 given(resourceSetStore.read("RESOURCE_SET_ID", RESOURCE_OWNER_ID)).willReturn(resourceSet); 147 any(ResourceSetAcceptAllFilter.class))).willReturn(resourceSet); 150 .willReturn(Collections.singleton(resourceSet)); 397 UmaPolicy expectedUmaPolicy = UmaPolicy.fromUnderlyingPolicies(resourceSet, policies);
|
/forgerock/openam/openam-uma/src/test/java/org/forgerock/openam/uma/rest/ |
H A D | UmaPolicyServiceImplTest.java | 105 private ResourceSetDescription resourceSet; field in class:UmaPolicyServiceImplTest 145 resourceSet = new ResourceSetDescription("RESOURCE_SET_ID", 147 resourceSet.setDescription(json(object(field("name", "NAME"), field("scopes", array("SCOPE_A", "SCOPE_B", "SCOPE_C"))))); 150 given(resourceSetStore.read("RESOURCE_SET_ID", RESOURCE_OWNER_ID)).willReturn(resourceSet); 152 any(ResourceSetAcceptAllFilter.class))).willReturn(resourceSet); 155 .willReturn(Collections.singleton(resourceSet)); 410 UmaPolicy expectedUmaPolicy = UmaPolicy.fromUnderlyingPolicies(resourceSet, policies);
|