}
private String apiNamespace;
- private boolean usePE;
+
private String uri;
private String uriPath;
private String method;
if (apiNamespace == null) {
DmaapConfig p = (DmaapConfig)DmaapConfig.getConfig();
- usePE = "true".equalsIgnoreCase(p.getProperty("UsePE", "false"));
apiNamespace = p.getProperty("ApiNamespace", "org.openecomp.dmaapBC.api");
+ logger.info( "config param usePE has been deprecated. Use ApiPermission.Class property instead.");
}
apiPolicy = new ApiPolicy();
- logger.info( "usePE=" + usePE + " apiNamespace=" + apiNamespace);
+
+ logger.info( "apiNamespace=" + apiNamespace);
}
public ApiService setAuth( String auth ) {
// test for presence of a required field
public void required( String name, Object val, String expr ) throws RequiredFieldException {
+ err.setCode(0);
if ( val == null ) {
err.setCode(Status.BAD_REQUEST.getStatusCode());
err.setMessage("missing required field");
if ( env == null || env.isEmpty() ) {
env = "boot";
}
- if ( ! usePE ) return; // skip authorization if not enabled
+ if ( ! apiPolicy.getUseAuthClass() ) return; // skip authorization if not enabled
if ( authorization == null || authorization.isEmpty()) {
String errmsg = "No basic authorization value provided ";
err.setMessage(errmsg);