Added url param support to permission tree.

revert-70aa11f8
harshanl 9 years ago
parent 340a690995
commit e1c9f1c602

@ -65,7 +65,8 @@ public class PermissionBasedScopeValidator extends OAuth2ScopeValidator {
int idx = resource.lastIndexOf(':'); int idx = resource.lastIndexOf(':');
String url = resource.substring(0, idx); String url = resource.substring(0, idx);
String method = resource.substring(++idx, resource.length()); String method = resource.substring(++idx, resource.length());
//This is to remove the url params
url = url.substring(0, url.indexOf('?'));
Properties properties = new Properties(); Properties properties = new Properties();
properties.put(PermissionBasedScopeValidator.URL_PROPERTY, url); properties.put(PermissionBasedScopeValidator.URL_PROPERTY, url);
properties.put(PermissionBasedScopeValidator.HTTP_METHOD_PROPERTY, method); properties.put(PermissionBasedScopeValidator.HTTP_METHOD_PROPERTY, method);

Loading…
Cancel
Save